jayellos
jayellos

Reputation: 691

In-app Billing Error

My [UNMANAGED] in-app purchase won't work, Before it works perfectly which I can purchase successfully using Test Accounts. But it suddenly won't work, as I remember what I did to Merchant Account is only add more 2-4 Test Accounts. Then after adding, my in-app purchase won't work. So I updated the public key and upload an Apk as draft. But still won't work.

When the app is in google play page I received a LogCat error:

11-20 17:00:18.840: E/Finsky(2182): [187] FileBasedKeyValueStore.delete: Attempt to delete 'paramsqE9ZgJf5Z6GeZu1wwGPosw' failed!

Then when I click the Buy & Accept button I only received these LogCats:

11-20 17:00:39.520: I/BillingService(2408): handleCommand() action: com.android.vending.billing.RESPONSE_CODE
11-20 17:00:39.520: I/LoginActivity(2408): purchase was successfully sent to server

I am expecting for Security Verification's Logs and onPurchaseStateChange(...) to called, but I don't get any onPurchaseStateChange.

Please help me with this problem.

Also when I test android.test.purchased the reserved product IDs for testing static in-app billing responses but still got the same Logs/Responses.

UPDATES-----------------------

I removed some Test Accounts but leaving only two (as suggested by @Tigger below). And now I'm not getting any error from Google page. But still the onPurchaseStateChange() function didn't fire. And I didn't receive any Logs from Security.java.

The last Log I received is: "purchase was successfully sent to server"

Upvotes: 4

Views: 3601

Answers (2)

tenpn
tenpn

Reputation: 4716

I had this error, but my mistake was that the upload behaviour has changed.

It used to be that you uploaded an APK as a draft to the production tab of the play store dashboard. Now, you have to upload to the Alpha tab of the dashboard, and publish your app (http://developer.android.com/google/play/billing/billing_testing.html#draft_apps).

Don't worry if you're still in pre-production on your app; if you have no APKs in the production tab when you publish, nothing will appear in the Play Store.

Upvotes: 0

Tigger
Tigger

Reputation: 9130

This may not be a correct answer, but from my personal testing and notes taken from all over the place:

  • The draft app you upload must have the same "version code" and "version name" as any that you are testing.
  • If you upload a new version (with a new "version code" or "version name") it can take 4 to 24 hours before the new version will work correctly for testing.
  • Double check that the account used on the device is in fact one of the test accounts.
  • Your draft APK that you upload must be signed with the same key that will be used on the final version.
  • For testing on a device (the emulator will not work with the Play Store), so long as the "version code" and "version name" match the the draft APK in the Play Store, testing and debugging works.

Hope that helps a little.

Edit: Some changes to clarify a few points.

Upvotes: 6

Related Questions