local store = require( "plugin.google.iap.v3") local storeMod = {} function storeMod.transactionListener( event ) -- body local tstate = event.transaction.state local transaction = event.transaction local tproductId = event.transaction.productIdentifier if tstate == "purchased" then if tproductId=="" then elseif tproductId== "" then end store.finishTransaction( transaction ) elseif tstate == "cancelled" then store.finishTransaction( transaction ) elseif tstate=="failed" then store.finishTransaction( transaction ) else print( "unknown event" ) store.finishTransaction( transaction ) end end function storeMod.startStore( platform ) -- body store.init( platform, storeMod.transactionListener ) end function storeMod.startPurchase( productId ) if store.canMakePurchases then store.purchase( productId ) end end return storeMod
Hi, I’m new to corona’s in-app purchasing. I just want to confirm whether the above mentioned code is enough and efficient for google in-app purchasing or something else i need to include or any corrections in that. Thanks in advance