-
Notifications
You must be signed in to change notification settings - Fork 81
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
purchaseSubscriptionOption uses incorrect/old UpgradeInfo.oldSKU field and fails to upgrade Android subscription #763
Comments
👀 We've just linked this issue to our internal tracker and notified the team. Thank you for reporting, we're checking this out! |
Thanks for reporting and debugging @Markario. You're correct, that method is incorrectly parsing the old product identifier. We will release a fix for this issue soon. |
As reported in #763, we were using the `oldSKU` for google upgrades but the typescript interface only accepts `oldProductIdentifier` in the `purchaseSubscriptionOption` method. This makes sure all purchase methods have the same logic. Note that `purchaseSubscriptionOption` didn't exist before V5, but since some developers might have worked around the issue by using `oldSKU`, I think it's better to support that and avoid breaking their fixes.
Also found this issue to break our android upgrade flow |
Sorry we forgot to update the issue here. A fix for this was released in 7.3.0. Please let us know if that solved your issue @Markario. @ColeTownsend could you confirm what version you're using to confirm it's not the same error? |
We are using 7.5.1, we had to change what values we were sending in the makePurchase function to include the new GoogleProductChange value in addition to the deprecated UpgradeInfo. Wasn't sure if this was fixed/closed |
Describe the bug
Calling purchaseSubscriptionOption with a GoogleProductChangeInfo argument fails to upgrade a subscription (adds a new subscription instead). The issue is that the implementation in the Android RNPurchasesModule uses the
oldSKU
field from the old UpgradeInfo instead of the typedoldProductIdentifier
in GoogleProductChangeInfo. As a workaround I added oldSKU to the googleProductChangeInfo argument as well.purchaseSubscriptionOption implementation that checks for
oldSKU
instead ofoldProductIdentifier
react-native-purchases/android/src/main/java/com/revenuecat/purchases/react/RNPurchasesModule.java
Lines 209 to 216 in 93ef699
purchaseSubscriptionOption typed with GoogleProductChangeInfo
react-native-purchases/src/purchases.ts
Lines 476 to 480 in 93ef699
Same issue in the community https://community.revenuecat.com/sdks-51/reactnative-sdk-purchasesubscriptionoption-not-applying-proration-and-oldproductidentifier-3520
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: