7

I get an error when making test request for verifiyng android in-app purchase (billing) from my server. I use one of the following products (https://developer.android.com/google/play/billing/billing_testing#billing-testing-static):

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).

android.test.canceled
When you make an Google Play Billing request with this product ID Google Play 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.item_unavailable
When you make an Google Play Billing request with this product ID, Google Play responds as though the item being purchased was not listed in your application's product list

I make a GET HTTP request as described (https://developers.google.com/android-publisher/api-ref/purchases/products/get):

GET https://www.googleapis.com/androidpublisher/v3/applications/com.gigantic.clawee/purchases/products/android.test.purchased/tokens/inapp:com.gigantic.clawee:android.test.purchased?access_token=<MY_ACCESS_TOKEN>

but get an error in response:

{
  "error": {
    "errors": [
      {
        "domain": "global",
        "reason": "invalid",
        "message": "Invalid Value"
      }
    ],
    "code": 400,
    "message": "Invalid Value"
  }
}

What did I do wrong? Please, help. I

Community
  • 1
  • 1
Sergiiko
  • 319
  • 1
  • 10

0 Answers0