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

Returning expired / un-subscription old transaction receipt #1313

Closed igeeganage closed 3 years ago

igeeganage commented 3 years ago

Version of react-native-iap

"react-native-iap": "^5.2.0",

Version of react-native

node - v12.18.4 react-native: 0.62.2

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

IOS Android

Expected behavior

It should return the current subscribed receipt.

Actual behavior

In our app we have two type of subscriptions: Basic and Premium. When user upgrades or downgrades between the two subscription, I call getAvailablePurchases API. but it returns old and new subscriptions receipts (after it already cancel or expired). instead of giving me only the active subscription. How do we retrieve only the active subscription, the latest one that user updated.

Tested environment (Emulator? Real Device?)

Real Device

Steps to reproduce the behavior

TfADrama commented 3 years ago

use this method to get the current iOS receipt. It may help you. getReceiptIOS();

hyochan commented 3 years ago

Looks like this can go to discussion. Please post it there if you still need assistance.