Hi All,
I am in the process of testing out the IAP of my first word game for IOS. The transaction seem to go through fine after identifying the IAP product correctly, but the number of coins do not add up. If I try again, I get the message "You’ve already purchased this IAP but it hasn’t been downloaded:. Am I missing something here? My code is below:
==============================================================
local store = require( “store” )
store.init( “apple”, storeTransaction )
local function storeTransaction( event )
local transaction = event.transaction
if ( transaction.state == “purchased” ) then
--handle a successful transaction here
print( “productIdentifier”, transaction.productIdentifier )
print( “receipt”, transaction.receipt )
print( “signature:”, transaction.signature )
print( “transactionIdentifier”, transaction.identifier )
print( “date”, transaction.date )
coinscnt = (coinscnt + 400)
coinsText.text = (coinscnt + 400)
end
store.finishTransaction( event.transaction )
end
local function buyscrL400(event)
store.purchase( { “com.tsrglobal.fourwords1groupInapp.C400” } )
rembuyScr()
return true
end
==================================================
Also is it possible to display some debug messages on devices like iphone or ipad, like we do in the terminal?
thanks!