j3k0 / cordova-plugin-purchase

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

Cancellation of Subscription is not recognized on Android #1531

Open audvd2 opened 9 months ago

audvd2 commented 9 months ago

Observed behavior

Using local receipts as a base to check whether a subscription is active does not work as expected with Google Play.

More concretely, after purchasing the subscription, the receiptUpdated-, initiated- and approved- and finished-callbacks are executed at various points. After cancelling the subscription via the Play Store, the receiptUpdated-, initiated- and approved-callbacks are triggered again. However, the finished-callback is never executed and the Transaction's state remains in state approved accordingly (perhaps the logs may also help for this ticket).

While the receiptUpdated-event updates the transaction's renewalIntent from Renewal to Lapse, crucially the expirationDate-field stays undefined. This is problematic due to the implementation of store.owned which for local receipts executes the isOwned-implementation in internal.local-receipts:

      static isOwned(localReceipts: Receipt[], product?: { id: string; platform?: Platform }) {
        if (!product) return false;
        const transaction = LocalReceipts.find(localReceipts, product);
        if (!transaction) return false;
        if (transaction.isConsumed) return false;
        if (transaction.isPending) return false;
        if (transaction.expirationDate) return transaction.expirationDate.getTime() > +new Date();
        return true;
      }

With an undefined expirationDate this always returns true, even if the expirationDate displayed by Google Play has already elapsed. Only when closing and reopening the app, does it recognize that no subscription is active anymore (this can be seen in the logs starting from the line ---------------------------- PROCESS STARTED (20100) for package (packageName) ----------------------------.

Here are the logs:

---------------------------- PROCESS STARTED (19290) for package (packageName) ----------------------------
2024-02-15 14:14:41.853 19290-19290 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 5421 - Msg: Create CdvPurchase...
2024-02-15 14:14:42.351 19290-19290 Capacitor/Console       (packageName)               I  File: http://localhost/main.b0c66957061bedce.js - Line 1 - Msg: Create CdvPurchase...
2024-02-15 14:14:42.524 19290-19290 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase] INFO: initialize(["android-playstore"]) v13.10.1
2024-02-15 14:14:42.526 19290-19290 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase.Adapters] INFO: Adding platforms: [{"platform":"android-playstore"}]
2024-02-15 14:14:42.526 19290-19290 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase.Adapters] INFO: 
2024-02-15 14:14:42.527 19290-19290 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase.Adapters] INFO: GooglePlay initializing...
2024-02-15 14:14:42.528 19290-19290 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase.GooglePlay] INFO: Initialize
2024-02-15 14:14:42.529 19290-19290 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase.GooglePlay.Bridge] INFO: setup ok
2024-02-15 14:14:42.557 19290-19372 CdvPurchase             (packageName)               D  sendToListener() -> ready
2024-02-15 14:14:42.557 19290-19372 CdvPurchase             (packageName)               D              data -> {}
2024-02-15 14:14:42.558 19290-19372 CdvPurchase             (packageName)               D  init()
2024-02-15 14:14:42.588 19290-19372 CdvPurchase             (packageName)               D  startServiceConnection()
2024-02-15 14:14:42.599 19290-19290 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase.GooglePlay.Bridge] INFO: listener: {"type":"ready","data":{}}
2024-02-15 14:14:42.633 19290-19422 CdvPurchase             (packageName)               D  startServiceConnection() -> Success
2024-02-15 14:14:42.633 19290-19422 CdvPurchase             (packageName)               D  init() -> Success
2024-02-15 14:14:42.645 19290-19290 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase.GooglePlay] DEBUG: Ready
2024-02-15 14:14:42.646 19290-19290 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase.Adapters] INFO: GooglePlay initialized. 
2024-02-15 14:14:42.647 19290-19290 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase.Adapters] INFO: GooglePlay products: [{"id":"(subscriptionProductId)","type":"paid subscription","platform":"android-playstore"}]
2024-02-15 14:14:42.647 19290-19290 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase.GooglePlay] DEBUG: Load: [{"id":"(subscriptionProductId)","type":"paid subscription","platform":"android-playstore"}]
2024-02-15 14:14:42.648 19290-19290 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase.GooglePlay] DEBUG: getAvailableProducts: [] | ["(subscriptionProductId)"]
2024-02-15 14:14:42.648 19290-19290 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase.GooglePlay.Bridge] INFO: getAvailableProducts()
2024-02-15 14:14:42.659 19290-19372 CdvPurchase             (packageName)               D  getAvailableProducts()
2024-02-15 14:14:42.659 19290-19372 CdvPurchase             (packageName)               D  queryAllProductDetails()
2024-02-15 14:14:42.659 19290-19372 CdvPurchase             (packageName)               D  queryAllProductDetails() -> Query SUBS.
2024-02-15 14:14:42.659 19290-19372 CdvPurchase             (packageName)               D  queryProductDetailsAsync()
2024-02-15 14:14:42.660 19290-19372 CdvPurchase             (packageName)               D  executeServiceRequest() -> OK
2024-02-15 14:14:42.660 19290-19372 CdvPurchase             (packageName)               D  queryProductDetailsAsync() -> Success
2024-02-15 14:14:42.677 19290-19423 CdvPurchase             (packageName)               D  queryAllProductDetails() -> ProductDetails: Title: (productDetails.Title)
2024-02-15 14:14:42.677 19290-19423 CdvPurchase             (packageName)               D  queryAllProductDetails() -> Calling listener.
2024-02-15 14:14:42.677 19290-19423 CdvPurchase             (packageName)               D  getAvailableProducts() -> productDetails: ProductDetails{jsonString='{"productId":"(subscriptionProductId)","type":"subs","title":"(productDetails.Title)","name":"(productDetails.Name)","description":"(productDetails.Description)","localizedIn":["de-DE"],"skuDetailsToken":"(skuDetailsToken)","subscriptionOfferDetails":[{"offerIdToken":"AUj\/(token)","basePlanId":"p1m","pricingPhases":[{"priceAmountMicros":(priceAmountMicros),"priceCurrencyCode":"EUR","formattedPrice":"(formattedPrice)","billingPeriod":"P1M","recurrenceMode":1}],"offerTags":[]}]}', parsedJson={"productId":"(subscriptionProductId)","type":"subs","title":"(productDetails.Title)","name":"(productDetails.Name)","description":"(productDetails.Description)","localizedIn":["de-DE"],"skuDetailsToken":"(skuDetailsToken)","subscriptionOfferDetails":[{"offerIdToken":"AUj\/(token)","basePlanId":"p1m","pricingPhases":[{"priceAmountMicros":(priceAmountMicros),"priceCurrencyCode":"EUR","formattedPrice":"(formattedPrice)","billingPeriod":"P1M","recurrenceMode":1}],"offerTags":[]}]}, productId='(subscriptionProductId)', productType='subs', title='(productDetails.Title)', productDetailsToken='(skuDetailsToken)', subscriptionOfferDetails=[com.android.billingclient.api.ProductDetails$SubscriptionOfferDetails@7adddad]}
2024-02-15 14:14:42.677 19290-19423 CdvPurchase             (packageName)               D  getAvailableProducts() -> Success
2024-02-15 14:14:42.695 19290-19290 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase.GooglePlay] DEBUG: Loaded: [{"productId":"(subscriptionProductId)","title":"(productDetails.Title)","name":"(productDetails.Name)","description":"(productDetails.Description)","product_format":"v12.0","product_type":"subs","offers":[{"base_plan_id":"p1m","token":"AUj/(token)","tags":[],"pricing_phases":[{"billing_cycle_count":0,"billing_period":"P1M","formatted_price":"(formattedPrice)","price_amount_micros":(priceAmountMicros),"price_currency_code":"EUR","recurrence_mode":"INFINITE_RECURRING"}]}]}]
2024-02-15 14:14:42.697 19290-19290 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase.GooglePlay] DEBUG: getPurchases
2024-02-15 14:14:42.698 19290-19290 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase.GooglePlay.Bridge] INFO: getPurchases()
2024-02-15 14:14:42.711 19290-19372 CdvPurchase             (packageName)               D  getPurchases()
2024-02-15 14:14:42.711 19290-19372 CdvPurchase             (packageName)               D  queryPurchases()
2024-02-15 14:14:42.712 19290-19372 CdvPurchase             (packageName)               D  executeServiceRequest() -> OK
2024-02-15 14:14:42.723 19290-19425 CdvPurchase             (packageName)               I  queryPurchases(INAPP) -> Elapsed time: 11ms
2024-02-15 14:14:42.723 19290-19426 CdvPurchase             (packageName)               I  queryPurchases(SUBS) -> Elapsed time: 11ms
2024-02-15 14:14:42.724 19290-19426 CdvPurchase             (packageName)               D  sendToListener() -> setPurchases
2024-02-15 14:14:42.724 19290-19426 CdvPurchase             (packageName)               D              data -> {"purchases":[]}
2024-02-15 14:14:42.731 19290-19290 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase.GooglePlay.Bridge] INFO: listener: {"type":"setPurchases","data":{"purchases":[]}}
2024-02-15 14:14:42.732 19290-19290 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase.GooglePlay] DEBUG: onSetPurchases: []
2024-02-15 14:14:42.732 19290-19290 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase.GooglePlay] DEBUG: onPurchaseUpdated: 
2024-02-15 14:14:42.733 19290-19290 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase.AdapterListener] DEBUG: receiptsReady: android-playstore (1/0)
2024-02-15 14:14:42.734 19290-19290 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase.GooglePlay] DEBUG: getPurchases success
2024-02-15 14:14:42.735 19290-19290 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase.Adapters] INFO: GooglePlay products loaded: [{"className":"Product","title":"(productDetails.Name)","description":"(productDetails.Description)","platform":"android-playstore","type":"paid subscription","id":"(subscriptionProductId)","offers":[{"className":"Offer","id":"(subscriptionProductId)@p1m","pricingPhases":[{"price":"(formattedPrice)","priceMicros":(priceAmountMicros),"currency":"EUR","billingPeriod":"P1M","billingCycles":0,"recurrenceMode":"INFINITE_RECURRING","paymentMode":"PayAsYouGo"}],"productId":"(subscriptionProductId)","productType":"paid subscription","platform":"android-playstore","type":"subs","tags":[],"token":"AUj/(token)"}]}]
2024-02-15 14:14:42.738 19290-19290 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase.Adapters] INFO: GooglePlay receipts loaded: []
2024-02-15 14:14:42.739 19290-19290 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase.AdapterListener] DEBUG: setSupportedPlatforms: android-playstore (1 have their receipts ready)
2024-02-15 14:14:42.740 19290-19290 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase.AdapterListener] DEBUG: triggering receiptsReady()
2024-02-15 14:14:42.743 19290-19290 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase] DEBUG: Calling callback: type=productUpdated() name=#2e40b86ae7affc08c73ffa855e244ac8 reason=adapterListener_productsUpdated
2024-02-15 14:14:42.745 19290-19290 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase] DEBUG: Calling callback: type=ready() name=#44415f74d20cd54458293d42c72a2757 reason=initialize_promise_resolved
2024-02-15 14:14:42.747 19290-19290 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase] DEBUG: Calling callback: type=receiptsReady() name=receiptsMonitor_setup reason=adapterListener_setSupportedPlatforms
2024-02-15 14:14:42.748 19290-19290 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase.ReceiptsMonitor] DEBUG: receiptsReady...
2024-02-15 14:14:42.749 19290-19290 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase] DEBUG: Calling callback: type=receiptsReady() name=#aa550f4c9e622bcc8c6668113f96a3c9 reason=adapterListener_setSupportedPlatforms
2024-02-15 14:14:42.752 19290-19290 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase.ReceiptsMonitor] DEBUG: check(0/0)
2024-02-15 14:14:42.753 19290-19290 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase.ReceiptsMonitor] INFO: receiptsVerified()
2024-02-15 14:14:42.763 19290-19290 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase] DEBUG: Calling callback: type=receiptsVerified() name=#761002fa47d1fef246e14622bdeee32c reason=receipts_monitor_controller
2024-02-15 14:15:09.829 19290-19290 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase] INFO: order((subscriptionProductId))
2024-02-15 14:15:09.831 19290-19290 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase.GooglePlay] INFO: Order - {"className":"Offer","id":"(subscriptionProductId)@p1m","pricingPhases":[{"price":"(formattedPrice)","priceMicros":(priceAmountMicros),"currency":"EUR","billingPeriod":"P1M","billingCycles":0,"recurrenceMode":"INFINITE_RECURRING","paymentMode":"PayAsYouGo"}],"productId":"(subscriptionProductId)","productType":"paid subscription","platform":"android-playstore","type":"subs","tags":[],"token":"AUj/(token)"}
2024-02-15 14:15:09.833 19290-19290 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase.GooglePlay.Bridge] INFO: subscribe()
2024-02-15 14:15:09.839 19290-19372 CdvPurchase             (packageName)               D  subscribe()
2024-02-15 14:15:09.846 19290-19372 CdvPurchase             (packageName)               D  Product details id@token: [Ljava.lang.String;@bbd96af === (subscriptionProductId)@AUj/(token) ... ProductDetails{jsonString='{"productId":"(subscriptionProductId)","type":"subs","title":"(productDetails.Title)","name":"(productDetails.Name)","description":"(productDetails.Description)","localizedIn":["de-DE"],"skuDetailsToken":"(skuDetailsToken)","subscriptionOfferDetails":[{"offerIdToken":"AUj\/(token)","basePlanId":"p1m","pricingPhases":[{"priceAmountMicros":(priceAmountMicros),"priceCurrencyCode":"EUR","formattedPrice":"(formattedPrice)","billingPeriod":"P1M","recurrenceMode":1}],"offerTags":[]}]}', parsedJson={"productId":"(subscriptionProductId)","type":"subs","title":"(productDetails.Title)","name":"(productDetails.Name)","description":"(productDetails.Description)","localizedIn":["de-DE"],"skuDetailsToken":"(skuDetailsToken)","subscriptionOfferDetails":[{"offerIdToken":"AUj\/(token)","basePlanId":"p1m","pricingPhases":[{"priceAmountMicros":(priceAmountMicros),"priceCurrencyCode":"EUR","formattedPrice":"(formattedPrice)","billingPeriod":"P1M","recurrenceMode":1}],"offerTags":[]}]}, productId='(subscriptionProductId)', productType='subs', title='(productDetails.Title)', productDetailsToken='(skuDetailsToken)', subscriptionOfferDetails=[com.android.billingclient.api.ProductDetails$SubscriptionOfferDetails@7adddad]}
2024-02-15 14:15:09.846 19290-19372 CdvPurchase             (packageName)               D  buy() -> setProductDetailsParamsList
2024-02-15 14:15:09.852 19290-19372 CdvPurchase             (packageName)               D  initiatePurchaseFlow()
2024-02-15 14:15:09.853 19290-19372 CdvPurchase             (packageName)               D  executeServiceRequest() -> OK
2024-02-15 14:15:09.853 19290-19372 CdvPurchase             (packageName)               D  initiatePurchaseFlow() -> launchBillingFlow.
2024-02-15 14:15:22.641 19290-19290 CdvPurchase             (packageName)               D  onPurchasesUpdated() -> Success
2024-02-15 14:15:22.645 19290-19290 CdvPurchase             (packageName)               D  sendToListener() -> purchasesUpdated
2024-02-15 14:15:22.645 19290-19290 CdvPurchase             (packageName)               D              data -> {"purchases":[{"orderId":"(orderId)","packageName":"(packageName)","productId":"(subscriptionProductId)","purchaseTime":1708002911537,"purchaseState":0,"purchaseToken":"(purchaseToken)","quantity":1,"autoRenewing":true,"acknowledged":false,"productIds":["(subscriptionProductId)"],"getPurchaseState":1,"developerPayload":"","accountId":"","profileId":"","signature":"(signatureWith\/Dividers)","receipt":"{\"orderId\":\"(orderId)\",\"packageName\":\"(packageName)\",\"productId\":\"(subscriptionProductId)\",\"purchaseTime\":1708002911537,\"purchaseState\":0,\"purchaseToken\":\"(purchaseToken)\",\"quantity\":1,\"autoRenewing\":true,\"acknowledged\":false}"}]}
2024-02-15 14:15:22.662 19290-19290 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase.GooglePlay.Bridge] INFO: listener: {"type":"purchasesUpdated","data":{"purchases":[{"orderId":"(orderId)","packageName":"(packageName)","productId":"(subscriptionProductId)","purchaseTime":1708002911537,"purchaseState":0,"purchaseToken":"(purchaseToken)","quantity":1,"autoRenewing":true,"acknowledged":false,"productIds":["(subscriptionProductId)"],"getPurchaseState":1,"developerPayload":"","accountId":"","profileId":"","signature":"(signatureWith/Dividers)","receipt":"{\"orderId\":\"(orderId)\",\"packageName\":\"(packageName)\",\"productId\":\"(subscriptionProductId)\",\"purchaseTime\":1708002911537,\"purchaseState\":0,\"purchaseToken\":\"(purchaseToken)\",\"quantity\":1,\"autoRenewing\":true,\"acknowledged\":false}"}]}}
2024-02-15 14:15:22.663 19290-19290 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase.GooglePlay] DEBUG: onPurchaseUpdated: (orderId)
2024-02-15 14:15:22.663 19290-19290 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase.AdapterListener] DEBUG: receiptsUpdated: [{"className":"Receipt","transactions":[{"className":"Transaction","transactionId":"(orderId)","state":"initiated","products":[{"id":"(subscriptionProductId)"}],"platform":"android-playstore","nativePurchase":{"orderId":"(orderId)","packageName":"(packageName)","productId":"(subscriptionProductId)","purchaseTime":1708002911537,"purchaseState":0,"purchaseToken":"(purchaseToken)","quantity":1,"autoRenewing":true,"acknowledged":false,"productIds":["(subscriptionProductId)"],"getPurchaseState":1,"developerPayload":"","accountId":"","profileId":"","signature":"(signatureWith/Dividers)","receipt":"{\"orderId\":\"(orderId)\",\"packageName\":\"(packageName)\",\"productId\":\"(subscriptionProductId)\",\"purchaseTime\":1708002911537,\"purchaseState\":0,\"purchaseToken\":\"(purchaseToken)\",\"quantity\":1,\"autoRenewing\":true,\"acknowledged\":false}"},"purchaseId":"(purchaseToken)","purchaseDate":"2024-02-15T13:15:11.537Z","isPending":false,"isAcknowledged":false,"renewalIntent":"Renew"}],"platform":"android-playstore","purchaseToken":"(purchaseToken)","orderId":"(orderId)"}]
2024-02-15 14:15:22.664 19290-19290 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase.AdapterListener] DEBUG: receiptsUpdated: [{"className":"Receipt","transactions":[{"className":"Transaction","transactionId":"(orderId)","state":"approved","products":[{"id":"(subscriptionProductId)"}],"platform":"android-playstore","nativePurchase":{"orderId":"(orderId)","packageName":"(packageName)","productId":"(subscriptionProductId)","purchaseTime":1708002911537,"purchaseState":0,"purchaseToken":"(purchaseToken)","quantity":1,"autoRenewing":true,"acknowledged":false,"productIds":["(subscriptionProductId)"],"getPurchaseState":1,"developerPayload":"","accountId":"","profileId":"","signature":"(signatureWith/Dividers)","receipt":"{\"orderId\":\"(orderId)\",\"packageName\":\"(packageName)\",\"productId\":\"(subscriptionProductId)\",\"purchaseTime\":1708002911537,\"purchaseState\":0,\"purchaseToken\":\"(purchaseToken)\",\"quantity\":1,\"autoRenewing\":true,\"acknowledged\":false}"},"purchaseId":"(purchaseToken)","purchaseDate":"2024-02-15T13:15:11.537Z","isPending":false,"isAcknowledged":false,"renewalIntent":"Renew"}],"platform":"android-playstore","purchaseToken":"(purchaseToken)","orderId":"(orderId)"}]
2024-02-15 14:15:22.680 19290-19290 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase] DEBUG: Calling callback: type=receiptUpdated() name=#325cbb7d5234a3e719a00abcb24345d7 reason=adapterListener_receiptsUpdated
2024-02-15 14:15:22.709 19290-19290 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase] DEBUG: Calling callback: type=initiated() name=#48b436c07704595d75f8c9ba96280490 reason=adapterListener_receiptsUpdated_initiated
2024-02-15 14:15:22.716 19290-19290 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase] DEBUG: Calling callback: type=receiptUpdated() name=#325cbb7d5234a3e719a00abcb24345d7 reason=adapterListener_receiptsUpdated
2024-02-15 14:15:22.725 19290-19290 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase] DEBUG: Calling callback: type=approved() name=transactionStateMonitors_callOnChange reason=adapterListener_receiptsUpdated_approved
2024-02-15 14:15:22.726 19290-19290 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase] DEBUG: Calling callback: type=approved() name=#8c96dfd31fad06ffc544d405f2fd2c4b reason=adapterListener_receiptsUpdated_approved
2024-02-15 14:15:22.735 19290-19290 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase] INFO: finish(Transaction)
2024-02-15 14:15:22.735 19290-19290 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase.GooglePlay.Bridge] INFO: acknowledgePurchase()
2024-02-15 14:15:22.773 19290-19372 CdvPurchase             (packageName)               D  acknowledgePurchase((purchaseToken))
2024-02-15 14:15:22.774 19290-19372 CdvPurchase             (packageName)               D  executeServiceRequest() -> OK
2024-02-15 14:15:23.307 19290-19557 CdvPurchase             (packageName)               D  onAcknowledgePurchaseResponse() -> Success
2024-02-15 14:15:23.390 19290-19290 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase.AdapterListener] DEBUG: receiptsUpdated: [{"className":"Receipt","transactions":[{"className":"Transaction","transactionId":"(orderId)","state":"finished","products":[{"id":"(subscriptionProductId)"}],"platform":"android-playstore","nativePurchase":{"orderId":"(orderId)","packageName":"(packageName)","productId":"(subscriptionProductId)","purchaseTime":1708002911537,"purchaseState":0,"purchaseToken":"(purchaseToken)","quantity":1,"autoRenewing":true,"acknowledged":false,"productIds":["(subscriptionProductId)"],"getPurchaseState":1,"developerPayload":"","accountId":"","profileId":"","signature":"(signatureWith/Dividers)","receipt":"{\"orderId\":\"(orderId)\",\"packageName\":\"(packageName)\",\"productId\":\"(subscriptionProductId)\",\"purchaseTime\":1708002911537,\"purchaseState\":0,\"purchaseToken\":\"(purchaseToken)\",\"quantity\":1,\"autoRenewing\":true,\"acknowledged\":false}"},"purchaseId":"(purchaseToken)","purchaseDate":"2024-02-15T13:15:11.537Z","isPending":false,"isAcknowledged":false,"renewalIntent":"Renew"}],"platform":"android-playstore","purchaseToken":"(purchaseToken)","orderId":"(orderId)"}]
2024-02-15 14:15:23.391 19290-19290 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase] DEBUG: Calling callback: type=receiptUpdated() name=#325cbb7d5234a3e719a00abcb24345d7 reason=adapterListener_receiptsUpdated
2024-02-15 14:15:23.398 19290-19290 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase] DEBUG: Calling callback: type=finished() name=transactionStateMonitors_callOnChange reason=adapterListener_receiptsUpdated_finished
2024-02-15 14:15:23.400 19290-19290 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase] DEBUG: Calling callback: type=finished() name=#c0ad78bb72e4871d6f38185073e99071 reason=adapterListener_receiptsUpdated_finished
2024-02-15 14:16:06.651 19290-19290 CdvPurchase             (packageName)               D  onStop()
2024-02-15 14:16:23.057 19290-19290 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase] INFO: update()
2024-02-15 14:16:23.061 19290-19290 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase] INFO: Skipping store.update() as the last call occurred less than store.minTimeBetweenUpdates millis ago.
2024-02-15 14:16:38.402 19290-19290 CdvPurchase             (packageName)               D  onStart()
2024-02-15 14:16:38.402 19290-19290 CdvPurchase             (packageName)               D  queryPurchases()
2024-02-15 14:16:38.402 19290-19290 CdvPurchase             (packageName)               D  executeServiceRequest() -> OK
2024-02-15 14:16:38.431 19290-19684 CdvPurchase             (packageName)               I  queryPurchases(INAPP) -> Elapsed time: 29ms
2024-02-15 14:16:38.431 19290-19685 CdvPurchase             (packageName)               I  queryPurchases(SUBS) -> Elapsed time: 29ms
2024-02-15 14:16:38.432 19290-19685 CdvPurchase             (packageName)               D  sendToListener() -> setPurchases
2024-02-15 14:16:38.432 19290-19684 CdvPurchase             (packageName)               D  sendToListener() -> setPurchases
2024-02-15 14:16:38.433 19290-19684 CdvPurchase             (packageName)               D              data -> {"purchases":[{"orderId":"(orderId)","packageName":"(packageName)","productId":"(subscriptionProductId)","purchaseTime":1708002911537,"purchaseState":0,"purchaseToken":"(purchaseToken)","quantity":1,"autoRenewing":false,"acknowledged":true,"productIds":["(subscriptionProductId)"],"getPurchaseState":1,"developerPayload":"","accountId":"","profileId":"","signature":"(signatureWith\/Dividers)","receipt":"{\"orderId\":\"(orderId)\",\"packageName\":\"(packageName)\",\"productId\":\"(subscriptionProductId)\",\"purchaseTime\":1708002911537,\"purchaseState\":0,\"purchaseToken\":\"(purchaseToken)\",\"quantity\":1,\"autoRenewing\":false,\"acknowledged\":true}"}]}
2024-02-15 14:16:38.433 19290-19685 CdvPurchase             (packageName)               D              data -> {"purchases":[{"orderId":"(orderId)","packageName":"(packageName)","productId":"(subscriptionProductId)","purchaseTime":1708002911537,"purchaseState":0,"purchaseToken":"(purchaseToken)","quantity":1,"autoRenewing":false,"acknowledged":true,"productIds":["(subscriptionProductId)"],"getPurchaseState":1,"developerPayload":"","accountId":"","profileId":"","signature":"(signatureWith\/Dividers)","receipt":"{\"orderId\":\"(orderId)\",\"packageName\":\"(packageName)\",\"productId\":\"(subscriptionProductId)\",\"purchaseTime\":1708002911537,\"purchaseState\":0,\"purchaseToken\":\"(purchaseToken)\",\"quantity\":1,\"autoRenewing\":false,\"acknowledged\":true}"}]}
2024-02-15 14:16:38.519 19290-19290 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase.GooglePlay.Bridge] INFO: listener: {"type":"setPurchases","data":{"purchases":[{"orderId":"(orderId)","packageName":"(packageName)","productId":"(subscriptionProductId)","purchaseTime":1708002911537,"purchaseState":0,"purchaseToken":"(purchaseToken)","quantity":1,"autoRenewing":false,"acknowledged":true,"productIds":["(subscriptionProductId)"],"getPurchaseState":1,"developerPayload":"","accountId":"","profileId":"","signature":"(signatureWith/Dividers)","receipt":"{\"orderId\":\"(orderId)\",\"packageName\":\"(packageName)\",\"productId\":\"(subscriptionProductId)\",\"purchaseTime\":1708002911537,\"purchaseState\":0,\"purchaseToken\":\"(purchaseToken)\",\"quantity\":1,\"autoRenewing\":false,\"acknowledged\":true}"}]}}
2024-02-15 14:16:38.520 19290-19290 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase.GooglePlay] DEBUG: onSetPurchases: [{"orderId":"(orderId)","packageName":"(packageName)","productId":"(subscriptionProductId)","purchaseTime":1708002911537,"purchaseState":0,"purchaseToken":"(purchaseToken)","quantity":1,"autoRenewing":false,"acknowledged":true,"productIds":["(subscriptionProductId)"],"getPurchaseState":1,"developerPayload":"","accountId":"","profileId":"","signature":"(signatureWith/Dividers)","receipt":"{\"orderId\":\"(orderId)\",\"packageName\":\"(packageName)\",\"productId\":\"(subscriptionProductId)\",\"purchaseTime\":1708002911537,\"purchaseState\":0,\"purchaseToken\":\"(purchaseToken)\",\"quantity\":1,\"autoRenewing\":false,\"acknowledged\":true}"}]
2024-02-15 14:16:38.520 19290-19290 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase.GooglePlay] DEBUG: onPurchaseUpdated: (orderId)
2024-02-15 14:16:38.520 19290-19290 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase.AdapterListener] DEBUG: receiptsUpdated: [{"className":"Receipt","transactions":[{"className":"Transaction","transactionId":"(orderId)","state":"approved","products":[{"id":"(subscriptionProductId)"}],"platform":"android-playstore","nativePurchase":{"orderId":"(orderId)","packageName":"(packageName)","productId":"(subscriptionProductId)","purchaseTime":1708002911537,"purchaseState":0,"purchaseToken":"(purchaseToken)","quantity":1,"autoRenewing":false,"acknowledged":true,"productIds":["(subscriptionProductId)"],"getPurchaseState":1,"developerPayload":"","accountId":"","profileId":"","signature":"(signatureWith/Dividers)","receipt":"{\"orderId\":\"(orderId)\",\"packageName\":\"(packageName)\",\"productId\":\"(subscriptionProductId)\",\"purchaseTime\":1708002911537,\"purchaseState\":0,\"purchaseToken\":\"(purchaseToken)\",\"quantity\":1,\"autoRenewing\":false,\"acknowledged\":true}"},"purchaseId":"(purchaseToken)","purchaseDate":"2024-02-15T13:15:11.537Z","isPending":false,"isAcknowledged":true,"renewalIntent":"Lapse"}],"platform":"android-playstore","purchaseToken":"(purchaseToken)","orderId":"(orderId)"}]
2024-02-15 14:16:38.521 19290-19290 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase.AdapterListener] DEBUG: receiptsReady: android-playstore(skipping)
2024-02-15 14:16:38.521 19290-19290 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase.GooglePlay.Bridge] INFO: listener: {"type":"setPurchases","data":{"purchases":[{"orderId":"(orderId)","packageName":"(packageName)","productId":"(subscriptionProductId)","purchaseTime":1708002911537,"purchaseState":0,"purchaseToken":"(purchaseToken)","quantity":1,"autoRenewing":false,"acknowledged":true,"productIds":["(subscriptionProductId)"],"getPurchaseState":1,"developerPayload":"","accountId":"","profileId":"","signature":"(signatureWith/Dividers)","receipt":"{\"orderId\":\"(orderId)\",\"packageName\":\"(packageName)\",\"productId\":\"(subscriptionProductId)\",\"purchaseTime\":1708002911537,\"purchaseState\":0,\"purchaseToken\":\"(purchaseToken)\",\"quantity\":1,\"autoRenewing\":false,\"acknowledged\":true}"}]}}
2024-02-15 14:16:38.521 19290-19290 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase.GooglePlay] DEBUG: onSetPurchases: [{"orderId":"(orderId)","packageName":"(packageName)","productId":"(subscriptionProductId)","purchaseTime":1708002911537,"purchaseState":0,"purchaseToken":"(purchaseToken)","quantity":1,"autoRenewing":false,"acknowledged":true,"productIds":["(subscriptionProductId)"],"getPurchaseState":1,"developerPayload":"","accountId":"","profileId":"","signature":"(signatureWith/Dividers)","receipt":"{\"orderId\":\"(orderId)\",\"packageName\":\"(packageName)\",\"productId\":\"(subscriptionProductId)\",\"purchaseTime\":1708002911537,\"purchaseState\":0,\"purchaseToken\":\"(purchaseToken)\",\"quantity\":1,\"autoRenewing\":false,\"acknowledged\":true}"}]
2024-02-15 14:16:38.522 19290-19290 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase.GooglePlay] DEBUG: onPurchaseUpdated: (orderId)
2024-02-15 14:16:38.522 19290-19290 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase.AdapterListener] DEBUG: receiptsUpdated: [{"className":"Receipt","transactions":[{"className":"Transaction","transactionId":"(orderId)","state":"approved","products":[{"id":"(subscriptionProductId)"}],"platform":"android-playstore","nativePurchase":{"orderId":"(orderId)","packageName":"(packageName)","productId":"(subscriptionProductId)","purchaseTime":1708002911537,"purchaseState":0,"purchaseToken":"(purchaseToken)","quantity":1,"autoRenewing":false,"acknowledged":true,"productIds":["(subscriptionProductId)"],"getPurchaseState":1,"developerPayload":"","accountId":"","profileId":"","signature":"(signatureWith/Dividers)","receipt":"{\"orderId\":\"(orderId)\",\"packageName\":\"(packageName)\",\"productId\":\"(subscriptionProductId)\",\"purchaseTime\":1708002911537,\"purchaseState\":0,\"purchaseToken\":\"(purchaseToken)\",\"quantity\":1,\"autoRenewing\":false,\"acknowledged\":true}"},"purchaseId":"(purchaseToken)","purchaseDate":"2024-02-15T13:15:11.537Z","isPending":false,"isAcknowledged":true,"renewalIntent":"Lapse"}],"platform":"android-playstore","purchaseToken":"(purchaseToken)","orderId":"(orderId)"}]
2024-02-15 14:16:38.522 19290-19290 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase.AdapterListener] DEBUG: receiptsReady: android-playstore(skipping)
2024-02-15 14:16:38.523 19290-19290 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase] DEBUG: Calling callback: type=receiptUpdated() name=#325cbb7d5234a3e719a00abcb24345d7 reason=adapterListener_receiptsUpdated
2024-02-15 14:16:38.537 19290-19290 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase] DEBUG: Calling callback: type=approved() name=transactionStateMonitors_callOnChange reason=adapterListener_receiptsUpdated_approved
2024-02-15 14:16:38.537 19290-19290 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase] DEBUG: Calling callback: type=approved() name=#8c96dfd31fad06ffc544d405f2fd2c4b reason=adapterListener_receiptsUpdated_approved
2024-02-15 14:16:38.543 19290-19290 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase] INFO: finish(Transaction)
2024-02-15 14:16:38.557 19290-19290 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase] DEBUG: Calling callback: type=receiptUpdated() name=#325cbb7d5234a3e719a00abcb24345d7 reason=adapterListener_receiptsUpdated
2024-02-15 14:16:38.562 19290-19290 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase] DEBUG: Calling callback: type=approved() name=transactionStateMonitors_callOnChange reason=adapterListener_receiptsUpdated_approved
2024-02-15 14:16:38.562 19290-19290 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase] DEBUG: Calling callback: type=approved() name=#8c96dfd31fad06ffc544d405f2fd2c4b reason=adapterListener_receiptsUpdated_approved
2024-02-15 14:16:38.567 19290-19290 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase] INFO: finish(Transaction)
2024-02-15 14:17:22.685 19290-19290 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase] INFO: update()
2024-02-15 14:17:22.686 19290-19290 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase] INFO: Skipping store.update() as the last call occurred less than store.minTimeBetweenUpdates millis ago.
2024-02-15 14:18:22.685 19290-19290 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase] INFO: update()
2024-02-15 14:18:22.688 19290-19290 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase] INFO: Skipping store.update() as the last call occurred less than store.minTimeBetweenUpdates millis ago.
2024-02-15 14:19:22.687 19290-19290 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase] INFO: update()
2024-02-15 14:19:22.689 19290-19290 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase] INFO: Skipping store.update() as the last call occurred less than store.minTimeBetweenUpdates millis ago.
2024-02-15 14:20:22.686 19290-19290 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase] INFO: update()
2024-02-15 14:20:22.688 19290-19290 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase] INFO: Skipping store.update() as the last call occurred less than store.minTimeBetweenUpdates millis ago.
2024-02-15 14:21:22.686 19290-19290 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase] INFO: update()
2024-02-15 14:21:22.688 19290-19290 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase] INFO: Skipping store.update() as the last call occurred less than store.minTimeBetweenUpdates millis ago.
2024-02-15 14:22:22.686 19290-19290 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase] INFO: update()
2024-02-15 14:22:22.688 19290-19290 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase] INFO: Skipping store.update() as the last call occurred less than store.minTimeBetweenUpdates millis ago.
2024-02-15 14:22:37.922 19290-19290 CdvPurchase             (packageName)               D  onStop()
2024-02-15 14:22:45.859 19290-19290 CdvPurchase             (packageName)               D  onStart()
2024-02-15 14:23:22.686 19290-19290 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase] INFO: update()
2024-02-15 14:23:22.688 19290-19290 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase] INFO: Skipping store.update() as the last call occurred less than store.minTimeBetweenUpdates millis ago.
2024-02-15 14:23:48.977 19290-19290 CdvPurchase             (packageName)               D  onStop()
2024-02-15 14:23:51.150 19290-19290 CdvPurchase             (packageName)               D  onStart()
2024-02-15 14:24:06.513 19290-19290 CdvPurchase             (packageName)               D  onStop()
---------------------------- PROCESS ENDED (19290) for package (packageName) ----------------------------
---------------------------- PROCESS STARTED (20100) for package (packageName) ----------------------------
2024-02-15 14:25:07.985 20100-20100 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 5421 - Msg: Create CdvPurchase...
2024-02-15 14:25:08.464 20100-20100 Capacitor/Console       (packageName)               I  File: http://localhost/main.b0c66957061bedce.js - Line 1 - Msg: Create CdvPurchase...
2024-02-15 14:25:08.635 20100-20100 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase] INFO: initialize(["android-playstore"]) v13.10.1
2024-02-15 14:25:08.636 20100-20100 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase.Adapters] INFO: Adding platforms: [{"platform":"android-playstore"}]
2024-02-15 14:25:08.636 20100-20100 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase.Adapters] INFO: 
2024-02-15 14:25:08.637 20100-20100 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase.Adapters] INFO: GooglePlay initializing...
2024-02-15 14:25:08.640 20100-20100 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase.GooglePlay] INFO: Initialize
2024-02-15 14:25:08.640 20100-20100 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase.GooglePlay.Bridge] INFO: setup ok
2024-02-15 14:25:08.651 20100-20172 CdvPurchase             (packageName)               D  sendToListener() -> ready
2024-02-15 14:25:08.651 20100-20172 CdvPurchase             (packageName)               D              data -> {}
2024-02-15 14:25:08.652 20100-20172 CdvPurchase             (packageName)               D  init()
2024-02-15 14:25:08.695 20100-20172 CdvPurchase             (packageName)               D  startServiceConnection()
2024-02-15 14:25:08.696 20100-20100 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase.GooglePlay.Bridge] INFO: listener: {"type":"ready","data":{}}
2024-02-15 14:25:08.744 20100-20220 CdvPurchase             (packageName)               D  startServiceConnection() -> Success
2024-02-15 14:25:08.744 20100-20220 CdvPurchase             (packageName)               D  init() -> Success
2024-02-15 14:25:08.765 20100-20100 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase.GooglePlay] DEBUG: Ready
2024-02-15 14:25:08.766 20100-20100 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase.Adapters] INFO: GooglePlay initialized. 
2024-02-15 14:25:08.767 20100-20100 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase.Adapters] INFO: GooglePlay products: [{"id":"(subscriptionProductId)","type":"paid subscription","platform":"android-playstore"}]
2024-02-15 14:25:08.767 20100-20100 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase.GooglePlay] DEBUG: Load: [{"id":"(subscriptionProductId)","type":"paid subscription","platform":"android-playstore"}]
2024-02-15 14:25:08.768 20100-20100 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase.GooglePlay] DEBUG: getAvailableProducts: [] | ["(subscriptionProductId)"]
2024-02-15 14:25:08.768 20100-20100 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase.GooglePlay.Bridge] INFO: getAvailableProducts()
2024-02-15 14:25:08.776 20100-20172 CdvPurchase             (packageName)               D  getAvailableProducts()
2024-02-15 14:25:08.777 20100-20172 CdvPurchase             (packageName)               D  queryAllProductDetails()
2024-02-15 14:25:08.777 20100-20172 CdvPurchase             (packageName)               D  queryAllProductDetails() -> Query SUBS.
2024-02-15 14:25:08.777 20100-20172 CdvPurchase             (packageName)               D  queryProductDetailsAsync()
2024-02-15 14:25:08.777 20100-20172 CdvPurchase             (packageName)               D  executeServiceRequest() -> OK
2024-02-15 14:25:08.777 20100-20172 CdvPurchase             (packageName)               D  queryProductDetailsAsync() -> Success
2024-02-15 14:25:08.794 20100-20221 CdvPurchase             (packageName)               D  queryAllProductDetails() -> ProductDetails: Title: (productDetails.Title)
2024-02-15 14:25:08.794 20100-20221 CdvPurchase             (packageName)               D  queryAllProductDetails() -> Calling listener.
2024-02-15 14:25:08.795 20100-20221 CdvPurchase             (packageName)               D  getAvailableProducts() -> productDetails: ProductDetails{jsonString='{"productId":"(subscriptionProductId)","type":"subs","title":"(productDetails.Title)","name":"(productDetails.Name)","description":"(productDetails.Description)","localizedIn":["de-DE"],"skuDetailsToken":"(skuDetailsToken)","subscriptionOfferDetails":[{"offerIdToken":"AUj\/(token)","basePlanId":"p1m","pricingPhases":[{"priceAmountMicros":(priceAmountMicros),"priceCurrencyCode":"EUR","formattedPrice":"(formattedPrice)","billingPeriod":"P1M","recurrenceMode":1}],"offerTags":[]}]}', parsedJson={"productId":"(subscriptionProductId)","type":"subs","title":"(productDetails.Title)","name":"(productDetails.Name)","description":"(productDetails.Description)","localizedIn":["de-DE"],"skuDetailsToken":"(skuDetailsToken)","subscriptionOfferDetails":[{"offerIdToken":"AUj\/(token)","basePlanId":"p1m","pricingPhases":[{"priceAmountMicros":(priceAmountMicros),"priceCurrencyCode":"EUR","formattedPrice":"(formattedPrice)","billingPeriod":"P1M","recurrenceMode":1}],"offerTags":[]}]}, productId='(subscriptionProductId)', productType='subs', title='(productDetails.Title)', productDetailsToken='(skuDetailsToken)', subscriptionOfferDetails=[com.android.billingclient.api.ProductDetails$SubscriptionOfferDetails@3001473]}
2024-02-15 14:25:08.795 20100-20221 CdvPurchase             (packageName)               D  getAvailableProducts() -> Success
2024-02-15 14:25:08.809 20100-20100 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase.GooglePlay] DEBUG: Loaded: [{"productId":"(subscriptionProductId)","title":"(productDetails.Title)","name":"(productDetails.Name)","description":"(productDetails.Description)","product_format":"v12.0","product_type":"subs","offers":[{"base_plan_id":"p1m","token":"AUj/(token)","tags":[],"pricing_phases":[{"billing_cycle_count":0,"billing_period":"P1M","formatted_price":"(formattedPrice)","price_amount_micros":(priceAmountMicros),"price_currency_code":"EUR","recurrence_mode":"INFINITE_RECURRING"}]}]}]
2024-02-15 14:25:08.811 20100-20100 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase.GooglePlay] DEBUG: getPurchases
2024-02-15 14:25:08.812 20100-20100 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase.GooglePlay.Bridge] INFO: getPurchases()
2024-02-15 14:25:08.825 20100-20172 CdvPurchase             (packageName)               D  getPurchases()
2024-02-15 14:25:08.825 20100-20172 CdvPurchase             (packageName)               D  queryPurchases()
2024-02-15 14:25:08.825 20100-20172 CdvPurchase             (packageName)               D  executeServiceRequest() -> OK
2024-02-15 14:25:08.834 20100-20223 CdvPurchase             (packageName)               I  queryPurchases(INAPP) -> Elapsed time: 9ms
2024-02-15 14:25:08.835 20100-20224 CdvPurchase             (packageName)               I  queryPurchases(SUBS) -> Elapsed time: 10ms
2024-02-15 14:25:08.835 20100-20224 CdvPurchase             (packageName)               D  sendToListener() -> setPurchases
2024-02-15 14:25:08.835 20100-20224 CdvPurchase             (packageName)               D              data -> {"purchases":[]}
2024-02-15 14:25:08.846 20100-20100 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase.GooglePlay.Bridge] INFO: listener: {"type":"setPurchases","data":{"purchases":[]}}
2024-02-15 14:25:08.847 20100-20100 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase.GooglePlay] DEBUG: onSetPurchases: []
2024-02-15 14:25:08.847 20100-20100 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase.GooglePlay] DEBUG: onPurchaseUpdated: 
2024-02-15 14:25:08.848 20100-20100 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase.AdapterListener] DEBUG: receiptsReady: android-playstore (1/0)
2024-02-15 14:25:08.848 20100-20100 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase.GooglePlay] DEBUG: getPurchases success
2024-02-15 14:25:08.849 20100-20100 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase.Adapters] INFO: GooglePlay products loaded: [{"className":"Product","title":"(productDetails.Name)","description":"(productDetails.Description)","platform":"android-playstore","type":"paid subscription","id":"(subscriptionProductId)","offers":[{"className":"Offer","id":"(subscriptionProductId)@p1m","pricingPhases":[{"price":"(formattedPrice)","priceMicros":(priceAmountMicros),"currency":"EUR","billingPeriod":"P1M","billingCycles":0,"recurrenceMode":"INFINITE_RECURRING","paymentMode":"PayAsYouGo"}],"productId":"(subscriptionProductId)","productType":"paid subscription","platform":"android-playstore","type":"subs","tags":[],"token":"AUj/(token)"}]}]
2024-02-15 14:25:08.852 20100-20100 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase.Adapters] INFO: GooglePlay receipts loaded: []
2024-02-15 14:25:08.853 20100-20100 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase.AdapterListener] DEBUG: setSupportedPlatforms: android-playstore (1 have their receipts ready)
2024-02-15 14:25:08.853 20100-20100 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase.AdapterListener] DEBUG: triggering receiptsReady()
2024-02-15 14:25:08.855 20100-20100 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase] DEBUG: Calling callback: type=productUpdated() name=#2e40b86ae7affc08c73ffa855e244ac8 reason=adapterListener_productsUpdated
2024-02-15 14:25:08.859 20100-20100 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase] DEBUG: Calling callback: type=ready() name=#44415f74d20cd54458293d42c72a2757 reason=initialize_promise_resolved
2024-02-15 14:25:08.862 20100-20100 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase] DEBUG: Calling callback: type=receiptsReady() name=receiptsMonitor_setup reason=adapterListener_setSupportedPlatforms
2024-02-15 14:25:08.863 20100-20100 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase.ReceiptsMonitor] DEBUG: receiptsReady...
2024-02-15 14:25:08.863 20100-20100 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase] DEBUG: Calling callback: type=receiptsReady() name=#aa550f4c9e622bcc8c6668113f96a3c9 reason=adapterListener_setSupportedPlatforms
2024-02-15 14:25:08.866 20100-20100 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase.ReceiptsMonitor] DEBUG: check(0/0)
2024-02-15 14:25:08.867 20100-20100 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase.ReceiptsMonitor] INFO: receiptsVerified()
2024-02-15 14:25:09.024 20100-20100 Capacitor/Console       (packageName)               I  File: http://localhost/ - Line 3812 - Msg: [CdvPurchase] DEBUG: Calling callback: type=receiptsVerified() name=#761002fa47d1fef246e14622bdeee32c reason=receipts_monitor_controller

Expected behavior

store.owned() should return false after the expiration date shown in Google Play has elapsed.

System Info

We are using capacitor v5 and cordova-plugin-purchase v13.10.1. We are not using the awesome-cordova-plugins wrapper.

We are currently only experiencing this issue only on Android as we are currently only using the plugin for Android, so I cannot make any statements about iOS. Is this an issue or did we forget something in our implementation?

Thank you for your help!

xbaldiq commented 7 months ago

i also have this issue, do you find any workaround @audvd2 ?