-
-
Notifications
You must be signed in to change notification settings - Fork 661
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Getting 21002 from Apple when verifying transactionReceipt #2436
Comments
same problem here @andresesfm |
Check the receipt is properly encoder in base 64 |
This is a value that is returned through this library. That is, we get it from the purchase parameter of |
@andresesfm Experiencing this same issue. The value in currentPurchase.transactionReceipt is malformed. We are receiving this value from the library itself, so it should be in proper Base64 format. I am currently using requestSubscription and then using currentPurchase to send a validation request to my apple sandbox /verifyRequest using transactionReceipt. My subscription plans are loaded from Storekit config. |
Look at ios/RNIapIos.swift:322. It is bein encoded there using |
Having the same issue. Value returned by this library and passed on to Apple as-is in the backend. |
Does anyone have the solution? I am stuck. |
I decided to change my implementation because of this. Now I am sending the appAccountToken which contains an uuid of the purchase to Apple and verifying that the purchase is successful by verifying that in the S2S payload. Not handling receipts at all. |
This is also happening to me, has anyone gotten a solution? @numsu do you have any details on how you were able to get that information? |
|
I was also facing the issue earlier but it was solved by making some changes to the way I was passing the parameter to the validateReceiptIos. before I was passing it as "RNIap.validateReceiptIos(receiptBody, true)". but now I have made the changes and called it like this "RNIap.validateReceiptIos({receiptBody: receiptBody, isTest: true})" and It started working properly . |
Sorry to bother @numsu but I cannot seem to get Apple Store Server Notifications. The server url never gets called, the setup is alright as i used the test endpoint and the notification arrived properly |
confirm the same issue "react-native-iap": "^12.12.2", |
confirm the same issue "react-native-iap": "^12.13.0", |
i think one of the reasons this issue is rising is because the docs are not giving the right suggestions.
and another issue is that the name of the functions in the docs is wrong, it took me hours to realize this. and another issue requestPurchaseWithQuantityIOS is undefined which i reported here |
Description
Getting
{ 'status': 21002 }
responses when calling/verifyReceipt
withtransactionReceipt
.Expected Behavior
/verifyReceipt
should work.Environment:
To Reproduce
Steps to reproduce the behavior:
The sequence flow I use is as follows:
requestSubscription
on button clickpurchaseUpdatedListener
gets triggered with apurchase
objectvalidateReceipt
which is a method that sends the following to my web server:/verifyReceipt
with the following request body:This worked until recently when I upgraded expo, react native and react-native-iap.
The text was updated successfully, but these errors were encountered: