Payment queue not receiving updated transaction after accepting T&C’s in sandbox
Originator: | maddie | ||
Number: | rdar://FB9606736 | Date Originated: | 09/07/2021 |
Status: | Open | Resolved: | No |
Product: | StoreKit | Product Version: | 2 |
Classification: | idk | Reproducible: | yes |
We are testing an interrupted purchase (steps described here: https://developer.apple.com/documentation/storekit/original_api_for_in-app_purchase/testing_in-app_purchases_with_sandbox/testing_an_interrupted_purchase) in sandbox by forcing a Terms & Conditions popup. Upon accepting the new terms, we expect the StoreKit payment queue to receive a “Purchased” transaction. We don’t receive any updated transactions in the queue. This results in a confusing experience for the user, wherein content is not unlocked after paying for it. Please list the steps you took to reproduce the issue: 1. Launch sample app (https://github.com/RevenueCat/purchases-ios/tree/main/Examples/MagicWeather), logged into brand new Sandbox account with interrupt purchases turned on 2. Click to purchase subscription 3. Observe that payment queue receives a transaction with state “Purchasing” 4. Sign-in successfully, see checkmark for purchase completion(?) 5. View conditions have changed popup, click OK 6. Observe that payment queue receives transaction with state “Failed” 7. Observe that we call finishTransaction() 8. Click agree on Terms and Conditions popup 9. See “You’re all set, purchase was successful” popup and click OK 10. Wait a bit, observe that nothing comes into the payment queue 11. Check manage subs in phone settings -> see that subscription is active (note that this also backgrounds the app) 12. Re-foreground app 13. Observe that payment queue receives updated transaction with state “Purchased” What did you expect to happen? After step 9, we expect to get a “Purchased” updated transaction in the queue, as described here in the documentation’s step 10: https://developer.apple.com/documentation/storekit/original_api_for_in-app_purchase/testing_in-app_purchases_with_sandbox/testing_an_interrupted_purchase. What actually happened? We didn’t receive an updated transaction in the queue until we backgrounded and foregrounded the app. We were also able to trigger the updated transaction in the queue by attempting to repurchase (and getting the “you’re already subscribed” popup).
Comments
Please note: Reports posted here will not necessarily be seen by Apple. All problems should be submitted at bugreport.apple.com before they are posted here. Please only post information for Radars that you have filed yourself, and please do not include Apple confidential information in your posts. Thank you!