mirror of
https://github.com/defold/extension-iap
synced 2025-06-26 18:07:44 +02:00
Include the offer token when buying
This commit is contained in:
parent
195ef400b5
commit
801179288e
@ -44,7 +44,13 @@ end
|
||||
|
||||
local function buy(id)
|
||||
log("iap.buy() " .. id)
|
||||
iap.buy(id)
|
||||
local options = {}
|
||||
local item = available_items[id]
|
||||
if item.subscriptions then
|
||||
local subscription = item.subscriptions[1]
|
||||
options.token = subscription.token
|
||||
end
|
||||
iap.buy(id, options)
|
||||
end
|
||||
|
||||
local function restore()
|
||||
|
Loading…
x
Reference in New Issue
Block a user