j3k0 / cordova-plugin-purchase

In-App Purchase for Cordova on iOS, Android and Windows
https://purchase.cordova.fovea.cc
1.29k stars 532 forks source link

Android Subscriptions not showing price #1377

Open sshravag opened 1 year ago

sshravag commented 1 year ago

Thank you for this wonderful plugin. We were able to release the application on Apple with this plugin. We are facing issues with Android one as mentioned below:

My application works properly when I use sandbox URL, subscriptions are loaded purchase etc is everything fine. Now when we planned to roll out. I prepared a build with production URL and suddenly subscriptions have stopped showing . A We are having almost 18 product ids which we register out of which 1 is valid.

Is there any restriction for Android that it can register only 6 skus ?

Scenario :

  1. We get the list of subscriptions from backend.d I have attached document.

    1. Register it using await productList.forEach(async (product) => { let type = this.platform.is("ios") ? this.store.NON_CONSUMABLE : this.store.PAID_SUBSCRIPTION; let plan = { id: product.title, type: type

          }
          await this.store.register(plan);
          await this.store
            .when(plan.id)
            .cancelled(this.purchaseCancelled)
            .updated(this.purchaseUpdated)
            .approved(this.purchaseApproved)
            .verified(this.purchaseVerified)
      
            .refunded(this.purchaseRefunded)

      }); await this.store.refresh(); await this.store.ready(async () => { await this.readyEventListener(); })

Include logs with store.verbosity = store.DEBUG data -> {} init() startServiceConnection() sendToListener() -> ready INFO:CONSOLE(5805)] "undefined", source: http://localhost/main-es2015.js (5805) startServiceConnection() -> Success init() -> Success getAvailableProducts() queryAllSkuDetails() queryAllSkuDetails() -> Query SUBS. querySkuDetailsAsync() executeServiceRequest() -> OK querySkuDetailsAsync() -> Success queryAllSkuDetails() -> Query returned nothing. queryAllSkuDetails() -> Calling listener. getAvailableProducts() -> Success getPurchases() queryPurchases() executeServiceRequest() -> OK queryPurchases() -> Elapsed time: 13ms queryPurchases() -> Subscriptions elapsed time: 21ms queryPurchases() -> Subscriptions result code: 0 res: 0 sendToListener() -> setPurchases data -> {"purchases":[]}

Expected behavior

System Info

Android

Output of cordova info. "plugins": { "cordova-plugin-device": {}, "cordova-plugin-splashscreen": {}, "cordova-plugin-ionic-keyboard": {}, "cordova-plugin-fingerprint-aio": {}, "cordova-plugin-nativestorage": {}, "cordova-plugin-android-permissions": {}, "cordova-plugin-app-version": {}, "cordova-plugin-network-information": {}, cordova-plugin-statusbar": {}, "cordova-plugin-market": {}, "cordova-plugin-whitelist": {}, "cordova-plugin-ionic-webview": {}, "cordova-plugin-inappbrowser": {}, "cordova-plugin-google-analytics": {}, "cordova-sqlite-storage": {}, "cordova-plugin-purchase": { "BILLING_KEY": "MIIBI.......AB" } },

j3k0 commented 1 year ago

There's no restriction to 6 products with Google Play. Have you made progress solving your issue?

sshravag commented 1 year ago

Thanks a lot for your response.

No we could not find any solution so we modified our backed to send only 6 subscriptions. But we need a permanent solution to this. If you could help us with same that will be really grateful.

Regards, Shraddha