Can I get the Google Checkout order ID for the purchased Android application from the application itself?

We would like to allow our users to activate the service on one of our servers with each application purchased on the Android Market, and to make sure that the user actually purchased the application.

To this end, we evaluate the use of the Google Checkout notification history API, which allows us to request the status of a purchase order identifier from our server.

Now the problem is that we don’t know how to get the Checkout order ID from the application itself.

With the new API for in-app purchases, we can get a Checkout order ID for every in-app purchase, but not for an app purchase.

+8
android in-app-purchase google-checkout
source share
1 answer

The best solution for obtaining confirmation of purchase of the application is the Market Licensing Verification Service .

The purpose of this library is to allow your application to confirm that the user actually purchased the application.

To verify the transaction from your external server, you can use the methods described in the section "Checking the Offload License for a Trusted Server" on this blog post .

In essence, this assumes that you are sending a copy of the license server response contained within the ResponseData class, along with its signature, to your online server. Your server can then confirm that the user is licensed.

Since the license response is cryptographically signed, your server can check whether the license response has been changed using the RSA public key stored in the console of the Android Market publisher.

+5
source share

All Articles