3

I'm implementing in-app purchasing in my application. When i test that im keep getting "Purchase canceled Your payment could not be processed" issue all the times. Im using test account for testing purpose and dummy credit card number for purchasing the in-app billing. I added my test account in my market profile. How to test in-app with sandbox number. please help me.

NOTE: Would like to implement Auto Renewal for my application. Came to know that its not possible in android. Do we have any other way to implement auto renewal in in-app? is it possible to use 3rd party payment gateway for inapp? will android block my account if i implement 3rd party payment gateway?

Please help me

Andro Dev
  • 395
  • 1
  • 4
  • 14

1 Answers1

1

you are not able to test in app purchase with a dummy credit card number. You have to buy the item for real. Afterward, you can refund the full amount. The only way to simulate a purchase is to use "android.test.purchased" item id.

CChi
  • 3,054
  • 1
  • 20
  • 15
  • Thanks a lot. One more question is it possible to buy a single product for multiple times using in-app? I'm having one in-app product in android market. I would like to make the product as available in market even after user purchased it successfully. is it possible in android, if so whats the limitation there? – Andro Dev Feb 22 '12 at 04:58
  • Just set the item type unmanaged. you can buy as many unmanaged item as you want, but you can only only managed item once. – CChi Feb 22 '12 at 20:50
  • I have implemented in-app in my application.the scenario is like this.Once user click the buy btn we are giving 5 mp3s to user.If the user played all the 5, his plan will be over and again the user needs to click buy button to buy 5 more mp3s.i created an in-app product as Un-managed item,since the user needs to purchase multiple times.i read the documentation saying that Android market won't support subscription and auto renewal. the scenario we have implemented for our application is like subscription. Will android banned my application if i implement this scenario in my project. – Andro Dev Feb 28 '12 at 05:37
  • i don't think you can do automate recurring charges with the google billing api. I am not sure how u will be able to tell if the user has finished playing all 5 mp3. But you can definitely use the google billing api to toggle on and off the a special flag which control whether or not the user have the right to play the mp3 again. – CChi Feb 29 '12 at 18:57
  • we are having a counter for counting the number of plays of MP3. Every time when the user plays MP3 we are increasing the count, once the count reaches to 5, we are displaying an alert box, telling user that "your plan is over. update your plan by purchasing the product again." (and we are pointing out the user to android market for in-app product, that product is unmanaged item) – Andro Dev Mar 01 '12 at 04:51
  • I think your approach is correct. update the count in the billingservice class, specifically in onpurchasestatechanged. – CChi Mar 01 '12 at 05:22