Closed PTechK closed 6 years ago
It depends on whether you'd like to use your own server for validation or not. Check out this great tutorial, but be advised that there is a lot to be done.
@PTechK We had the same issue. Do you have a solution for this? @petarov We did validation locally using ajax method. We are receiving the status 21002 as the response from the validator. Can you please advice us how to proceed on this?
@hariharanhs I wouldn't verify a purchase only on the client side, because its prone to hacking. You will also be distributing the iTunes password with your app, which in the case with cordova apps, may easily be extracted.
The 21002
seems to come from a problem in the receipt-data
field of the JSON payload you are sending to the iTunes servers. Check out the Apple docs for more info.
See https://github.com/j3k0/cordova-plugin-purchase/issues/640
You need to use a Validation Service as backend, where you call against. And also to receive Apple Notifications.
First of all, I really appreciate your efforts and hard work in development of this plugin. I am able to make the purchase work for iOS devices.
I am sorry but I am not clear about the implementation of a method to validate subscription i.e. to find out if a product subscription has expired or not.
My question is here how do I know if purchase has expired and where do I get the error codes.
I am not clear about the mistake that I might be doing.
To validate a purchase in test flight env, I am doing the following:
Please guide what is wrong in this implementation or how it should be ideally implemented. Thanks for all your efforts again.