Billing on an Android application Error: This item cannot be purchased. (Error Code: IAB-DPTL)

I'm just starting to use the Android billing system in the application. I tested the sample Dungeons application without any problems.

So, I'm trying to integrate the application into my application, but when I use the declared productId or static test identifier, I get the same error:

  This item could not be purchased.  (Error code: IAB-DPTL)

This application is already on the market. I downloaded the signed version, which I also clicked on the phone (so that it has the same version on both sides). I added an email that is used on the phone as a test account. Should I activate my application? (taking into account the risk of deleting the current published application?)

I donโ€™t see what I am missing, and I cannot find anything about this error code on the Internet.

What am I doing wrong?

+6
source share
1 answer

Ok, I found a solution !!!

The error is directly caused by "payloadContent", which I associate with productId during the purchase request.

I used to convert my purchased item to JSON and to place it as content of useful developer information. (considered useful for the recovery phase ...)

I tested to remove this payloadContent and then I had no more problems.

I think the data format used during different transactions is JSON, so the content field of the JSON payload should interfere with some expected fields .. (for example, "title" or "link")

UPDATE:

As Nikolai Elenkov said, the error is most likely caused by the length of the payload, and JSON seems to work. Thus, there is a limit on the size of the developer payload: 256 characters.

And we believe that the error code: "IAB-DPTL" directly changes: "In the Billing application - the developerโ€™s payload is too long"

Thanks to Nicholas!

+15
source

Source: https://habr.com/ru/post/913437/


All Articles