Issue: onPurchaseSuccess returns previous purchase objects and delays correct one during plan upgrade (iOS) #3052
Replies: 1 comment
-
Beta Was this translation helpful? Give feedback.
0 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Environment
react-native-iap^14.4.120.81.4useIAP()hook withonPurchaseSuccessandfinishTransactioncalled for every previous purchaseDescription
When upgrading from a monthly subscription to a yearly subscription (within the same subscription group), the
onPurchaseSuccesscallback is triggered with old purchase objects first, and the new purchase transaction takes 3–4 minutes to appear in the callback.Even though I’m calling:
for each previous transaction returned,
useIAP(or the underlying purchase listener) still emits the previous transaction events multiple times before finally emitting the correct upgraded subscription.Expected behavior
After calling
requestPurchasefor the upgrade:onPurchaseSuccessshould emit only the new transaction (the yearly plan).Actual behavior
On upgrade:
onPurchaseSuccessemits one or more previous (old plan) transactions again.finishTransaction.getActiveSubscriptions()also shows both old and new plans as active.Steps to reproduce
onPurchaseSuccessfires with the old monthly purchase first.Code snippet
Notes
Beta Was this translation helpful? Give feedback.
All reactions