My app seems ready to get a 'real life' test for an in-app purchase procedure on my device. However, I receive an "The publisher cannot purchase this item" error message in Play Store.
Now, how am I supposed to test this? I don't want to lose my phone's configuration by reinstalling it with a dummy account just for testing.
In the Developer Console under "Settings"-"License testing", I have added my email address under "GMail accounts with testing access", but this doesn't change anything... maybe I missed some simple way, but right now it feels very confusing!

However, this is not a smooth solution in my opinion and only partially satisfying as the developer doesn't see what a 'real' user sees and experiences, but rather receives some result codes from a black box with a fake name (it is even titled that way) and can't make it beyond the Google Play interface.

How do you reset the purchase of this special SKU ID ? Also, it seems I always get an error for the onQueryInventoryFinished method of QueryInventoryFinishedListener interface. How come?
–
android developerJan 4 '14 at 16:35

Here's an attempt to put all the requirements into one answer. This is the simplest process that worked for me:

Set up a new Gmail account, or use an existing Gmail account that is not your developer account.

List the email address of the test account in the Google Play Developer Console in Settings > Account Details > License Testing.

On your device, go to Settings > Accounts, select your developer account, tap the three-dots menu, then select Remove to remove the account from the device. You can add it again later.

Build a signed, release variant of your app.

Upload the app as an alpha in the Play Store, publish it, and wait several hours for it to become active.

If your device already has a debug version of the app installed, you will have to delete that. Or use this technique to run the debug and release versions in parallel (but you will still need to delete the debug version the first time).

Download the release version onto your device. Apparently you can do this from the Play Store by navigating directly to the app URL, but whenever I tried this I received an "item not found" message. I uploaded the app to my own server and then downloaded it to the device from there.

Download the release version onto your device. Or use this technique to sign the release build in Android Studio from your keystore, then deploy the app onto your device from Android Studio.

Run the release version on your device. If the alpha in the Play Store is not yet active, you'll see an error that the app version isn't configured for in-app billing. If the alpha is ready, you will be able to proceed through the test process.

When you get to the payment screen, you will have to enter real payment information, even though you will not be charged for your purchases. I opted to use an existing PayPal account rather than add my credit card info to my Google test account.

How come do you make in-app purchase, when you make your products inactive?
–
HalilJul 20 '14 at 4:45

When I deactivated a previously active in-app product, the error message changed from "the publisher cannot purchase this item" to "this item is not available for purchase." At least the active/inactive change occurred immediately so I didn't have to waste time waiting to test it.
–
arlomediaSep 22 '14 at 21:23

i didn't downvote but it deserves one. "The publisher cannot buy this item" indicates that the publisher has already signed the apk.
–
HalilJul 20 '14 at 4:49

One does need to sign the app in --release mode to test in-app billing, but the error message indicates that it was already signed, so that's not the problem. Perhaps you should delete your answer, or rewrite it?
–
AgamemnusJan 3 at 19:11

I was facing same error, now solved there were two main reasons of my failure: 1. I had not activated in-app products, means they were in Inactive mode2. If you want to test, you must add Beta testers.

I faced same issue when installed manually the APK from eclipse to my phone then manually opening it. The correct procedure is to send it to Google play for alpha testing then wait several hours to be published to your alpha or beta testers which you ofcourse you must manage , must create, must give them access to your app. The developer shall receive an email with a link to provide to his testers after several hours. Once that happens just forward it to your community . In your mobile create an extra google account (that belongs to the community) and with that open gmail and press the link. It shall guide you to google play where you will automatically download the app as tester. Install , buy gass .. tada!!