How to receive customer email in an in-app billing transaction?

JSON fields that are returned with the intention of PURCHASE_STATE_CHANGED contain very useful information, but one part that interests me is not listed: client email address.

Is there any way to get it using the in-app billing API?

If not, is there a way to get some other unique identifier for the client so that the transaction can be associated with the client and not with the device?

+4
source share
2 answers

If you use Android 2.x and higher, maybe you can find the path to the email address of the owner ?

The disadvantage of this is that the manifest requires android.permission.GET_ACCOUNTS . The more permissions your applications require, the more likely you are to scare potential users of your application ...

Also note that the “owner email address” may not match the “purchase account email address” (especially with Honeycomb 3.0 )

+2
source

I also tried to solve this problem. So I came to use the nonce value. Ideally, you should generate nonce on the server side before sending an IN-APP Billing request from your application, so in this case you can connect the nonce value to the client's email.

I understand this is a little awkward, so if anyone knows a better solution, I would like to see it.

+1
source

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


All Articles