You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
After calling requestSubscription and successfully completing a payment, the purchaseUpdatedListener is triggered twice with a transaction that has the same transactionId but different verificationResultIOS. I decoded verificationResultIOS and found that only the fields deviceVerification, deviceVerificationNonce, and signedDate are different.
I also debugged the native part of the code and discovered that:
The first call to purchaseUpdatedListener is triggered by the native method buyProduct, which executes self.sendEvent?("purchase-updated", serialize(transaction, verification)). This directly triggers purchaseUpdatedListener()
The second call to purchaseUpdatedListener is triggered by the native method listenForTransactions, which also executes self.sendEvent?("purchase-updated", serialize(transaction, result)). This directly triggers purchaseUpdatedListener()
Both the first and second calls successfully execute finishTransaction.
Expected Behavior
I expect that for a single purchase, the purchaseUpdatedListener method will be triggered only once.
Environment:
react-native-iap: 12.15.7
react-native: 0.74.5
Platforms: iOS, device, sandbox, storekit 2
The text was updated successfully, but these errors were encountered:
Description
After calling requestSubscription and successfully completing a payment, the purchaseUpdatedListener is triggered twice with a transaction that has the same transactionId but different verificationResultIOS. I decoded verificationResultIOS and found that only the fields deviceVerification, deviceVerificationNonce, and signedDate are different.
I also debugged the native part of the code and discovered that:
The first call to purchaseUpdatedListener is triggered by the native method buyProduct, which executes self.sendEvent?("purchase-updated", serialize(transaction, verification)). This directly triggers purchaseUpdatedListener()
The second call to purchaseUpdatedListener is triggered by the native method listenForTransactions, which also executes self.sendEvent?("purchase-updated", serialize(transaction, result)). This directly triggers purchaseUpdatedListener()
Both the first and second calls successfully execute finishTransaction.
Expected Behavior
I expect that for a single purchase, the purchaseUpdatedListener method will be triggered only once.
Environment:
The text was updated successfully, but these errors were encountered: