I have two phones and I tested both. It works but the payment window is maintained.
"Did you try to clear the cache and / or data in the Google Play Store app?"
I do not understand this, but I also tried clearing and running the app.
I can try and buy something in another app or on Google Play.
I did not write much code for in-app billing.
local function iap_listener(self, transaction, error)
if error == nil then
if transaction.state == iap.TRANS_STATE_PURCHASING then
print("Purchasing...")
elseif transaction.state == iap.TRANS_STATE_PURCHASED then
print("Purchased!")
elseif transaction.state == iap.TRANS_STATE_UNVERIFIED then
print("Unverified!")
elseif transaction.state == iap.TRANS_STATE_FAILED then
print("Failed!")
elseif transaction.state == iap.TRANS_STATE_RESTORED then
print("Restored")
end
else
print(error.error)
end
end
function on_input(self, action_id, action)
if action_id == hash("touch") and action.released then
local node_7 = gui.get_node("node_7")
if gui.pick_node(node_7, action.x, action.y) then
gui.play_flipbook(node_7, "menu_middle")
print("7 days free")
-- Register the function that will listen to IAP transactions.
iap.set_listener(iap_listener)
-- Initiate a purchase of a coin...
iap.buy("product_id")
end
end
end