Iab

From GiderosMobile
Revision as of 13:06, 7 March 2019 by Apollo14 (talk | contribs) (Created page with "===== Code example: ===== local test = IAB.new("test") test:addEventListener(Event.AVAILABLE, function(e) --provide setup stuff (framework specific) test:setUp("value1", "v...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Code example:

local test = IAB.new("test")

test:addEventListener(Event.AVAILABLE, function(e) --provide setup stuff (framework specific) test:setUp("value1", "value2", "value3") test:purchase("product1") --purchase something end)

test:addEventListener(Event.PURCHASE_COMPLETE, function(e) --unlock your purchase here print(e.productId, e.receiptId) test:confirm(e.productId) end)

test:isAvailable() test:restore()