{"id":"2022-06-21T04:42:57.198Z","value":"updated { id : 1MonthRecurring , alias : 1MonthRecurring , type : non consumable , group : 20959546 , state : owned , title : 1-Month Recurring Subscription , description : Monthly Recurring Subscription , priceMicros :9990000, price : $9.99 , currency : USD , countryCode : US , loaded :true, canPurchase :false, owned :true, introPrice :null, introPriceMicros :null, introPricePeriod :null, introPricePeriodUnit :null, introPricePaymentMode :null, ineligibleForIntroPrice :null, discounts :[], downloading :false, downloaded :false, additionalData :null, transaction :{ type : ios-appstore , id : 2000000084829744 , appStoreReceipt :
....
Now when I go to settings and sandbox account and cancel subscription I am not getting the cancelled callback.
Also I should get the refund callback. Although in settings screen I see that the subscription is not in owned state still the application shows OWNED.
I would want to know how can I get the cancelled and refunded callbacks
Code:
Include logs with store.verbosity = store.DEBUG
Expected behavior
Should get the callbacks for refund and cancel but not getting them.
Observed behavior
Hello, We are trying to incorporate in app purchase and we are not getting proper callbacks.
Overview: We are developing in app purchase in our hybrid application using IONIC. We have incorporated the plugin for In App Purchase:
• Device version iPhone 6s Plus • iOS version : iOS 15.5
Steps:
In mobile app I
Call OS ready function
Register the Product this.store.register({ id: this.PRODUCT_IOS_MONTHLY_RECURRING_ID, type: this.store.NON_CONSUMABLE });
Register the callbacks this.store.when(this.PRODUCT_IOS_MONTHLY_RECURRING_ID) .cancelled(this.purchaseCancelled) .updated(this.purchaseMonthlyUpdated) .approved(this.purchaseApproved) .verified(this.purchaseVerified) .refunded(this.purchaseRefunded) .owned(this.purchaseOwned);
Call Refresh
Now after this I am getting the data for this Product and I can call purchase.
{"id":"2022-06-21T04:42:53.592Z","value":"updated { id : 1MonthRecurring , alias : 1MonthRecurring , type : non consumable , group : 20959546 , state : registered , title : 1-Month Recurring Subscription , description : Monthly Recurring Subscription , priceMicros :9990000, price : $9.99 , currency : USD , countryCode : US , loaded :false, canPurchase :false, owned :false, introPrice :null, introPriceMicros :null, introPricePeriod :null, introPricePeriodUnit :null, introPricePaymentMode :null, ineligibleForIntroPrice :null, discounts :[], downloading :false, downloaded :false, additionalData :null, transaction :null, billingPeriod :1, billingPeriodUnit : Month }"}
After purchase it gives me owned state.
{"id":"2022-06-21T04:42:57.198Z","value":"updated { id : 1MonthRecurring , alias : 1MonthRecurring , type : non consumable , group : 20959546 , state : owned , title : 1-Month Recurring Subscription , description : Monthly Recurring Subscription , priceMicros :9990000, price : $9.99 , currency : USD , countryCode : US , loaded :true, canPurchase :false, owned :true, introPrice :null, introPriceMicros :null, introPricePeriod :null, introPricePeriodUnit :null, introPricePaymentMode :null, ineligibleForIntroPrice :null, discounts :[], downloading :false, downloaded :false, additionalData :null, transaction :{ type : ios-appstore , id : 2000000084829744 , appStoreReceipt : ....
Now when I go to settings and sandbox account and cancel subscription I am not getting the cancelled callback.
Also I should get the refund callback. Although in settings screen I see that the subscription is not in owned state still the application shows OWNED.
I would want to know how can I get the cancelled and refunded callbacks
Code: Include logs with
store.verbosity = store.DEBUG
Expected behavior
Should get the callbacks for refund and cancel but not getting them.
System Info
Output of
cordova info
.Cordova Packages:
Project Installed Platforms:
Project Installed Plugins:
Environment:
android Environment:
ios Environment:
Xcode 13.4.1 Build version 13F100
Project Setting Files:
<?xml version='1.0' encoding='utf-8'?>
--- Start of Cordova JSON Snippet --- { "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": {} }, "platforms": [ "browser", "ios", "android" ] } --- End of Cordova JSON Snippet ---