4.4.8
0.61.5
IOS
I click in the purchase button and I getting the error is undefined finishTransactionIOS method give me an error (undefined/null).
I send finishtransaction this Purchase Object
I send finishTransactionIOS this purchase.transactionId
all ready send but response was (undefined/null).

Real Device (I am Using IphoneX)
@hyochan Can you please help me?
Can you share your code snippet?
I guess I've faced something like this, and want to be sure if it related or not on my issue #1020
It looks like you didn't use a promise?
You should use await when calling finishTransaction
@Mitdd9707 Can this be closed? I think you should share some of your code.
I am having the same issue, this is the code I used.
purchaseUpdateSubscription = RNIap.purchaseUpdatedListener(
async (purchase) => {
console.log(purchase);
const receipt = purchase.transactionReceipt;
if (receipt) {
try {
const ackResult = await RNIap.finishTransaction(purchase);
console.log('ackResult', ackResult);
} catch (ackErr) {
console.warn('ackErr', ackErr);
}
Alert.alert('purchase error', JSON.stringify(receipt));
}
},
);
Do we have an update on this???
Closes via #1160
Most helpful comment