-
-
Notifications
You must be signed in to change notification settings - Fork 622
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
Concern regarding getAvailablePurchases()
#970
Comments
I would like to add couple of question. What if we don't use backend services for validation. how can I understand the subscription done and canceled by the user. how can I handle that?. |
Apple suggest strongly to use server validation because of risk of being hacked. I have wrote a backend API which takes the receipt of the user and verify that. If found no latest transaction, it means the user hasn't subscribed so I'm making that user a non-premium (or whatever you wish to do). I call this API at the opening of the App. My App checks daily. |
I am also seeing similar behaviour with The actual behaviour is after cancelling a subscription the I have no clue when the purchase is removed from results returned by |
@darriuk I just tested cancelling subscription and confirm that |
@vkachan as far as I recall the One update from me: I ran I'm going to try a declined subscription payment today and see how long it takes to be removed from the UPDATE |
Can confirm what @darriuk is saying. I've ran a test subscription it ended and then the subscription was still presented as active from |
Had similar issues, handling iap on the client side is a mess, now using react-native-iaphub. |
@tomerdev What has your experience been like with iaphub? I was thinking of moving over to using it but wanted to see what another dev thought of the product. |
@captaincole No issue using iaphub, implemented the library and made a sandbox purchase pretty fast. |
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. |
Version of react-native-iap
4.4.3
Version of react-native
0.61.6
Platforms you faced the error (IOS or Android or both?)
Android
Expected behavior
First of all, thanks for all the efforts you put to make and maintain this library, really appreciate it.
getAvailablePurchases()
should not return subscription that's canceled (not renewed)Actual behavior
in the test environment (using test account with test card), when i make subscriptions on my app and cancel the subscription before the
expiracytime
(5 minutes after purchase in the test account), my subscription won't be listed in the result ofgetAvailablePurchases()
when expiracytime is exceeded. Which is a desired behavior.However, if i let my subscription to renew (by not canceling before renew period), and then cancel it after that,
getAvailablePurchases()
would still list my subscription, even after expiracytime is exceeded. My question is, why does it still list subscription I no longer subscribed to?Also, I want to know the details regarding
getAvailablePurchases()
, does it make a call to google billing to retrieve available purchases? or does it keep the purchase list locally?test setting: https://developer.android.com/google/play/billing/billing_testing#testing-subscriptions
Tested environment (Emulator? Real Device?)
real device
Steps to reproduce the behavior
subscribe to a subscription, let it get renewed, then cancel. The subscription would still be listed as available purchases
The text was updated successfully, but these errors were encountered: