Hi again,
I'm back with more information but no solution yet unfortunately...
I did a production payment and a testing payment of the same in-app item and captured the tickets returned by the IAP API. It turned out that if I use the Purchase Verification Request Test Tool both tickets (testing and production) verify just fine.
However if I try to verify them using python or curl I still get an error but only with the production ticket. Here are the tickets for you to reproduce this issue.
Testing ticket
Code:
content=<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<PurchaseVerificationRequest xmlns="http://payment.ovi.com/iap">
<Binary>PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9InllcyI/PjxQdXJjaGFzZVRpY2tldCBzaWduYXR1cmU9ImE4NGE0YTQzY2NkYjhjNzViZGU5M2FkMzkzNzBjNTIxZWI3NjU0ZjYiIGltc2k9IjY2YmIwMjBhZmUwNGUwYmE5YjJhMzk0NTc5YzU0OGM4NmExNjkxNmJlZWViZmYwZjVmOGYzNGE1ZDBhOGZmY2ZlYTE5YTY4YmMzNmMxMzYxM2I3OTFjMmNiNDgwMTBhMTEwYTNjMjEzM2JlMjY3NDBlOTcyZjEwZjNkODI0NjVmIiBpbWVpPSJmNzY4OTdhNWEzNTcxZDc5NWZmODIwYzg2YTZjNmIyNzM5N2MwODg2ZGEzZTU1YzE4Nzc5NzMxZmE4ZTBkNjZkMDcyODNhMjQ3MTJhY2ZkMDc1YWQ3MWZlZGJlYzk3YzBlOTcyMjMyZTNjYjEwOGEwZjRkYWI2NTFiYWY2NDcyMCIgYWNjb3VudElkPSJmZjIwNjBkNDAxY2IxOTlhYjMwYWViNjQ2ZDUzMDZhZTg4ODYzNmU0YjlmYWQyN2YwMDU1ZWJkYWQ1YjBiYWQwZDhmNzc5NjMzNTk0NGQ5ODdjYzhiOTNhOTI3Nzg5MjdlNjE0NmY4M2ZmMmU5MmFmNGEwZDdkNGQwMTVhZWYzNCIgcHJvZHVjdElkPSI4MDYwNjUiIGFwcGxpY2F0aW9uSWQ9IjAwMDAwMCIgdHJhbnNhY3Rpb25UaW1lPSIyMDEyLTAyLTE1VDEwOjA5OjQ0LjAwMFoiIHRyYW5zYWN0aW9uSWQ9IlRFU1QzOTc0NTQ4NjY3NTIiIHhtbG5zPSJodHRwOi8vcGF5bWVudC5vdmkuY29tL2lhcCIvPg==</Binary>
</PurchaseVerificationRequest>
Production ticket
Code:
content=<?xml version="1.0" encoding="UTF-8" standalone="yes"?>
<PurchaseVerificationRequest xmlns="http://payment.ovi.com/iap">
<Binary>PD94bWwgdmVyc2lvbj0iMS4wIiBlbmNvZGluZz0iVVRGLTgiIHN0YW5kYWxvbmU9InllcyI/PjxQdXJjaGFzZVRpY2tldCBzaWduYXR1cmU9IjFlZDhjZTkyNTk3MWNlNTE1NzJlZWU2ZjA3YWJlODA2ODYxN2E1MWMiIGltc2k9IjY2YmIwMjBhZmUwNGUwYmE5YjJhMzk0NTc5YzU0OGM4NmExNjkxNmJlZWViZmYwZjVmOGYzNGE1ZDBhOGZmY2ZlYTE5YTY4YmMzNmMxMzYxM2I3OTFjMmNiNDgwMTBhMTEwYTNjMjEzM2JlMjY3NDBlOTcyZjEwZjNkODI0NjVmIiBpbWVpPSJmNzY4OTdhNWEzNTcxZDc5NWZmODIwYzg2YTZjNmIyNzM5N2MwODg2ZGEzZTU1YzE4Nzc5NzMxZmE4ZTBkNjZkMDcyODNhMjQ3MTJhY2ZkMDc1YWQ3MWZlZGJlYzk3YzBlOTcyMjMyZTNjYjEwOGEwZjRkYWI2NTFiYWY2NDcyMCIgYWNjb3VudElkPSJmZjIwNjBkNDAxY2IxOTlhYjMwYWViNjQ2ZDUzMDZhZTg4ODYzNmU0YjlmYWQyN2YwMDU1ZWJkYWQ1YjBiYWQwZDhmNzc5NjMzNTk0NGQ5ODdjYzhiOTNhOTI3Nzg5MjdlNjE0NmY4M2ZmMmU5MmFmNGEwZDdkNGQwMTVhZWYzNCIgcHJvZHVjdElkPSI4MDYwNjUiIGFwcGxpY2F0aW9uSWQ9IjAwMDAwMCIgdHJhbnNhY3Rpb25UaW1lPSIyMDEyLTAyLTE1VDA5OjM2OjMyLjAwMFoiIHRyYW5zYWN0aW9uSWQ9IjIwNzMzODI4MDMyMSIgeG1sbnM9Imh0dHA6Ly9wYXltZW50Lm92aS5jb20vaWFwIi8+</Binary>
</PurchaseVerificationRequest>
To send those tickets to the Ticket Verification API I save them as files and then execute the following curl command on a shell.
Code:
curl "https://payment.ovi.com/iap/1.0/purchases/verify?method=GET" --data @something.ticket -w "\nCode: %{http_code}\n"
Here is what I get using the testing ticket.
Code:
[conny@t61 ~]$ curl "https://payment.ovi.com/iap/1.0/purchases/verify?method=GET" --data @testing.ticket -w "\nCode: %{http_code}\n"
<?xml version="1.0" encoding="UTF-8" standalone="yes"?><PurchaseVerificationResponse result="OK" xmlns="http://payment.ovi.com/iap"/>
Code: 200
And here with the production ticket.
Code:
[conny@t61 ~]$ curl "https://payment.ovi.com/iap/1.0/purchases/verify?method=GET" --data @production.ticket -w "\nCode: %{http_code}\n"
Server Error: 4f2587a6-831a-4779-914f-f17b8589a259
Code: 400
I've checked the JavaScript/HTML source code of the "Purchase Verification Request Test Tool" but cannot find any significant differences. But obviously it is doing something different because the result is different :/
I guess there might be something wrong with the encoding of the data before sending it to the API, but I'm stuck and would really appreciate your help.
Thanks!
Cornelius