Just wondering.
While testing my IAP setup, I encountered the situation that the App Store tells me the product was already purchased but not downloaded.
How should you handle a situation like this?
In the callback routine there does not seem to be an event that says “resuming” or such.
Should the IAP handle this automatically after init()?
Using a Restore button does work, but unfortunately the default iTunes reply does not include such a suggestion to the suer.
BTW, I’m using the standard structure for the callback routine (see below). Could it be that the FinishTransaction call should be somewhere else?
function transactionCallback( event )
if event.transaction.state == "purchased" then
print("Bought: " .. event.transaction.productIdentifier)
elseif event.transaction.state == "restored" then
print("productIdentifier", event.transaction.productIdentifier)
print("receipt", event.transaction.receipt)
print("transactionIdentifier", event.transaction.transactionIdentifier)
print("date", event.transaction.date)
print("originalReceipt", event.transaction.originalReceipt)
elseif event.transaction.state == "cancelled" then
print("Transaction cancelled by user.")
elseif event.transaction.state == "failed" then
print("Transaction failed, type: " .. event.transaction.errorType .. "\n" .. event.transaction.errorString)
else
print("Unknown event")
end
store.finishTransaction( event.transaction )
end
Thanks
[import]uid: 123200 topic_id: 26331 reply_id: 326331[/import]