zk пре 1 година
родитељ
комит
ec4dd9e4aa

+ 1 - 1
app/build.gradle

@@ -55,7 +55,7 @@ android {
 
 
     def env_release = PROD
-    def env_debug = LOCAL
+    def env_debug = PROD
 
     buildTypes {
         release {

+ 2 - 14
app/src/main/java/com/atmob/voiceai/data/repositories/MemberRepository.java

@@ -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) {

+ 1 - 1
app/src/main/java/com/atmob/voiceai/module/integral/IntegralPurchaseViewModel.java

@@ -182,7 +182,7 @@ public class IntegralPurchaseViewModel extends BaseViewModel {
         Bundle bundle = new Bundle();
         bundle.putString(EventId.ID, String.valueOf(checkGoodsBean.getId()));
         EventHandler.report(EventId.neigoubuyclick_001, bundle);
-        memberRepository.requestGoodsPayOrder(BillingClient.ProductType.INAPP, checkGoodsBean.getId(), payPlatform, payMethod)
+        memberRepository.requestGoodsPayOrder(checkGoodsBean.getId(), payPlatform, payMethod)
                 .subscribe(new SingleObserver<OrderPayResponse>() {
                     @Override
                     public void onSubscribe(@NonNull Disposable d) {

+ 1 - 1
app/src/main/java/com/atmob/voiceai/module/subscription/SubscriptionPageViewModel.java

@@ -227,7 +227,7 @@ public class SubscriptionPageViewModel extends BaseViewModel {
         Bundle bundle = new Bundle();
         bundle.putString(EventId.ID, String.valueOf(checkGoodsBean.getId()));
         EventHandler.report(EventId.purchasesubclick_001, bundle);
-        memberRepository.requestGoodsPayOrder(BillingClient.ProductType.SUBS, checkGoodsBean.getId(), payPlatform, payMethod)
+        memberRepository.requestGoodsPayOrder(checkGoodsBean.getId(), payPlatform, payMethod)
                 .subscribe(new SingleObserver<OrderPayResponse>() {
                     @Override
                     public void onSubscribe(@NonNull Disposable d) {