Hi all, I'm developing a RVS Service for our amazon purchasing. The problem is, the code works fine for amazon purchaseToken - which has provided for test only- but when I use the purchaseToken which I got from Testing SDK and pass them to Sandbox, I get HTTP 400 as response. If I use amazon PurchaseToken instead, I get HTTP 498 which points an invalid token. The 400 remains the same for all SDK's tokens. I've founded that all of them have one back-slash inside '\' and if I delete it that, the response changes to 498 but it won't be changed if you add more '/' inside the purchase token. Unfortunately Sandbox couldn't check UserID and DeveloperKey and also it unables to renew the token as well. I've tried all the conditions to get the Http 200 response but I haven't got it yet! The SDK's tokens are much smaller than amazon's token, as far as I understand. Cheers and looking for your responses... Amin.
I all, I have the same problem. Two request about this: 1)The RVS Sand Box doesn't support the renew request and for the validate request can answer with 200 or 498 only. Is it true ? 2)I try to perform a request with a purchase token created by SDK Tester. This token contain chars '\'. This char is not premitted in URL query String. Should I Url encode the string ? Should I base 64 encode the String ? I tried the two encodig schemes but the result is the same: 400. These are my test urls: 1)purchase token encoded in Base 64: http://xx.xx.xx.xxx:xxxx/amazonsandbox/version/2.0/verify/developer/2:b3kfcPph4X1Nasd_uVnfKxsz6jDBuwWVN36bCjRL-EeN5SRK886g5YMjmKoXNXlu:Io8uY_cMpsqFSqosuSzkFw==/user/DefaultTestUser/purchaseToken/ZXlKMGVYQmxJam9pVTFWQ1UwTlNTVkJVU1U5T0lpd2ljMnQxSWpvaVUyVnlhV1VnUVNCVVNVMGlMQ0p6ZEdGeWRFUmhkR1VpT2pFelxuTlRJek1EQTRPVGN3TURaOVxu 2)purchase token urlEncoded (UTF-8): http://xx.xx.xx.xxx:xxxx/amazonsandbox/version/2.0/verify/developer/2:b3kfcPxyuX1Nc8x_uVnfKxsz6jDBuwWVN36bCjRL-EeN5SRK886g5YMjmKoXNXlu:Io8uY_cMpsqFSqosuSzkFw==/user/DefaultTestUser/purchaseToken/eyJ0eXBlIjoiU1VCU0NSSVBUSU9OIiwic2t1IjoiU2VyaWUgQSBUSU0iLCJzdGFydERhdGUiOjEz%5CnNTIzMDA4OTcwMDZ9%5Cn Any ideas ? Thank you Alessandro
Hi Alessandro, Please find answers below for your questions, 1) Yeah, RVS sandbox doesn't support renew request. It supports only "verify" API and will only respond with HTTP200 or HTTP498 response codes. 2) Actually there shouldn't be any "\" chars in the purchase token, but there is a bug where "\n" char is appended to end of the purchase token. Please remove that char and every thing will work fine. We are working towards a fix for this bug. Please stay tuned for updates on this. Hope this info helps. Thank you.
Thanks for your answer Samuel. The char '\n' isn't in the end on purchaseToken only, but also in the middle of the string. This is my example: eyJ0eXBlIjoiU1VCU0NSSVBUSU9OIiwic2t1IjoiU2VyaWUgQSBUSU0iLCJzdGFydERhdGUiOjEz[b]\n[/b]NTIzMDA4OTcwMDZ9[b]\n[/b] Should I remove the '\n' char also in the middle of the purchaseToken other than at the end as you suggest me in your workaround ? Thank you very much Alessandro
I'm actually having a similar problem. With \n's we get HTTP 400. Removing the \n's we get HTTP 498. And you never addressed whether or not the data should be urlencoded. I presume it should be, as is the custom. Lastly, should we be putting this sensitive data in a POST body instead of url parameters?