Thanks for tour help! I still didn’t get the email-link and I’m the only one tester, so can I put directly the apk in my device or I must download it by the link?
On the device test, a tablet, I use a different email than my publisher email but it’s the same person registered (my name/first name) and same credit card. Could it be the reason of that authentication error?
Yes it could be.
You can install it from the computer but make sure it is the same version as the one published.
As far as I remember you must add the e-mail addresses of devices registered as testers. That means
that they need to get access to the download. If that causes an error when trying to purchase inside app,
I am not sure about it.
I do know that the error of “error authentication is required” should not occur just because it is you who is testing it.
I used my developer account to test my purchases and the error given should be in this case “the publisher can not make purchases…”
and not the error above. That means you can try using your developer account to test your purchase to get that error.
the authentication problem can be caused by many things:
-
if you did not activated the in-app purchases after submitting them.
-
if you did not write the full name of the item, both in the store and inside your application. e.g: “com.mywebsite.myapp.item1”.
-
if for some reason your account registration in your mobile phone got corrupted and needed to be reset.
-
and many more bugs.
Interesting all what you said!
So, before thinking about an email conflict I should have the error “the publisher can not make purchases…” instead of “error authentication is required”. Well, already 4 days I try to understand why…
I continue my investigations, for now, I’m here:
-
Beta APK is in production (the same uploaded on Google Play and put in the mobile)
-
in-app purchases (managed) activated
-
full name of item in store and code
-
License key copied in config.lua
local store=require(“store”) local file=require(“lib_file”) local googleIAPv3=false local inapp_data local buy_btn local txt1 local function transactionCallback(evt) local transaction=evt.transaction local tstate=evt.transaction.state if tstate==“purchased” then local tdate=math.floor(transaction.date/1000) local timeStamp=file.makeTimeStamp(transaction.date,“ctime”) if timeStamp+360<os.time() then tstate=“restored” end end if tstate==“purchased” or tstate==“restored” then inapp_data.paid=true file.save(inapp_data,“inapp_data.txt”) buy_btn.isVisible=false txt1.text=“Full Game Purchased!” end txt1.text=tstate --Close the transaction store.finishTransaction(transaction) end local function buyGame(evt) if evt.phase==“ended” then if store.isActive then store.purchase(“com.bitlines.inapp.fullgame”) else txt1.text=“Store not active…” end end return true end ------------------------------------------------- if system.getInfo(“platformName”)==“Android” then store=require(“plugin.google.iap.v3”) googleIAPv3=true end inapp_data=file.load(“inapp_data.txt”) if inapp_data==nil then inapp_data={} inapp_data.paid=false file.save(inapp_data,“inapp_data.txt”) end if googleIAPv3 and not inapp_data.paid then timer.performWithDelay(1000, function() store.init(“google”,transactionCallback); store.restore(); end) --Button to buy the full game buy_btn=display.newRect(200,200,100,100) buy_btn:addEventListener(“touch”,buyGame) end txt1=display.newText("…",150,50,nil,30)
settings = { orientation = { default = “landscapeRight”, supported = {“landscapeRight”}, }, plugins = { [“plugin.google.iap.v3”] = { publisherId = “com.coronalabs”, supportedPlatforms = { android=true }, }, }, android = { usesPermissions = { “android.permission.INTERNET”, “android.permission.ACCESS_NETWORK_STATE”, “android.permission.RECEIVE_BOOT_COMPLETED”, “com.android.vending.BILLING”, “com.android.vending.CHECK_LICENSE”, }, }, }
application = { content = { width = 480, height = 800, scale = “letterbox”, xAlign = “center”, yAlign = “center”, }, license = { google = { key = “MIIBIjANB…”, }, }, }
Everything looks quite alright. One thing though and I don’t speak french, I see that the app is in ‘production’ mode, not in alpha/beta.
(you can see it in the picture)
Did I make the right assumption?
by the way try not revealing your app google code, like you did in your picture and in your code, it should be private.
Second thing, did you try buying using google’s ’ android.test.purchased’ as an id instead of real purchase id?
Other things that jump into my mind:
- Did you create a new keystore for your app and used it to make your build? (may have nothing to do with your error, but still will remove other errors connected with duplication of apps using same keystore).
- Try creating a google group (in google groups), add an email of a friend that can help you test your purchase on his phone (by sending him/her an invitation) after he accepts go to google play console and add as a test group (the name of the group/address)
if app is in BETA mode or ALPHA mode then that is possible. shortly an link to your app will be available to you to send him, and he can try downloading it and testing it for you.
Your right, it was in Beta but nothing happened so I pressed the button to convert it into “production”… not correct?
Did you mean, the apk must stays in Alpha/Beta then press the button “Publish” (and so, I need to fill all formulars with all screenshots, icons, prices,categories, etc…) just to test this sample code?
What do you mean by " android.test.purchased"? Where do you see this?
Yes. the app should be in alpha/beta mode when you publish it. Production mode means it is now on the google play store available for download by the public.
You do not have to add all details when you publish it in beta mode, but you do need to add all required data like images and so.
You don’t even have to use the real images. just google some images in the same resolutions you need for each one and use it for now. Of course remember to replace it when publishing in production mode. In description just write a word or two.
Look for the Testing with Static Responses section in the middle of the next link:
http://developer.android.com/google/play/billing/billing_testing.html
it will explain to you the idea of testing demo purchases that just return “purchase”/“cancelled” and the like, instead of real buying.
The link in general will guide you in testing your app on google play.
Ahhh okk!!! It was so confused in my mind (publication and production) and in same time strange to add fake data just to test a sample code! Well, thank you, I think I will reach the goal soon!
Hi Jay (J. A. Whye),
May I ask how you solved this problem at the end?
I have very troubling experience with this:
-
IAP worked while app was tested in Alpha.
-
Promoted my app to Production.
-
IAP did not worked (adb reported the same problem as in your case).
-
Tried even on other peoples phones… same error happens to them while app was in production.
-
Unpublished my app and renamed it.
------------------ NEW APP
-
Signed new app with completely new keystore (app is published in Alpha).
-
IAP`s are active in Google Play Console.
8) Same problem again!
One last question:
My app is FREE with IAP inside.
Are following lines required for FREE apps:
main.lua
local licensing = require( "licensing" ) licensing.init( "google" )
build.settings
"com.android.vending.CHECK\_LICENSE",
When the Beta was published my problem was fixed and the app in production workded too. In my build seeting I use also :
“com.android.vending.BILLING”,