dooboolab-community / react-native-iap

In App Purchase module for React Native!
https://react-native-iap.dooboolab.com
MIT License
2.75k stars 632 forks source link

purchaseUpdatedListener is always called at start-up (Amazon) #1221

Closed avoloshko closed 3 years ago

avoloshko commented 3 years ago

Version of react-native-iap

5.2.0

Version of react-native

0.63.3

Platforms you faced the error (IOS or Android or both?)

Android

Expected behavior

purchaseUpdatedListener should only be called when a user subscribes for in-app subscriptions

Actual behavior

purchaseUpdatedListener is called at start up (once the listener is registered)

Tested environment (Emulator? Real Device?)

Real device, GalaxyS9, Android 10

Steps to reproduce the behavior

hyochan commented 3 years ago

@iaphub Do you have any idea with this?

iaphub commented 3 years ago

I don't see the issue, don't think we should prevent amazon from triggering a receipt, we're just a wrapper around the library.

stale[bot] commented 3 years ago

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.

andresesfm commented 3 years ago

This works as designed, please see the SDK's documentation here: https://developer.amazon.com/docs/in-app-purchasing/iap-implement-iap.html#3-get-user-information in your code you can decide when/if you want to trigger some logic on the purchase listener. Closing for now, feel free to reopen if more information