mirror of
https://github.com/defold/extension-iap
synced 2025-09-27 17:12:18 +02:00
Added iap.acknowledge
This commit is contained in:
@@ -89,13 +89,20 @@ local function buy_listener(self, transaction, error)
|
||||
product_items["reset"] = transaction
|
||||
else
|
||||
log("iap.buy() ok %s", transaction.ident)
|
||||
log("iap.finish() %s", transaction.ident)
|
||||
iap.finish(transaction)
|
||||
if self.finish then
|
||||
log("iap.finish() %s", transaction.ident)
|
||||
iap.finish(transaction)
|
||||
elseif self.acknowledge then
|
||||
log("iap.acknowledge() %s", transaction.ident)
|
||||
iap.acknowledge(transaction)
|
||||
end
|
||||
end
|
||||
end
|
||||
|
||||
function init(self)
|
||||
self.log = {}
|
||||
self.finish = false
|
||||
self.acknowledge = false
|
||||
log("init()")
|
||||
msg.post(".", "acquire_input_focus")
|
||||
if not iap then
|
||||
@@ -125,5 +132,7 @@ function on_input(self, action_id, action)
|
||||
dirtylarry:button("pending", action_id, action, function()
|
||||
process_pending_transactions()
|
||||
end)
|
||||
self.finish = dirtylarry:checkbox("chk_finish", action_id, action, self.finish)
|
||||
self.acknowledge = dirtylarry:checkbox("chk_acknowledge", action_id, action, self.acknowledge)
|
||||
end
|
||||
end
|
||||
|
Reference in New Issue
Block a user