I submitted a project via a bug report but here:
If you take the example from here:
https://developer.coronalabs.com/reference/index/storeinit
Then replace the print statements with dispatchEvent:
local function transactionCallback( event )
local transaction = event.transaction
-- Transaction completed
if transaction.state == "purchased" then
Runtime:dispatchEvent({
name='onInAppPurchase',
status='purchased',
productId=tostring(transaction.productIdentifier),
date=tostring(transaction.date),
receipt=tostring(transaction.receipt),
transactionId=tostring(transaction.identifier)})
(Execution of transactionCallback() does not run anything here or further)
(status & productId is passed via the event, date, receipt, transactionId is not, but if I put print statements in instead, they are all valid.)
... (and so on for other states)
end
-- finish transaction
store.finishTransaction(transaction)
end
finishTransaction() will never run, if I pull out the dispatchEvent, it will run and the transactions will finish. Also all transaction information is not properly passed through the event. Only the first two variables.
[import]uid: 160288 topic_id: 35007 reply_id: 139232[/import]