Hi so i have tryed again and now the iapv3 is working but now i would like to unlock different thing depend on which item is bought . I assume when we press is show in the google popup item1 or item 2 so in the transactionCallback it should be able to detect the productID but i tried few different statement but cant get , in the corona sample it just dose local productID= tostring(event.transaction.productIdentifier) which i tried but did not work . I am using the code rob gave in his tutorial same as posted above but have 2 buy button
local buyBtn = display.newImageRect(“winbuton.png”, 100, 65) buyBtn :addEventListener( “touch”, removeAds ) --store.purchase( “item1” )
local buyBtn2 = display.newImageRect(“winbuton.png”, 100, 65) buyBtn2 :addEventListener( “touch”, removeAds2 ) --store.purchase( “item2” )
function transactionCallback( event )
local transactionid2 = tostring(event.products.productIdentifier)
local productID2= tostring(event.transaction.productIdentifier)
local products2 = event.products
local info2 = event.products.title
--transaction.productIdentifier
--local tstate = event.transaction.state
local products33 = products.productIdentifier
if event.transaction.state == “purchased” then
if event.transaction.productIdentifier == “item1” or transaction.productIdentifier == item1 or products33==“item1” or event.products.title==“Unlock Extra” then – or products2==“item1” or productID2==“item1” or transactionid2==“item1” then
native.showAlert(“Unlock normel succuessful”, “Thank you! Your support is greatly appreciated!”, {“Okay”})
else
native.showAlert(“Thank you!”, “Your support is greatly appreciated!”, {“Okay”})
myTable.worldunlock = 1 – unlock answer and all world & everything
end
the above code i only add the if statement and after payment success it did not even trigger any of the alert