Testing of in-app billing with test accounts

后端 未结 3 1453
青春惊慌失措
青春惊慌失措 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: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.

提交回复
热议问题