Open ajouve opened 1 year ago
Found the solution, I had to call clearTransactionIOS
before purchase
Experiencing the same behavior.
Seems finishTransaction
doesn't do the job so transaction is not finished.
We do clearTransactionIOS
though but only when smth went wrong, which I assume correct usage of that method
Is this happening only on dev? if finish transaction is not working, please post what the method is returning or if an error is being thrown
following
It seems finishTransaction
not working in iOS.
iOS : 16 react-native-iap : 12.7.2 react-native: 0.68.2
<Button
title={`Consume all purchases`}
onPress={async () => {
// await deepLinkToSubscriptionsIos();
if (availablePurchases?.length > 0) {
availablePurchases.forEach(async (purchase: Purchase) => {
if (purchase.productId) {
try {
const result = await finishTransaction({
purchase,
isConsumable: true,
});
console.log(`purchase result`, result);
} catch (e) {
console.error(`purchase error!`, e);
}
}
});
}
}}
/>
By this, result
are true, but availablePurchases
are not cleared.
It seems
finishTransaction
not working in iOS.iOS : 16 react-native-iap : 12.7.2 react-native: 0.68.2
<Button title={`Consume all purchases`} onPress={async () => { // await deepLinkToSubscriptionsIos(); if (availablePurchases?.length > 0) { availablePurchases.forEach(async (purchase: Purchase) => { if (purchase.productId) { try { const result = await finishTransaction({ purchase, isConsumable: true, }); console.log(`purchase result`, result); } catch (e) { console.error(`purchase error!`, e); } } }); } }} />
By this,
result
are true, butavailablePurchases
are not cleared.
Same here. result
is true but when re-initializing IAP on next app start it will automatically purchase the subscription again (without even pressing any button, just because the currentPurchase Effect is triggered). Only on iOS. Android is totally fine and working.
Are you on StoreKit 1 or 2? Am seeing the same issue and could only solve it by moving to StoreKit 2.
Are you on StoreKit 1 or 2? Am seeing the same issue and could only solve it by moving to StoreKit 2.
SK1, probably need to upgrade yeah
https://github.com/dooboolab-community/react-native-iap/issues/2455 Can anyone please suggest on this issue Please ?
I am trying to implement a subscription on my app but, it worked great the first time, I called requestSubscription then purchaseUpdatedListener has been triggered.
But days after that, the sandbox subscription has expired and when I am calling requestSubscription then purchaseUpdatedListener is instantly triggered without asking me for the Apple Pay. The purchase variable from purchaseUpdatedListener is my old purchase which has been made days ago
When I verify the receipt from apple server using the /verifyReceipt endpoint the last expire date is 2023-01-22 18:58:28 Etc/GMT and when I am posting we are the 2023-01-25 so the subscription is expired
When I go in my phone parameters in the app store sandbox profile, I can activate again the subscription, but I would like to do it with requestSubscription, this is not really user-friendly to go into parameters, ... Should display the purchase dialog when trying to subscribe back
Environment:
To Reproduce