|
|
@@ -147,20 +147,8 @@ public class MemberRepository {
|
|
|
.compose(RxJavaUtil.SingleSchedule.io2Main());
|
|
|
}
|
|
|
|
|
|
- public Single<OrderPayResponse> requestGoodsPayOrder(@BillingClient.ProductType String productType, int itemId, int payPlatform, int payMethod) {
|
|
|
- if (Objects.equals(productType, BillingClient.ProductType.SUBS)) {
|
|
|
- return gpBillingClient.queryPurchase(productType)
|
|
|
- .map(list -> {
|
|
|
- if (list != null && !list.isEmpty()) {
|
|
|
- throw new RxHttpHandler.ServerErrorException(-1, "Unsuccessful: Subscription already exists, please click restore");
|
|
|
- }
|
|
|
- return list;
|
|
|
- })
|
|
|
- .flatMap(purchases -> requestPayOrder(itemId, payPlatform, payMethod))
|
|
|
- .compose(RxJavaUtil.SingleSchedule.io2Main());
|
|
|
- } else {
|
|
|
- return requestPayOrder(itemId, payPlatform, payMethod);
|
|
|
- }
|
|
|
+ public Single<OrderPayResponse> requestGoodsPayOrder(int itemId, int payPlatform, int payMethod) {
|
|
|
+ return requestPayOrder(itemId, payPlatform, payMethod);
|
|
|
}
|
|
|
|
|
|
private Single<OrderPayResponse> requestPayOrder(int itemId, int payPlatform, int payMethod) {
|