简体   繁体   中英

Android marketplace in app billing - new credit card fail, then ok?

I'm testing out the billing sample application provided by google:

http://developer.android.com/guide/market/billing/index.html

Everything is going ok, I got up to the part where I wanted to try buying an actual item (one that I had listed myself). I gave it an id of "com.me.sword" for example. I'm logged in as one of my approved test accounts after a factory reset. The app is signed, everything else is good.

I go to purchase, and move into the marketplace app. I get prompted to add a new credit card, makes sense. After entering a real credit card, the purchase tries going through, but it then fails on the marketplace side. I get a dialog saying "Error retrieving Checkout information from server". DDMS shows:

D/Finsky(884): [1] CarrierProvisioningAction.shouldFetchProvisioning: Required CarrierBillingParams missing. Shouldn't fetch provisioning.
D/Finsky(884): [1] CarrierProvisioningAction.run: No need to fetch provisioning from carrier.
E/Volley(884): [13] BasicNetwork.performRequest: Unexpected response code 500 for https://android.clients.google.com/fdfe/purchase
W/Finsky(884): [1] CheckoutPurchase.onErrorResponse: DisplayErrorMessage[Error retrieving Checkout information from server.]
E/Finsky(884): [1] CheckoutPurchase.setError: type=UNKNOWN, code=-1, message=Error retrieving Checkout information from server.

I dismiss the dialog, then try to purchase again, and it goes through ok.

There was probably an error where the new credit card hadn't been validated yet? I'm wondering if this is common with marketplace, and if other bugs such as these:

http://groups.google.com/a/googleproductforums.com/forum/#!category-topic/android-market/technical-help/eVUoYEaUwSc

are still plaguing developers? It's kind of terrifying to go with google's billing system with these bugs - surely the average user is just going to blame us, the application developers, and we don't want to get any ratings/emails claiming that I charged their credit cards and the purchased items were never delivered.

Thanks

In-app billing has gotten better, but it is still not particularly reliable (almost a year since initial release). You should be ready to handle errors in your app. There is no way to know what the actual cause of this particular error is, but 'Unexpected response' hints at an unexpected error :) Presumably, handling (errors in) card validation should be expected and part of the purchase flow. Some other issues you may encounter (this is not an official Market/Play bugtracker):

http://code.google.com/p/marketbilling/issues/list

Good luck :)

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM