Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[IOS] redeem offer codes in the app is not triggering receipt validation flow #1623

Open
GeovanniChapman opened this issue Dec 22, 2024 · 0 comments

Comments

@GeovanniChapman
Copy link

When the Customers redeem offer codes in the app, once the payment is completed, the store.when() flow is not triggered so the receipt validation is not executed, the only way to process the payment is to close the app and open again.

Is there a way to send the receipt validation flow after a Customers redeem offer codes in the app?

window.CdvPurchase.store.getAdapter(window.CdvPurchase.Platform.APPLE_APPSTORE).presentCodeRedemptionSheet()

Observed behavior

[Log] [CdvPurchase.AppleAppStore.Bridge] DEBUG: setup ok (cordova.js, line 1413)
[Log] [CdvPurchase.AppleAppStore.Bridge] DEBUG: load ["item_apply_possible_audition_consumable","item_headshot_consumable","plan_artist_quarter","plan_artist_year"] (cordova.js, line 1413)
[Log] [CdvPurchase.AppleAppStore.Bridge] DEBUG: processing pending transactions (cordova.js, line 1413)
[Log] [CdvPurchase.AppleAppStore] DEBUG: loading appstore receipt... (cordova.js, line 1413)
[Log] [CdvPurchase.AppleAppStore.Bridge] DEBUG: loading appStoreReceipt (cordova.js, line 1413)
[Log] [CdvPurchase.AppleAppStore.Bridge] DEBUG: infoPlist: com.audicioneslatinas.auditionify.app,0.0.87,0,???? (cordova.js, line 1413)
[Log] [CdvPurchase.AppleAppStore] DEBUG: appstore receipt loaded (cordova.js, line 1413)
[Log] [CdvPurchase.AdapterListener] DEBUG: receiptsReady: ios-appstore (1/0) (cordova.js, line 1413)
[Log] [CdvPurchase.AppleAppStore] DEBUG: receipt updated. (cordova.js, line 1413)
[Log] [CdvPurchase.AdapterListener] DEBUG: receiptsUpdated: [{"className":"Receipt","transactions":[],"platform":"ios-appstore"}] (cordova.js, line 1413)
[Log] [CdvPurchase.AppleAppStore.Bridge] DEBUG: load ok: { valid:[{"id":"item_headshot_consumable","description":"Buy a slot to upload a professional Headshot","introPrice":null,"introPricePaymentMode":null,"billingPeriodUnit":"Day","countryCode":"US","introPricePeriodUnit":null,"discounts":[],"title":"Headshot","price":"$1.99","billingPeriod":0,"group":null,"priceMicros":1990000,"currency":"USD","introPricePeriod":null,"introPriceMicros":null},{"id":"plan_artist_year","description":"Unlimited access to all auditions.","introPrice":null,"introPricePaymentMode":null,"billingPeriodUnit":"Year","countryCode":"US","introPricePeriodUnit":null,"discounts":[],"title":"Annual plan","price":"$79.99","billingPeriod":1,"group":"21499244","priceMicros":79990000,"currency":"USD","introPricePeriod":null,"introPriceMicros":null},{"id":"plan_artist_quarter","description":"Unlimited access to all auditions.","introPrice":null,"introPricePaymentMode":null,"billingPeriodUnit":"Month","countryCode":"US","introPricePeriodUnit":null,"discounts":[],"title":"Quarterly Plan","price":"$24.99","billingPeriod":3,"group":"21499244","priceMicros":24990000,"currency":"USD","introPricePeriod":null,"introPriceMicros":null},{"id":"item_apply_possible_audition_consumable","description":"Buy a slot to apply for an audition","introPrice":null,"introPricePaymentMode":null,"billingPeriodUnit":"Day","countryCode":"US","introPricePeriodUnit":null,"discounts":[],"title":"Apply to audition","price":"$2.99","billingPeriod":0,"group":null,"priceMicros":2990000,"currency":"USD","introPricePeriod":null,"introPriceMicros":null}] invalid:[] } (cordova.js, line 1413)
[Log] [CdvPurchase.AppleAppStore] DEBUG: load eligibility: [{"id":"item_headshot_consumable","description":"Buy a slot to upload a professional Headshot","introPrice":null,"introPricePaymentMode":null,"billingPeriodUnit":"Day","countryCode":"US","introPricePeriodUnit":null,"discounts":[],"title":"Headshot","price":"$1.99","billingPeriod":0,"group":null,"priceMicros":1990000,"currency":"USD","introPricePeriod":null,"introPriceMicros":null},{"id":"plan_artist_year","description":"Unlimited access to all auditions.","introPrice":null,"introPricePaymentMode":null,"billingPeriodUnit":"Year","countryCode":"US","introPricePeriodUnit":null,"discounts":[],"title":"Annual plan","price":"$79.99","billingPeriod":1,"group":"21499244","priceMicros":79990000,"currency":"USD","introPricePeriod":null,"introPriceMicros":null},{"id":"plan_artist_quarter","description":"Unlimited access to all auditions.","introPrice":null,"introPricePaymentMode":null,"billingPeriodUnit":"Month","countryCode":"US","introPricePeriodUnit":null,"discounts":[],"title":"Quarterly Plan","price":"$24.99","billingPeriod":3,"group":"21499244","priceMicros":24990000,"currency":"USD","introPricePeriod":null,"introPriceMicros":null},{"id":"item_apply_possible_audition_consumable","description":"Buy a slot to apply for an audition","introPrice":null,"introPricePaymentMode":null,"billingPeriodUnit":"Day","countryCode":"US","introPricePeriodUnit":null,"discounts":[],"title":"Apply to audition","price":"$2.99","billingPeriod":0,"group":null,"priceMicros":2990000,"currency":"USD","introPricePeriod":null,"introPriceMicros":null}] (cordova.js, line 1413)
[Log] [CdvPurchase.AppleAppStore] DEBUG: No discount eligibility determiner, skipping... (cordova.js, line 1413)
[Log] [CdvPurchase.AppleAppStore] DEBUG: item_apply_possible_audition_consumable is valid: {"id":"item_apply_possible_audition_consumable","description":"Buy a slot to apply for an audition","introPrice":null,"introPricePaymentMode":null,"billingPeriodUnit":"Day","countryCode":"US","introPricePeriodUnit":null,"discounts":[],"title":"Apply to audition","price":"$2.99","billingPeriod":0,"group":null,"priceMicros":2990000,"currency":"USD","introPricePeriod":null,"introPriceMicros":null} (cordova.js, line 1413)
[Log] [CdvPurchase.AppleAppStore] DEBUG: registering new product (cordova.js, line 1413)
[Log] [CdvPurchase.AppleAppStore] DEBUG: item_headshot_consumable is valid: {"id":"item_headshot_consumable","description":"Buy a slot to upload a professional Headshot","introPrice":null,"introPricePaymentMode":null,"billingPeriodUnit":"Day","countryCode":"US","introPricePeriodUnit":null,"discounts":[],"title":"Headshot","price":"$1.99","billingPeriod":0,"group":null,"priceMicros":1990000,"currency":"USD","introPricePeriod":null,"introPriceMicros":null} (cordova.js, line 1413)
[Log] [CdvPurchase.AppleAppStore] DEBUG: registering new product (cordova.js, line 1413)
[Log] [CdvPurchase.AppleAppStore] DEBUG: plan_artist_quarter is valid: {"id":"plan_artist_quarter","description":"Unlimited access to all auditions.","introPrice":null,"introPricePaymentMode":null,"billingPeriodUnit":"Month","countryCode":"US","introPricePeriodUnit":null,"discounts":[],"title":"Quarterly Plan","price":"$24.99","billingPeriod":3,"group":"21499244","priceMicros":24990000,"currency":"USD","introPricePeriod":null,"introPriceMicros":null} (cordova.js, line 1413)
[Log] [CdvPurchase.AppleAppStore] DEBUG: registering new product (cordova.js, line 1413)
[Log] [CdvPurchase.AppleAppStore] DEBUG: plan_artist_year is valid: {"id":"plan_artist_year","description":"Unlimited access to all auditions.","introPrice":null,"introPricePaymentMode":null,"billingPeriodUnit":"Year","countryCode":"US","introPricePeriodUnit":null,"discounts":[],"title":"Annual plan","price":"$79.99","billingPeriod":1,"group":"21499244","priceMicros":79990000,"currency":"USD","introPricePeriod":null,"introPriceMicros":null} (cordova.js, line 1413)
[Log] [CdvPurchase.AppleAppStore] DEBUG: registering new product (cordova.js, line 1413)
[Log] [CdvPurchase.AppleAppStore] DEBUG: Products loaded: [{"className":"Product","title":"Apply to audition","description":"Buy a slot to apply for an audition","platform":"ios-appstore","type":"consumable","id":"item_apply_possible_audition_consumable","offers":[{"className":"Offer","id":"$","pricingPhases":[{"price":"$2.99","priceMicros":2990000,"currency":"USD","paymentMode":"UpFront","recurrenceMode":"NON_RECURRING"}],"productId":"item_apply_possible_audition_consumable","productType":"consumable","platform":"ios-appstore","offerType":"Default"}],"raw":{"id":"item_apply_possible_audition_consumable","description":"Buy a slot to apply for an audition","introPrice":null,"introPricePaymentMode":null,"billingPeriodUnit":"Day","countryCode":"US","introPricePeriodUnit":null,"discounts":[],"title":"Apply to audition","price":"$2.99","billingPeriod":0,"group":null,"priceMicros":2990000,"currency":"USD","introPricePeriod":null,"introPriceMicros":null},"countryCode":"US"},{"className":"Product","title":"Headshot","description":"Buy a slot to upload a professional Headshot","platform":"ios-appstore","type":"consumable","id":"item_headshot_consumable","offers":[{"className":"Offer","id":"$","pricingPhases":[{"price":"$1.99","priceMicros":1990000,"currency":"USD","paymentMode":"UpFront","recurrenceMode":"NON_RECURRING"}],"productId":"item_headshot_consumable","productType":"consumable","platform":"ios-appstore","offerType":"Default"}],"raw":{"id":"item_headshot_consumable","description":"Buy a slot to upload a professional Headshot","introPrice":null,"introPricePaymentMode":null,"billingPeriodUnit":"Day","countryCode":"US","introPricePeriodUnit":null,"discounts":[],"title":"Headshot","price":"$1.99","billingPeriod":0,"group":null,"priceMicros":1990000,"currency":"USD","introPricePeriod":null,"introPriceMicros":null},"countryCode":"US"},{"className":"Product","title":"Quarterly Plan","description":"Unlimited access to all auditions.","platform":"ios-appstore","type":"paid subscription","id":"plan_artist_quarter","group":"21499244","offers":[{"className":"Offer","id":"$","pricingPhases":[{"price":"$24.99","priceMicros":24990000,"currency":"USD","billingPeriod":"P3M","paymentMode":"PayAsYouGo","recurrenceMode":"INFINITE_RECURRING"}],"productId":"plan_artist_quarter","productType":"paid subscription","productGroup":"21499244","platform":"ios-appstore","offerType":"Default"}],"raw":{"id":"plan_artist_quarter","description":"Unlimited access to all auditions.","introPrice":null,"introPricePaymentMode":null,"billingPeriodUnit":"Month","countryCode":"US","introPricePeriodUnit":null,"discounts":[],"title":"Quarterly Plan","price":"$24.99","billingPeriod":3,"group":"21499244","priceMicros":24990000,"currency":"USD","introPricePeriod":null,"introPriceMicros":null},"countryCode":"US"},{"className":"Product","title":"Annual plan","description":"Unlimited access to all auditions.","platform":"ios-appstore","type":"paid subscription","id":"plan_artist_year","group":"21499244","offers":[{"className":"Offer","id":"$","pricingPhases":[{"price":"$79.99","priceMicros":79990000,"currency":"USD","billingPeriod":"P1Y","paymentMode":"PayAsYouGo","recurrenceMode":"INFINITE_RECURRING"}],"productId":"plan_artist_year","productType":"paid subscription","productGroup":"21499244","platform":"ios-appstore","offerType":"Default"}],"raw":{"id":"plan_artist_year","description":"Unlimited access to all auditions.","introPrice":null,"introPricePaymentMode":null,"billingPeriodUnit":"Year","countryCode":"US","introPricePeriodUnit":null,"discounts":[],"title":"Annual plan","price":"$79.99","billingPeriod":1,"group":"21499244","priceMicros":79990000,"currency":"USD","introPricePeriod":null,"introPriceMicros":null},"countryCode":"US"}] (cordova.js, line 1413)
[Log] [CdvPurchase.AdapterListener] DEBUG: setSupportedPlatforms: ios-appstore (1 have their receipts ready) (cordova.js, line 1413)
[Log] [CdvPurchase.AdapterListener] DEBUG: triggering receiptsReady() (cordova.js, line 1413)
[Log] [CdvPurchase] DEBUG: Calling callback: type=receiptsReady() name=receiptsMonitor_setup reason=adapterListener_setSupportedPlatforms (cordova.js, line 1413)
[Log] [CdvPurchase.ReceiptsMonitor] DEBUG: receiptsReady... (cordova.js, line 1413)

Expected behavior

The plugin should start receipts validation flow after customers redeem offer codes and complete the payment

System Info

Output of cordova info.

Plugin version: v13.11.1

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant