8

I'm trying to test my in app purchase flow with the fake item android.test.purchased, from android documentation. I'm not able to test this flow, just when I launch it, I get this error: "The item you requested is not available for purchase". I have the permission in my manifest and I don't understand why I get this error with the fake item android.test.purchased.

  • having the same issue, It was working just fine for me yesterday, I setup the server side validation and wanted to test. ran into problems with my product IDs so i checked the static ones again and they gave the same errors. – JStephen Jan 23 '17 at 20:18
  • Any solution? I am also using static productId to test, but always get `Unexpected response code 500 for https://android.clients.google.com/fdfe/ees/acquire` and `df-dferh-01` errors. Searching hours now, but all useless info only. – Zoli Dec 14 '17 at 17:10
  • **In my case:** I consume purchased item and it worked fine. – AiOsN May 09 '18 at 08:18

3 Answers3

3

Here is the list of requirements for the Google IAB testing.

Prerequisites:

  1. AndroidManifest must include "com.android.vending.BILLING" permission.
  2. APK is built in release mode.
  3. APK is signed with the release certificate(s).
  4. APK is uploaded to alpha/beta distribution channel (previously - as a draft) to the developer console at least once. (takes some time ~2h-24h).
  5. IAB products are published and their status set to active.
  6. Test account(s) is added in developer console.

Testing requirements:

  1. Test APK has the same versionCode as the one uploaded to developer console.
  2. Test APK is signed with the same certificate(s) as the one uploaded to dev.console.
  3. Test account (not developer) - is the main account on the device.
  4. Test account is opted-in as a tester and it's linked to a valid payment method.

Reference.

Community
  • 1
  • 1
Nick Titov
  • 588
  • 5
  • 19
0

To test in-app products or make in-app purchases in your alpha or beta channel app, each tester needs to opt-in to your app’s alpha or beta test. On your test’s opt-in URL, your testers will get an explanation of what it means to be a tester and a link to opt-in.

The most current version of the Google Play application must be installed on the device.

Ref: https://stackoverflow.com/a/22469253/3758024

https://stackoverflow.com/a/11076056/3758024

https://developer.android.com/google/play/billing/billing_testing.html

Community
  • 1
  • 1
Gopal
  • 1,734
  • 1
  • 14
  • 34
0

I was with the same problem and fixed listing the "android.test.purchased" ID in the IAP activate list. I know Google says that you do not need to list the IAP ID with static responses but, in my case, after I listed the ID "android.test.purchase" and activated I get success in my tests

Romulo
  • 1