I am getting this error when I try to buy the same item for a second time. The first time it works perfectly but i cant buy the item for a second time.
All of my products are consumable products and im in sandbox mode. Here is my code. Why am I getting this error?
local function transactionCallback( event ) print("In transactionCallback", event.transaction.state) local transaction = event.transaction local tstate = event.transaction.state store.consumePurchase(listOfProducts) if tstate == "purchased" then print("Transaction succuessful!") if transaction.productIdentifier == "com.company.item" then --do stuff store.finishTransaction( event.transaction ) store.consumePurchase({"com.company.item"}) elseif transaction.productIdentifier == "com.company.item2" then --do stuff store.finishTransaction( event.transaction ) store.consumePurchase({"com.company.item2"}) end store.finishTransaction( event.transaction ) store.consumePurchase(listOfProducts) elseif tstate == "restored" then store.finishTransaction( event.transaction ) elseif tstate == "refunded" then store.finishTransaction( event.transaction ) elseif tstate == "revoked" then -- Amazon feature elseif tstate == "cancelled" then store.finishTransaction( event.transaction ) elseif tstate == "failed" then store.finishTransaction( event.transaction ) else store.finishTransaction(event.transaction ) end store.finishTransaction( event.transaction ) end