Wednesday 7 June 2017

Verifying AppStore IAP receipt with own server: keep getting Status 21002

I'm trying to verify the receipt for an in app purchase with my own node server. I used the information available on this page: https://developer.apple.com/library/content/releasenotes/General/ValidateAppStoreReceipt/Chapters/ValidateRemotely.html

I send the receipt-data in a base64 encoded string as the value of the key receipt data. But everytime I get the Status 21002 which means that the receipt-data property if malformed or missing.

Im using the request module for node to send the request and this is what my code looks like:

var payload = {
"receipt-data":receipt_data,
"password":password
}

request.post(
    config.appStoreReceiptVerificationUrl,
    {
        form:payload
    },
    function(err, response, data_str)
    {// handle response here}

This is the data in the receipt_data variable: http://textuploader.com/d0tup

What could be the problem?



via Aymen Rizwan

No comments:

Post a Comment