question

EVERYDAYiPLAY avatar image
EVERYDAYiPLAY asked

Failed to parse iap token

Hi, I am currently trying to implement Amazon in app purchases in our game. I am using the 1.0 plugin for unity. In order to test payments, i installed the Amazon App Tester, created a json file that will be used by this app for the tests, and implemented the purchase flow in the game. Everything is working fine, i receive the AmazonReceipt from AmazonIAPEventListener.purchaseSuccessfulEvent, so far it's good. We then need to verify those transaction. So i installed tomcat and setup RVSSandbox. Using the data from this receipt i make this call : http://localhost:8080/RVSSandbox/version/2.0/verify/developer/2:vXXXX==/user/o2PK3XppEMmkOIU2ur6-wlpemmrSpXXXXXmk76pbU=/purchaseToken/q1YqVrJSSs7P1UstSy2qTEmszCzISazUK0sv1yvITDXXXJRSgGqMDQxsLQ0MjCzXXXxNgKKlQLFcow9fMwjCgpcfTOK_N1d8kqLXXXXc8oK83OLgtPNCiXXXXzEzPMzXK8Qm2BWkqUrAxqAQ And i got this message : {"message":"Failed to parse iap token","status":false}. I saw in a previous thread that you said "Now, while integrating IAP in the app, i.e before the app is submitted with IAP integration, you are supposed to test IAPs with mock data in json file and SDK tester app (sand box testing). After you purchase an item in Sandbox, SDK tester would provide you a token what could be processed by RVSSandbox.war (RVS in sandbox)." But i am using the token returned by this app tester, don't know what to do to fix this.
iap
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

Sujoy@Amazon avatar image
Sujoy@Amazon answered
Since you are using the Unity plugin for IAP v1 SDK, you need to use the SDKTester app to do sandbox testing. You should be able to find the SDKTester APK in Apps-SDK zip in below location Android\InAppPurchasing\PreviousVersions\1.0\tools Amazon App Tester that you have installed from Amazon App Store provides sandbox environment for IAP V2 SDK. Please refer below link for more information on this. https://developer.amazon.com/public/solutions/platforms/webapps/docs/testing-iap.html#SDK%20Tester%20Environments Also we would encourage you to try out the newly introduced "Live App Testing" service to test your app and IAP purchases in LIVE environment. https://developer.amazon.com/public/resources/development-tools/live-app-testing
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.

dustyed avatar image
dustyed answered
I was also stuck trying to use App Tester With the unity plugin on 1.0 I had seen in the documentation on page the page https://developer.amazon.com/public/apis/earn/in-app-purchasing/docs/sdk-tester-deprecated it says "Unlike the SDK Tester, which is only compatible with IAP v1.0, App Tester is compatible with both v1.0 and v2.0 of IAP. To get started with App Tester, see Testing IAP 2.0." According to that I would have thought App tester would work.
10 |5000

Up to 2 attachments (including images) can be used with a maximum of 512.0 KiB each and 1.0 MiB total.