3

I have been trying to implement in app billing of google play to my app. I am trying to implementing the sample application and test it. I have followed all the procedures which is in http://developer.android.com/guide/google/play/billing/billing_integrate.html but still i am not able to purchase any product or the subscription from the market.And my response look like below

09-17 19:38:31.902: E/Volley(4314): [444] BasicNetwork.performRequest: Unexpected response code 500 for https://android.clients.google.com/fdfe/details?doc=subs:com.product.android.dungeons:subscription_monthly

Can any one please help me in this it breaking my head fro past one week.

Prabhu
  • 590
  • 2
  • 9
  • 22
  • i am also working on subscription and i got same error as u told.but u solve it .can u tell me where can i put product id in my code for subscription ?is there any need of this id in code.? – kyogs Oct 23 '12 at 07:47

1 Answers1

5

The in-app billing system is very fragile, which is why a lot of people will recommend you use the AndroidBillingLibrary. Beyond that, here are a few things you should check:

  • Did you create your item in the dev console?
  • Is the id for your item the same in the dev console and in your app?
  • Is your item published?
  • Have you waited at least a few hours since you published your item?
  • Are you using a different Google account than your dev account to make the purchase?
  • Are you testing on a real device, rather than the emulator?
  • Are you using a signed APK?

If any of these questions is answered with a "no", you probably need to fix that.

oakes
  • 743
  • 5
  • 12
  • Thanks for your reply. Yes i did all the steps that u have mentioned. But still i cant understand what mean in first two steps could u please explain me in detail about the first two steps would be more help full to continue further. Thank you – Prabhu Sep 18 '12 at 05:49
  • The [dev console](https://play.google.com/apps/publish/) is the place you upload your app to. You should see a list of the apps you've uploaded. Find the app in question, and click "In-app Products" or "Subscriptions" underneath it. This is where you create and publish your item. You'll give it an id, such as "com.example.item", which your app's code should request. Again, I highly suggest you use the AndroidBillingLibrary instead of writing your own code. – oakes Sep 18 '12 at 12:17
  • Yes i used the library now its working. One more thing how can i retrieve the purchase details such the entire json or the purchase token from the google play. – Prabhu Sep 20 '12 at 11:17
  • With AndroidBillingLibrary, the JSON for the purchase details is parsed internally into a class called [`Transaction`](https://github.com/robotmedia/AndroidBillingLibrary/blob/master/AndroidBillingLibrary/src/net/robotmedia/billing/model/Transaction.java). To get access to this, you'll use the [`BillingController`](https://github.com/robotmedia/AndroidBillingLibrary/blob/master/AndroidBillingLibrary/src/net/robotmedia/billing/BillingController.java)'s `getTransactions` method. – oakes Sep 20 '12 at 19:35
  • I tried getTransactions method in billing controller class but i am not getting any kind of responses from that class could you please help me with any sample code in would be more helpful. – Prabhu Sep 21 '12 at 04:24
  • I am trying to get the purchase token after the successful in app subscription is there any straight froward way to get purchase token from google play server. Thanks in advance. – Prabhu Sep 21 '12 at 06:30
  • Just run [`BillingService.getPurchaseInformation`](https://github.com/robotmedia/AndroidBillingLibrary/blob/master/AndroidBillingLibrary/src/net/robotmedia/billing/BillingService.java#L77). I haven't made an app with subscriptions so I can't say what happens next, but I'm sure [their README](https://github.com/robotmedia/AndroidBillingLibrary) and [the API tutorial](http://developer.android.com/guide/google/play/billing/billing_subscriptions.html#token) can help. – oakes Sep 21 '12 at 13:09
  • Thanks for your reply i found it finally. I made a simple mistake in which i have to make debug = true only after that the debug mode works now its perfectly fine and working awesome. Thanks for u patience with me. – Prabhu Sep 21 '12 at 14:31
  • Hi, Now i got a issue 03-11 18:19:14.489: E/Volley(10235): [13] BasicNetwork.performRequest: Unexpected response code 500 for https://android.clients.google.com/fdfe/completePurchase Can u please help me to resolve this issue. 03-11 18:19:14.535: W/Finsky(10235): [1] CheckoutPurchase.onErrorResponse: DisplayErrorMessage[Your order could not be processed. Please try again.] 03-11 18:19:14.539: E/Finsky(10235): [1] CheckoutPurchase.setError: type=UNKNOWN, code=-1, permissionCode=-1, message=Your order could not be processed. Please try again. – Prabhu Mar 12 '13 at 05:39