Hey guys!
I’m having a problem with Google IAP plugin, the init method does not return the callback function that the doc says it should. I’m using corona docs sample code and I’m stuck.
local googleIAP = require( "plugin.google.iap.v3" ) -- Transaction listener function local function transactionListener( event ) print ("listener has been called") if not ( event.transaction.state == "failed" ) then -- Successful transaction print( json.prettify( event ) ) print( "event.transaction: " .. json.prettify( event.transaction ) ) else -- Unsuccessful transaction; output error details print( event.transaction.errorType ) print( event.transaction.errorString ) end end -- Initialize Google IAP googleIAP.init(transactionListener )
my build settings:
["plugin.google.iap.v3"] = { publisherId = "com.coronalabs", supportedPlatforms = { android=true } }, {...} usesPermissions = { "android.permission.INTERNET", "android.permission.GET\_ACCOUNTS", "android.permission.RECEIVE\_BOOT\_COMPLETED", "com.google.android.c2dm.permission.RECEIVE", ".permission.C2D\_MESSAGE", "com.android.vending.BILLING", "android.permission.ACCESS\_NETWORK\_STATE", "com.android.vending.CHECK\_LICENSE", },
my config.lua has the google key configured too.
license = { google = { key = "my ridiculously long key" } },
I’ve searched the forum and there is this thread:
https://forums.coronalabs.com/topic/62601-plugingoogleiapv3-issues-listener-is-never-called/
but the bug was never fixed, the user started using IAP Badger, which I’ve considered using, but since they don’t have documentation about enterprise (and I intend to migrate the project to enterprise soon) it didn’t help much.
I also have tried to delay the init after calling the require function, but it didn’t help either (someone mentions it in the thread above), so I’m running out of options. My game is published in Beta and Alpha, my tester accounts are set and they are not the same as the account that manages our play store profile. The package that has been uploaded is signed with the same keystore and the same package name, does anyone have a clue of what is happenning?
Corona guys, is this a known issue, do you intend to solve it? I find it very hard to believe this is a bug, because only me and the guy in that thread above had this problem and IAP aren’t really something that people miss, is there something that I am missing?
Thanks