Example fixes

This commit is contained in:
Alexey Gulev 2019-09-18 14:45:45 +02:00
parent 04a09e18db
commit 81e04c496f
2 changed files with 3 additions and 2 deletions

View File

@ -21,7 +21,7 @@ dependencies = https://github.com/andsve/dirtylarry/archive/master.zip
include_dirs = extension-iap include_dirs = extension-iap
[ios] [ios]
bundle_identifier = com.defold.iaprtestapp bundle_identifier = com.defoldextension.push
[iap] [iap]
auto_finish_transactions = 0 auto_finish_transactions = 0

View File

@ -20,7 +20,8 @@ local function list_callback(self, products, error)
end end
local function buy_listener(self, transaction, error) local function buy_listener(self, transaction, error)
if not error and transaction.ident == "nonconsumable" then pprint(transaction, error)
if not error and iap.get_provider_id() == iap.PROVIDER_ID_GOOGLE and transaction.ident == "nonconsumable" then
local name = "reset/larrylabel" local name = "reset/larrylabel"
gui.set_color(gui.get_node(name), vmath.vector4(1,1,1,1)) gui.set_color(gui.get_node(name), vmath.vector4(1,1,1,1))
product_items["reset"] = transaction product_items["reset"] = transaction