Nitish
Nitish

Reputation: 3155

Android: Issue with in-app billing

I am integrating in-app billing in my application. But, I'm facing issues in testing my app. Every time, I try to purchase an in app item. A wired message comes up The item you were attempting purchase could not be found. On Logcat, following appeared up:

09-10 14:45:02.437: E/IabHelper(12617): Launching buy intent for premium. Request code: 10001
09-10 14:45:02.523: E/Finsky(11260): [8464] FileBasedKeyValueStore.delete: Attempt to delete 'paramspXaplU_vTGhfGqvnmPPddQ' failed!
09-10 14:45:04.000: E/Volley(11260): [8448] BasicNetwork.performRequest: Unexpected response code 500 for https://android.clients.google.com/fdfe/preparePurchase

After I click OK, logcat showed the following:

09-10 14:45:05.546: E/TrivialDrive(12617): onActivityResult(10001,0,Intent { (has extras) }
09-10 14:45:05.546: E/IabHelper(12617): Ending async operation: launchPurchaseFlow
09-10 14:45:05.546: E/IabHelper(12617): Purchase canceled - Response: 2:Unknown
09-10 14:45:05.546: E/TrivialDrive(12617): Purchase finished: IabResult: User canceled.   (response: -1005:User cancelled), purchase: null
09-10 14:45:05.546: E/TrivialDrive(12617): **** TrivialDrive Error: Error purchasing: IabResult: User canceled. (response: -1005:User cancelled)

I had checked following things numerous times:

  1. I am registered with same google account on my testing device that I had set as test account.
  2. All In-app products I created are active.
  3. I uploaded the apk in alpha channel, it is mentioned that draft mode is no longer supported.
  4. I had verified the license key for my application from the developer console.
  5. Someone suggested to reboot my device once. I did that also.
  6. I had installed the same apk on my device that I had uploaded to Google Play. Both are signed with same certificate.
  7. It is mentioned that, one should wait for atleast 2-3 hours in order to get apk recognized. For me, its been more than 15 hours.
  8. Also, my test account is different from merchant account.

I modified the Google's sample as well as created my own sample. In both cases, I am facing same problem.

Update: I am testing IAB from my client's developer account. I noticed that her merchant wallet account is still not verified. I am not sure, if this is the root cause of this issue.

Upvotes: 4

Views: 3307

Answers (2)

peter.bartos
peter.bartos

Reputation: 12045

It might help someone: Make sure, your test app has no higher version code defined that the one you have uploaded in play store.

Upvotes: 0

Nitish
Nitish

Reputation: 3155

The cause of this problem was pretty dumb, after uploading app to alpha channel, it needs to published. I was not publishing it, so it remained in draft mode. After I published the app, it worked within an hour.

Upvotes: 6

Related Questions