Skip to content
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

Help in Android subscription downgrade with DEFERRED mode #1936

Closed
JameDodgers opened this issue Sep 8, 2022 · 2 comments
Closed

Help in Android subscription downgrade with DEFERRED mode #1936

JameDodgers opened this issue Sep 8, 2022 · 2 comments

Comments

@JameDodgers
Copy link

Hello there,

Could you guys help me to understand what exactly should I do when trying to perform a subscription downgrade on Android? Currently when I call requestSubscription() with ProrationModesAndroid.DEFERRED my listener gives me the same purchase object that I'm downgrading from. If I try to call finishTransaction() upon that purchase it gives me the error "purchase is not suitable to be purchased".

Expected Behavior

Based on the discussions in #888, I believe that the value returned in currentPurchase would be null and I wouldn't need to handle it because the subscription change will be notified to my backend serve by the real-time developer notifications.

Thanks in advance.

Environment:

  • react-native-iap: 9.0.4
  • react-native: 0.66.4
@andresesfm
Copy link
Contributor

Correct, you can't finish that transaction on the client. Your backend will get the update and you have to acknowledge it there

@JameDodgers
Copy link
Author

JameDodgers commented Sep 9, 2022

@andresesfm But what should I do with the currentPurchase? Keep spamming my backend server with it? As my backend will receive the notification when the billing period ends, is there a way to know if a purchase is in this state to prevent sending it to my backend? Sorry if I was not clear

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants