I'm just beginning to use the android in-app billing system. I tested the Dungeons application sample without any problems.
So I'm trying to integrate in-app in my own application, but when I use declared productId or static test id, I'm getting the same error:
This item could not be purchased. (Error code: IAB-DPTL)
This application is already on the market. I uploaded a signed version that I also pushed on the phone (so it's the same version on both sides). I added the email wich is used on the phone as a test account. Should I activate my application ? (incurring the risk to remove the current published application ?)
I don't see what I'm missing, and I'm not able to find anything about this error code on the web.
What I'm doing wrong?
Ok I found the solution !!!
The bug is directly caused by the "payloadContent" which I associate to the productId during the purchase request.
I used to convert my purchasable item into JSON and to put it as the developer payload content. (thought useful for the restoration phase...)
I tested to remove this payloadContent and then I had no more problems.
I think the data format used during the different transactions is JSON and so JSON payload content field should interfere with some waited fields.. (such "title" or "link")
UPDATE:
As Nikolay Elenkov said, the error is most probably caused by the length of the payload, and JSON seems to work. So there is a limitation in the developper payload size: 256 characters.
And we think that the error code:"IAB-DPTL" directly meens: "In App Billing - Developer Payload Too Long"
Thanks Nikolay !
来源:https://stackoverflow.com/questions/10194120/android-in-app-billing-error-this-item-could-no-be-purchased-error-code-iab