IAP receipt is not base64 encoded.
I'm using Unity 5.3 built-in IAP service, and testing it on iOS. When purchasing success, I can get receipt from UnityEngine.Purchasing.Product.receipt .
It looks like this: {"Store":"AppleAppStore","TransactionID":"1000000186798000","Payload":"MIIT4AYJKoZIhvcNAQcCoIIT0TCC..."}
From doc: http://docs.unity3d.com/Manual/UnityIAPPurchaseReceipts.html "Payload" should be base64 encoded on iOS > 7.0, but it's not, I tried to decode it, it's ASN.1 encoded.
Why it's not base64 encoded, where am I wrong?
Answer by Banderous · Feb 08, 2016 at 01:07 PM
Base64 encodes binary, which is itself in ASN.1 format.
Hi I want to verify the iOS receipt from my server, how can i get the correct receipt info form the payload string?
This payload string is a formatted correct receipt, you can send it whole to apple to verify.