I have configured an Android application to use the in-app billing module as documented at: http://developer.android.com/guide/market/billing/index.html
It works fine when tested using the UK development team's accounts which have real credit cards associated with them. However, part of my development team is based in China, and as Google Billing does not operate in China, they are unable to test the billing functionality.
Understandably the team is uncomfortable sharing personal card details, or personal account information with others. Does anybody know a work around for this? While in testing, can dummy card numbers be associated with the account?
I know this works in the merchant sandbox (http://code.google.com/apis/checkout/developer/Google_Checkout_Basic_HTML_Sandbox.html) but I can't seem to find an equivalent for Android billing testing.
Any help/guidance/support would be appreciated here. The China team is focused on a lot of the modules related to the post-purchase experience and this will be seriously compromised if we cannot find a workaround.
Thanks!
Test in-app billing and subscriptions Once you've set up application licensing, authorized users can also purchase in-app products and subscriptions without charging the users' accounts. When making a purchase from a license test user, you will see two choices for payment method: “Test card, always approves”
Open the Google Play app. Choose Account -> Subscriptions & Payments -> Subscriptions. Click your test subscription and change the payment method to “Test card, always declines.”
On selecting the device, the uploaded/selected app will automatically open in the device in question. Alternatively, you can sign in to Google Play Store, download and install a published app and test its in-app purchase feature. Just pick the Install via Google Play Store option.
In-app Billing is a Google Play service that provides checkout processing for in-app purchases. To use the service, your application sends a billing request for a specific in-app product.
Update:
Inappbilling library 1.0 just released to make this easier.
Kumar Bibek has already answerd above: Still I am giving an explanation:
Hardcode the following debug options in the launch purchase flow to get the desired output.
android.test.item_unavailable*
mHelper.launchPurchaseFlow(Activity.this, "android.test.purchased", 1000, mPurchaseFinishedListener, payload);
The above will give these screens:
On clicking Buy.
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