-
-
Notifications
You must be signed in to change notification settings - Fork 655
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
purchaseUpdateListener is getting called multiple times in IOS #801
Comments
are there any pointers for the above mentioned issue? |
maybe |
ok i will try that but i am testing the in app purchase in sandbox environment .So when i am launching the app and before making any purchase it is calling the clearTransactionIOS() and is making the purchase which should not be the behaviour. Ideally only when the user makes the purchase the it should ask for the payment and make the purchase.So therefore i am not able to understand as to what i am doing wrong here. |
@anuragdwivedi29 if you did not finish transaction on app relaunch update listener will try automatically execute code inside. Also do not forgot this.yourListener.remove() on unmount... Maybe something of this you need. gl |
+1 |
This is happeening to me too. The difference is that I'm using the 3.2.3 version of RNIap. Any ideas? |
@nicolaswilliman @anuragdwivedi29 @mingxin-yang @franj0 one auto-renewable subscription makes 6 renew transactions on Sandbox Environment (on Production Environment, if a user that subscribes month plan re-payment after a month, the renew transaction will enter the purchaseUpdatedListener.) |
@bang9 Do you have a solution for this? I understand that the |
this is not above case |
Perhaps a way to handle resubscribe events would be to reference |
If believe it might be worth checking to see if a 'purchase button' has been pressed, and then processing with your normal purchase flow. Otherwise you will have to do some extra logic to handle these resubscribe events. |
I would suggest not deprecating I have experience of implementing iOS IAP subscription that, unexpected numbers of transactions coming. I understand there are condensed intervals for sandbox testing environment, just as @bang9 mentioned above, but it was not the case. It turned out that I implemented a mechanism similar to |
Hey there, it looks like there has been no activity on this issue recently. Has the issue been fixed, or does it still require the community's attention? This issue may be closed if no further activity occurs. You may also label this issue as "For Discussion" or "Good first issue" and I will leave it open. Thank you for your contributions. |
Closing this issue after a prolonged period of inactivity. If this issue is still present in the latest release, please feel free to create a new issue with up-to-date information. |
+1 |
Having the same issue on sandbox env. I'm not going to do something for this but calling my API like 10 times in a single go is not the way. Also server validates all receipts and thinks like i received 10 subscriptions. |
Same issue in sandbox, sending multiple receipts to the backend on a consumable purchase and all getting validated making multiple database entries. |
Hey, did you find any solution for this issue? |
What's the conclusion? I need a solution as I'm still encountering this issue on iOS.Please take a look at my implementation. 1. INIT IAP
2. Method to Request Subscription
3. Purchase Listener
|
Version of react-native-iap
4.0.4
Version of react-native
0.60.5
Platforms you faced the error (IOS or Android or both?)
IOS
Expected behavior
should be called when requestSubscription(subscriptionID) is called
Actual behavior
is getting called when the app loads for the very first time.Also when a subscription is bought it is getting called multiple times
Tested environment (Emulator? Real Device?)
Real Device (sandbox environment)
Steps to reproduce the behavior
The text was updated successfully, but these errors were encountered: