Android In-App Billing Item unavailable - android

I'm implementing in-app billing in Android and it's giving me headaches.
When I try to buy my products from the in-app store, bang: "Item unavailable",
but if I try the android_test_purchased everything goes fine.
I made a list with 'all' the possible causes for this problem and checked each one.
Here is the list:
in Security.java, the public key should be same as the one in the Android Market account
the version of the Market application in the Device should be 2.3.4 or higher
the device you use for testing must run a standard version of the Android 1.6 or later
the application being tested must be uploaded as draft, in the Android market, and must be signed
the application installed in the device must be the same as the one that was uploaded as draft to the market
the device must have a something#gmail.com account as its primary account and this account should be defined as a test account in the Android market
the products for in-app billing in the Android market must have the same IDs as the ones displayed in the application
the in-app products in the Android market must be published
Any suggestion and modification to this list is well appreciated.
Thanks

one more point I like to mention is
The account u are using for test purchases must b mentioned as a test account in your market account

I've ran into same issue. Solution was to wait, it take several hours, perhaps one day, until published items in unpublished app become "online".

I might have the same problem. There seems to be a known issue that test accounts created after August 1st is not working.
See Known Purchasing issues from Help pages
No mention anywhere when this is resolved though..

Related

In-app billing library in android enterprise

I have some troubles about using in-app billing library v3 in managed devices using android enterprise
In my public app I have two sku objects (subscription items) to be purchased, those objects should load as alert dialog when the app starts, but currently any sku object doesn't load, checking logs I found this message: Google Play In-app Billing API version is less than 3
Doing a research about this issue, I found that probably it could be that there is not account signed up on google play store, it make some sense, because android enterprise generates and signed up an bot account in every device registered, ex: android12312#android23131.com
Another possible solution is update de google play store app, but I'm not sure if I can do it, I suppose that android enterprise does it automatically.
Also, I tested public app in my personal device (it is not using android enterprise) and it loads sku objects correctly and this is reinforcing google's account theory.
Have you ever faced this issue before? I want to know how you solve it or any contribution is welcome. Thanks

in app billing, real transaction not working

I have an alpha working version of my app.
I have set the alpha open.
I successfully tested the in app billing with the test account (meaning the money is not charged to the test user).
I successfully tested the purchase with static response.
When i try to test the real payment it always say "the item is not available for purchase"
The version and the signature are ok.
Can you suggest what am i missing?
BILLING_RESPONSE_RESULT_ITEM_UNAVAILABLE 4 Requested product is not available for purchase
this is the returned code but i think has nothing to do with the real problem.
where can i find more information about the error?
I don't have the reputation to comment yet, but have you tried making a purchase from a version of the app that was downloaded off of the play store instead of a version that was run from adb or android studio?
Here's someone who had a similar problem
GooglePlay: The item you requested is not available for purchase
I encountered a problem like this as well once - i.e. downloaded the app from the Play Store, with a test-account (aka no money purchase) it worked, but a real purchase with a non-test account failed.
For me the reason was that the merchant account linked to the Play Store was not set-up correctly. You might want to check that if your situation is similar.

In app billing setup returns code 3

Im trying to get In-App Billing to work. I have followed the tutorial from http://blog.blundell-apps.com/simple-inapp-billing-payment-v3/ somewhat, and I get purchases working. Although from both my testing devices at some point it stops to work. What also stops to work at the same time is paid apps in full and Ill only see free apps.
From my developer account testing against the reserved products, i found out the reason that my account had somehow been logged out? And when logging back in it work, happy with that :)
From my testing account against the published product I got a message saying "product not availabe from merchant" or something like that. Then that account is crashed (not available to make purchases) and I cannot get market working again.
I have:
- Verified multiple accounts does not exist
- Ensured my account is still logged on to market (the case from developer account)
- Cleared google play cache
- Removed the account as testing account
- Restarted the device
Any ideas here? I could understand if my app wouldn't work due to poor coding, but what is this behaviour, diasabling the market for the account? Could google play block my account due to spam? And does 10 IAB setups or so count as spam?
Thanks in advance!
Developers cannot purchase their own products. So you can build a signed version of your apk and test it on a device who's primary account is not tied to your developer account. I had to use my wife's phone to test my IAP. Also note that you have to wait a while before your products (SKU's) will be available.

How can I test in-app-billing with a non-published app?

I have an Android app that uses In-App-Billing to sell Account Managed Items.
I tested the app with the static response IDs and everything seems to work. I now want to test the app with real product Ids.
I created the app in the Google Play Store and uploaded a draft version of the app with the correct permissions. I now created an In-App-Billing item and published the item.
At the moment the app is unpublished. The item is created and published and I have a test account that is registered in the profile of the developer account and is the only account on the device that I use for testing. The app is signed with the same key as the uploaded draft. Edit:I'm testing with Android 4.1 && 4.03 at the moment
If I try to buy the item the Google Play Store pops up but shows a dialog with the following method: The item you requested is not available for purchase.
How can I test buying the item without publishing the app?
When you test the app, make sure you have exported and correctly signed it (not using debug key). Also make sure that you are using the correct Google account (registered test account) on the device.
Additionally, the registered test account cannot be the developer account.
Apart from this, it should work fine.
Note: Testing your own in-app purchases does require a valid credit card and actual payment.
And finally, it currently takes a few hours for market edits to propagate through the servers and show up.
It may take some time to reflect the changes on google play if you just uploaded the app and added the item there wait for some time near about 2 hr. it will be shown the item you want to purchase.
For others who reach this thread, Now it's not possible to test In-app billing with just a draft version of the app.
Draft Apps are No Longer Supported
Previously, you could publish a "draft" version of your app for testing. This functionality is no longer supported. Instead, there are two ways you can test how a pre-release app functions on the Google Play store:
You can publish an app to the alpha or beta distribution channels. This makes the app available on the Google Play store, but only to the testers you put on a "whitelist".
In a few cases, you can test Google Play functionality with an unpublished app. For example, you can test an unpublished app's in-app billing support by using static responses, special reserved product IDs that always return a specific result (like "purchased" or "refunded").
for details read https://developer.android.com/google/play/billing/billing_testing.html#billing-testing-test
You can test in-app billing by using options, look at this
Edit :
On the link I mentionned, you can see this :
Note: You do not need to publish your application to do end-to-end
testing. You only need to upload your application as a draft
application to perform end-to-end testing.
If you still can not test it, what you can do is to publish it and test it. If you think there might be bugs in your app's in-app billing, refunds are still a solution.
I'm thinking about something, on the dev site, you can see this :
Verify that your device is running a supported version of the Google
Play application or the MyApps application.
On what Android version are you testing on ?
You've to add the products(item sku) in you app product in your play store app account. The SKU you set In-App billine is not available. For testing, set the SKU androidtestpayment. Now you'll now get that error The item you requested is not available for purchase.

The item you have requested is not available for purchase

I am trying to test subscriptions in android app. I use dungeons example. I uploaded apk which is not published, but subscription items are published. I added new test account(gmail) in dev console which is not developer account. I reseted phone to factory and added test account. I installed signed apk(same version as uploaded).
When I try purchase I get "The item you have requested is not available for purchase" but I see in background item which I requested.
Some thoughts what can be problem here? Thanks
Same thing happened to me when I tested in-app billing, and there was no other way to overcome it but to actually publish the application. Once the application had "replicated" to Google servers (which took several hours, during which I got yet another obscure error message when trying to purchase anything), buying subscriptions worked fine.
use this link and refer table 1. I also faced this problem.http://developer.android.com/guide/google/play/billing/billing_testing.html#billing-testing-static
Have a look at that table than u will get that whats going wrong in your table.
I had the same problem. After changing the APK state from unpublished to Activate (in APK files tab) and waiting for 1 hour or so, the product ID could be purchased.
Make sure to upload the signed APK to developer console.
Make sure to install the signed APK on your device not launch the app in the debugger.
Make sure to create a test account in your developer console.
Make sure to sign in your device with your test account.
Make sure to create in app billing in your developer console and finally activate the item from the console!!! (this is the one that got me after fully following google's tutorial)

Categories

Resources