Closed leelaprasadsahu22 closed 3 years ago
Might take a while
I have the same issue. I've done both subscriptions and purchases of consumable products, and never get any callbacks. I'm on react-native-iap 5.0.0 (tried with 4.6.1 and same issue)
+1
Update listener is called on first time when call this method if you don't clear Transaction then 2nd time it's not being called. Clear Transaction in iOS case when first time update listener is called in purchaseUpdatedListener() like below
purchaseUpdateSubscription = purchaseUpdatedListener( async (purchase: InAppPurchase | SubscriptionPurchase) => {
const receipt = purchase.transactionReceipt;
if (receipt) {
try {
if (Platform.OS === 'ios') {
finishTransactionIOS(purchase.transactionId ?? "");
} else if (Platform.OS === 'android') {
If consumable (can be purchased again)
// consumePurchaseAndroid(purchase.purchaseToken);
// // If not consumable
// acknowledgePurchaseAndroid(purchase.purchaseToken);
}
const ackResult = await finishTransaction(purchase);
} catch (ackErr) {
console.warn('ackErr', ackErr);
}
}
},
);
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.5.0
Version of react-native 0.62.2
Platforms you faced the error (IOS or Android or both?) IOS
Expected behavior Should get callback after subscribe any plan
Actual behavior Not getting callback from IAP after successfully subscribed any plan
Tested environment (Emulator? Real Device?) device
Steps to reproduce the behavior Just follow the code Integrate the plugin as per document and subscribe any plan in ios device