Ambiguous error messages within Trivial Drive - android

I am attempting to get google's example (in-app purchasing version 3) test app "TrivialDrive" to work, but have the following problem:
I click the "buy gas" button, this brings up the following screen:
There are two possible interpretations of this message:
The item is unavailable THEREFORE this user can not get it.
The user is somehow not eligible to purchase this item THEREFORE the item is unavailable.
So which is it? And why might I be getting this error anyway?
By the way the app has been uploaded to my developer account yesterday, so I have far exceeded the 2-3 hour wait Google recommends for the data to be in the system.
Also I have "Play Store" installed on the device.
Just for good measure here is a screen grab from my developer account:
I am running the app from a device registered with a gmail address which is on my developer's "Test Accounts" list.
EDIT: I just tested another app of mine which used the old-style (Version 2) billing system and it reported "Please first complete your account by adding a payment method". So it would seem that the lack of payment method was the ultimate cause - but I wouldn't want potential customers to be presented with such a useless and misleading error message. I did a search for "item unavailable" in the MainActivity.java and the strings.xml and found nothing, so am at a loss as to haw to avoid this scenario.

I see that you have yet to publish the overarching app that the in-app product is supposed to stem from. As a result, Google does not allow you to pay for an in-app product if the application itself has yet to be published. Once you release the application and publish it, you should be able to access the in-app product's sales page.
An in-app product will appear UNPUBLISHED until the owning application is published.
Even if you were to publish your in-app product, nobody can buy it until your actual application is.

Have you setup a test account? The test account should not be the your google play dev account.
Explained here

Related

Android "The payment method has been declined" for every payment method

I'm trying to implement in-app billing using Android, but I'm getting a weird error and I can't find anyone online with a similar problem.
I've done the following:
Uploaded APK with billing permission to developer console as alpha
build.
Added Google group to test, with my personal gmail account as
a member.
Gone to the opt in URL and become a tester.
Added my personal gmail account as an account enabled for testing (in settings > account details).
Created a non-consumable product and set it to "active".
Waited 24 hours.
Put a signed release build on my phone.
When I press the "Buy" button, it opens the store dialog, which says "This is a test order, you will not be charged". All seems good so far, but every payment method says "This payment method has been declined." so I'm unable to continue. This includes Google Play balance, Amex card, Visa and PayPal account.
I've tried the following, none of them worked:
Used a different google account for test payments.
Removed my account from the list of test accounts in the developer console settings to try and use with "real" transactions.
Tried a different device.
Tried creating a different product.
Any thoughts on what might be wrong?
Google support have advised that the error is caused because the merchant account is "under review". They're looking into the reasons for the review and attempting to resolve the issue. I'll update this answer with their final response.
The best advice is to contact Google support through the merchant help centre: https://support.google.com/merchants
Update: Google fixed the account and it started working straight away. You definitely need to contact them to get this sorted.

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.

User is not eligible for this purchase - in app billing

I'm getting
"User is not eligible for this purchase"
message from google play while trying to purchase as a test.
I've uploaded singed apk in google play, published the billing item(in app product), saved the apk as draft, still getting this error.
Also I was trying to purchase from test user device.
Edit:
The actual reason for this error:
If an unauthorized user try to purchase an item then this message
should appear.
So if the App is not published, a non test user should get this error while try to purchase.
I realized that, Google play takes time to update the changes in app store. So you can not expect the changes immediately. Rather you should wait, in my case it took average 2/3 hours.
Still there may be some unknown error, which I could not figure.
My Cases:
First I was trying to purchase from my test device still got this error, But after waiting some time I didn't get this error. So I think the time was reason here.
Secondly I was trying from a non test device, which was an unauthorized device as the app was not published.
You must use, only, Test Account for Testing purposes. You can not use market account or others for purchasing your app while Testing.
From Android Docs
The synchronous response for a CHECK_BILLING_SUPPORTED request provides a Bundle with a server response code. A RESULT_OK response code indicates that in-app billing is supported; a RESULT_BILLING_UNAVAILABLE response code indicates that in-app billing is unavailable because the API version you specified is unrecognized or the user is not eligible to make in-app purchases (for example, the user resides in a country that does not allow in-app billing). A SERVER_ERROR can also be returned, indicating that there was a problem with the Google Play server.
see details here
This error comes when everything you done is perfect, you have used signed APK with the proper product id, but you have to note that the account that you are using might don't have proper valid credit card details.
So whenever you want to buy any product even with test account, that account should have valid credit details.
You have to specify test account in Edit profile of your publisher account
Licensing & In-app Billing
Test Accounts box
There is a now an additional situation which can result in the "User is not eligible" message.
It comes down to this recent change in the licensing system:
The Licensing keys are now managed for each app individually. To see
the license key for an application, switch to the new design and go
to the Services and APIs for the application
You can no longer use the old "shared" license key when creating new apps. You must switch the Google play developer console to the "new design" and use the license key for each specific app from that app's Services and APIs section.
If you try to use the old shared key the behavior is as follows:
If app is not yet published, tester will receive "User is not
eligible for this purchase" message.
If app is published, user will go through purchase process and
be charged for purchase, but the app will not receive a "purchase success" message.
TL;DR: Make sure you are using the new per-app license key and that you have copied it correctly.
I had the same issue.
I fixed it by uploading apk via "Old Design" of Developer Console.
Steps:
rename application package.
create release build and sign it with your developer key.
upload it to the Developer Console Old Design. You will be asked about switching to the new design for getting public key. DON'T do it.
Perform all next actions from Old Design.
After creatind and publishing inApp content switch to the New Design and take your application security key.
Put new key to your application, rebiuld and resign.
Install your application to the device.
Wait 2-3 hours.
Profit.
lved it. There is some problem in the "New Design" of Developer Console. I deleted the apk and created a new app from "old design" and it worked. Price points(In-App products) got automatically added again as the app package name is exactly the same as old one I deleted.
Also make sured the new public key is used which is app specific now.
Make sure you fill in the #gmail.com address as a licensed test account. Other e-mail addresses associated with your Google account will NOT work.
For the "Unpublisched" app, enter your email account under "Account details" and "Gmail accounts with testing access" in Play Developer Console. Also one need to wait 24 hours.
The android:versionCode set in the Manifest must be the same as the one active in Google Play console
I met this problem and was bothered for one or two day.I delete the test device's gmail and added it again. After then it works.

Problems with Android billing sample app

I followed all of the steps for running the Android billing sample app in http://developer.android.com/google/play/billing/billing_integrate.html#billing-download
I succeeded to buy an item, but there are several issues:
when I select an item to buy, I first get an "Item not found" error, and when I click "ok" I see the product in google play. does this happen to anyone else?
I purchased several new items, I see on my google checkout account that the order is "shipped" BUT in the billing test app, under "Items you own" I don't see anything...
in http://developer.android.com/google/play/billing/billing_integrate.html#billing-download they suggest to
refund purchases that are made with test accounts, otherwise the
purchases will show up as actual payouts to your merchant account
where can I perform the refund? in my google checkout account the "Refund some money" item is greyed out...
Does anyone know how to handle these issues?
They are several reasons
check your products are published or not.
your APK in draf mode or not.
Products must be Activate.
First create TestMails in developer console under Licence key.and your device must have using this mail id as primary mail id of device.

Do test accounts require real credit card to purchase via In-app Billing?

Inching slowly (but methodically) towards my first implementation of In-app Billing, I reached the point in which I can actually run the market billing sample application: The app is signed and uploaded to the AM, the "product list" has been created per the instructions and a test account has been set in both Google and the phone.
But when I proceed (successfully) with a purchase, despite selecting the test account on the AM, I am prompted to confirm the purchase with my real gmail account, to which my real credit card is linked.
When testing PayPal, for example, one can create test accounts, too, with fake CC numbers, to test freely w/o burdening the real CC system.
Is this available (or possible) for In-app Billing development & testing, too?
Update: I tested this on a different device, having only the test account set, and sure enough the Android Market behaves erroneously, responding the following error message:
The item you were attempting to purchase could not be found.
I know that the item is there and that it is set up properly in the Android Market because this error is never issued on the device with the real account with the CC number (there I receive a perfect behavior with the masked CC number, the Total and an Accept & buy button). Why does Google write such misleading error messages?
Update: I found this incredible thread, which seems to partially answer my question. Unless something new has been introduced by Google since then.
You have to use a real credit card. However, you can always refund your test purchases!
Note that you'll have to make the purchases from a test account that's separate from your developer account, since Google Checkout doesn't allow an account to buy from itself.
Test accounts are useful when you upload your application as a draft application,not published.Then using test account you can do even purchase of unpublished application.Hope this helps.

Categories

Resources