4

I want to implement in app purchase in my app in android. Can anybody help me for best example for this, and how can I test with sandbox account?

Drew Noakes
  • 300,895
  • 165
  • 679
  • 742
rajnish verma
  • 49
  • 1
  • 1
  • 2

4 Answers4

5

As of today (or yesterday) Google has allowed "sandbox" testing for in app purchases. Please check out info here and here

Google Announcemnet

Raigex
  • 1,205
  • 12
  • 32
1

you can use test purchase package for testing inapp provided by google. use this product id for testing "com.test.purchased" it redirects you to test inapp product id .

adnan_it
  • 88
  • 1
  • 7
0

You can read this

http://developer.android.com/google/play/billing/billing_overview.html

For test your app you must publish this app on google play, There is no sandbox for in app purchase for android

Ashwani Tyagi
  • 510
  • 1
  • 5
  • 15
  • 2
    there is no need to publish the app developer has to just upload apk and make it as draft application but developer has to publish product ids to test app from test account. This step is required to generate application specific public key. – Ankit Apr 04 '13 at 19:05
  • Draft Apps are No Longer Supported https://developer.android.com/google/play/billing/billing_testing.html?rd=1#draft_apps – Bruno Lemos Jun 11 '17 at 02:16
0

https://developer.android.com/google/play/billing/billing_testing#prepare

You can check this link for test purchases

There are three reserved product IDs for testing static Google Play Billing responses:

android.test.purchased When you make an Google Play Billing request with this product ID, Google Play responds as though you successfully purchased an item. The response includes a JSON string, which contains fake purchase information (for example, a fake order ID).