in-app-purchase
in-app-purchase copied to clipboard
Sandbox mode for Unity IAP ??
Is there a way to test Unity IAP ??
There's not much about Unity in the doc. When I tried iap.validate(receipt) it always try to validate as Amazon. Until I realized you need to put iap.validate(iap.UNITY , .... ) but this is nowhere in the doc. I had to check the tests.
Now I'm wondering if there's a way to validate a fake receipt generated by the Unity editor. What i receive on my server console is: Parse Unity receipt as fake But then it goes to the error function.
Or how do I test the validation before going LIVE with my app ?
Hi, The documentation on Unity is somewhat lacking as you pointed out. I need to do better in that regard. Anyways, if you have Apple sandbox receipt, you can use that as Unity receipt as its payload to test the validation. You may do the same with google play as well. Cheers!
Thanks for your reply ! I'm not sure how to get a Google Play sandbox receipt. I tried the one in your test folder and it doesn't seem to work.
I would like to generate a sandbox receipt with my products ID. Unity generates a "fake" receipt when done from the editor.
What I get is that with the receipt from your test folder: {"error":{},"status":1,"message":"client_id, client_secret, access_token and refres_token should be provided"}
Maybe because the receipt is a subscription? maybe that not the sandbox receipt I'm looking for, I'm just looking for a consumable receipt example.
I don’t think you can create a fake receipt as all receipts are signed. Unless you recreate signing of your fake receipts the same way as google does, you will not be able to validate your fake receipts I’m afraid.