Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Android In-App purchase doesn't work

I am about to publish the app to Google Play. I tested in-app purchases with the product ID android.test.purchase and it worked fine. Now I am trying to use the real product ID, but I always get the following UI error:

The item that you were attempting to purchase could not be found.

In the log I can see following:

D/Finsky(14007): [1] CarrierParamsAction.createCarrierBillingParameters: Carrier billing config is null. Device is not targeted for DCB 2. E/Finsky(14007): [3407] FileBasedKeyValueStore.delete: Attempt to delete 'paramstHSCrkH2npg__b-wWCeLSA' failed! E/Volley(14007): [3393] BasicNetwork.performRequest: Unexpected response code 500 for https://android.clients.google.com/fdfe/preparePurchase D/Finsky(14007): [1] PurchaseFragment.handleError: Error: PurchaseError{type=2 subtype=0}

I have done all the basic setup:

  • uploaded my apk to the alpha channel in developer console (to do that I had to shift my current date on PC 2 days back when releasing a signed apk), so the app status is "ready to publish" now
  • added real product id and set its status to "active", used same product id in my code
  • added license RSA key from console to my code
  • added tester gmail account to console license settings
  • installed on the device same released apk and use the tester gmail account there

What else am I missing?

like image 948
amilien Avatar asked Oct 20 '22 07:10

amilien


1 Answers

The solution was to change the status "ready to publish" to "published" in the alpha channel. App will be not available in the market, but in-app purchases will work. Then if everything is fine, app can be moved from alpha to production.

like image 131
amilien Avatar answered Oct 29 '22 18:10

amilien