Testing of in-app billing with test accounts

后端 未结 3 1454
青春惊慌失措
青春惊慌失措 2020-12-31 20:22

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

相关标签:
3条回答
  • 2020-12-31 20:32

    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.

    0 讨论(0)
  • 2020-12-31 20:39

    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.

    0 讨论(0)
  • 2020-12-31 20:55

    It seems that Google has improved testability of in-app purchases so that you can test purchases with your products (not just the four reserved product ids) without charging your credit card:

    When your In-app Billing implementation is ready, you can test purchasing of your in-app SKUs in two ways:

    • Test purchases, which let your selected license test users purchase your in-app products before the app is published, but without any resulting charges to the user, and ...

    http://developer.android.com/google/play/billing/billing_testing.html#testing-purchases

    0 讨论(0)
提交回复
热议问题