Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Testing of in-app billing with test accounts

I need to verify how my in-app billing works. Would like to test that with test accounts.

If I buy my in-app item with usage of test account, do I need to pay for it?

like image 915
LA_ Avatar asked Apr 09 '11 19:04

LA_


People also ask

How do I test in-app purchases with Swift?

Test In-App Purchases for All Regions To test in-app purchases in multiple regions using the same Sandbox Apple ID, open App Store Connect, click the Sandbox Apple ID, and change the App Store Country or Region setting. For more information, see Test in-app purchases.


2 Answers

Ok, I've tested that - even if test account is used, you have to buy your own item. Will check later on if it is possible to reverse amount paid (and if google 30% charge would be applied).

Upd. reversal is possible, the whole amount is reversed.

like image 85
LA_ Avatar answered Sep 21 '22 03:09

LA_


You can reverse your transaction by using There are four reserved product IDs for testing static in-app billing responses:

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

android.test.purchased
When you make an in-app billing request with this product ID, Android Market 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). In some cases, the JSON string is signed and the response includes the signature so you can test your signature verification implementation using these responses.

android.test.canceled
When you make an in-app billing request with this product ID Android Market responds as though the purchase was canceled. This can occur when an error is encountered in the order process, such as an invalid credit card, or when you cancel a user's order before it is charged.

android.test.refunded
When you make an in-app billing request with this product ID, Android Market responds as though the purchase was refunded. Refunds cannot be initiated through Android Market's in-app billing service. Refunds must be initiated by you (the merchant). After you process a refund request through your Google Checkout account, a refund message is sent to your application by Android Market. This occurs only when Android Market gets notification from Google Checkout that a refund has been made. For more information about refunds, see Handling IN_APP_NOTIFY messages and In-app Billing Pricing.

android.test.item_unavailable
When you make an in-app billing request with this product ID, Android Market responds as though the item being purchased was not listed in your application's product list.

like image 42
AZ_ Avatar answered Sep 22 '22 03:09

AZ_