I've tried to get the in-app billing sample app to work according to the steps in http://developer.android.com/google/play/billing/billing_integrate.html#billing-download.
I will specify everything I've done + added logs at the end. I hope someone will be able to tell me what I am doing wrong.
Here is everything I did (I know it's long... but I wanted to make sure I did not forget anything):
I imported the Dungeons project into my workspace and my Google public key to Security.java's base64EncodedPublicKey variable. I got that public key from a new app I added to my Google Developer account.
I changed the name of the application package as requested so it does not have the com.example prefix
I build the app and signed in Via "Android Tools" -> "Export Signed Application Package..."
I uploaded that APK to the new app I created in my developer account (the one from which I took the public key)
I added in app product to the new app, with the same IDs as in the Dungeons project (sword_001 , postion_001) and activated them.
I added a test account to my developer account in "Settings" -> "Gmail accounts with testing access" That account is NOT the my developer account, but a new one I created.
I installed the signed app on a device, which I factory reseted and logged in with the test account I added to my developer account.
My device
I installed the app on an android 2.3.4 device with no SIM card (this is my testing device). Google play version: 3.10.9
Results
When I try to buy one of the products, I get an "item not available" error (I get it twice actually). I tried setting DEBUG to true, and now I get "error retrieving information from server. [RPC:S-5:AEC-0]" (twice...)
Logs:
12-06 07:58:42.255: D/Finsky(1955): [7] MarketBillingService.getPreferredAccount: com.sakal.billingtest.merchant: Account from first account.
12-06 07:58:42.275: D/Finsky(1955): [7] MarketBillingService.getPreferredAccount: com.sakal.billingtest.merchant: Account from first account.
12-06 07:58:42.325: D/Finsky(1955): [27] MarketBillingService.getPreferredAccount: com.sakal.billingtest.merchant: Account from first account.
12-06 07:58:42.335: D/Finsky(1955): [27] MarketBillingService.getPreferredAccount: com.sakal.billingtest.merchant: Account from first account.
12-06 07:58:42.991: E/Volley(1955): [15] BasicNetwork.performRequest: Unexpected response code 500 for https://android.clients.google.com/fdfe/details?doc=subs:com.sakal.billingtest.merchant:potion_001
12-06 07:58:44.785: D/Finsky(1955): [1] MarketBillingService.sendResponseCode: Sending response RESULT_ERROR for request 8273178932293834331 to com.sakal.billingtest.merchant.
12-06 07:58:44.785: I/BillingService(3173): handleCommand() action: com.android.vending.billing.RESPONSE_CODE
12-06 07:58:45.551: E/Volley(1955): [14] BasicNetwork.performRequest: Unexpected response code 500 for https://android.clients.google.com/fdfe/details?doc=inapp:com.sakal.billingtest.merchant:potion_001
12-06 07:58:46.225: D/Finsky(1955): [1] MarketBillingService.sendResponseCode: Sending response RESULT_ERROR for request 2493329704825383333 to com.sakal.billingtest.merchant.
12-06 07:58:46.245: I/BillingService(3173): handleCommand() action: com.android.vending.billing.RESPONSE_CODE
OK, problem solved. It was only a matter of time... I guess it took Google's servers a while to update my additions to the developer account, but now it works and I can finally buy a potion from myself.
Now there are new problems.
when I select an item to buy, I first get an "Item not found" error, and when I click "ok" I see the product in google play. does this happen to anyone else?
I purchased several new items, I see on my google checkout account that the order is "shipped" BUT in the billing test app, under "Items you own" I don't see anything...
in http://developer.android.com/google/play/billing/billing_integrate.html#billing-download they suggest to
refund purchases that are made with test accounts, otherwise the purchases will show up as actual payouts to your merchant account
where can I perform the refund? in my google checkout account the "Refund some money" item is greyed out...
Does anyone know how to handle these issues?
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With