Hi,
i receive the answer “invalidProducts 1 (…product id)”. The store parameters are true (store.isActive,store.canMakePurchases,store.canLoadProducts)
Here is my code:
1. the shop lua archive
[lua]
buyableProducts={products array}
local validProducts, invalidProducts = {}, {}
local store = require (“plugin.google.iap.v3”)
function transactionCallback( ev )
local transaction = ev.transaction
for i,v in pairs(ev) do
print(i,v)
end
store.finishTransaction(transaction)
end
function loadProductsCallback( event )
validProducts = event.products
invalidProducts = event.invalidProducts
for i,v in pairs(validProducts) do
print(“validProducts”,i,v)
end
for i,v in pairs(invalidProducts) do
print(“invalidProducts”,i,v)
end
end
store.init ( “google”,transactionCallback )
store.loadProducts( buyableProducts, loadProductsCallback )
[/lua]
2. build.settings
[lua]
settings = {
plugins={
[“plugin.google.iap.v3”]=
{
publisherId=“com.coronalabs”,
supportedPlatforms={android=true},
},
},
orientation = {
default = “portrait”,
supported = { “portrait” }
},
– Android permissions
android={
versionCode=“11”,
usesPermissions={
‘com.android.vending.BILLING’,
‘android.permission.VIBRATE’,
‘android.permission.INTERNET’,
‘android.permission.WRITE_EXTERNAL_STORAGE’,
‘com.android.vending.CHECK_LICENSE’,
},
},
}
[/lua]
3. i have also written the license key in config lua
[lua]
application = {
content = {
},
license={
google={
key=“my key”,
},
},
}
[/lua]
Any ideas? What could cause the problem?