Hi everyone,
I’m trying to get my IAP to work properly but so far the only thing that seems to work is the purchase. I noticed that when purchasing the add-ons in my game, the screen sits there for a while before the purchase is processed. This would seem to the user like the app is frozen when it isn’t. I then thought I would put a “loading” message on the screen which works well, however if I were to start the purchase process then cancel it, the loading message gets stuck on the screen. I have tried removing the loading message in the “cancelled” transaction state but none of the states seem to do anything except the “purchased” state. I am using the transactionCallback function in the IAP sample code. Any ideas? Has anyone else successfully put a loading indicator in their app that will disappear when cancelled? Please help!
[code]
function transactionCallback( event )
local infoString
if event.transaction.state == “purchased” then
elseif event.transaction.state == “restored” then
elseif event.transaction.state == “refunded” then
elseif event.transaction.state == “cancelled” then
elseif event.transaction.state == “failed” then
else
end
– Tell the store we are done with the transaction.
– If you are providing downloadable content, do not call this until
– the download has completed.
store.finishTransaction( event.transaction )
end
[/code] [import]uid: 31262 topic_id: 30831 reply_id: 330831[/import]