Android in-apps need some help

Hi to all.

I’m new in in-app system and faced some problem with google play.

There is a code which perfectly works with apple storebut have a problem with google…

local function storeTransaction(event) local transaction = event.transaction local alert1 = native.showAlert( "State", "event.transaction.state", { "OK"}) if event.transaction.state == "purchased" then native.setActivityIndicator(false) local alert = native.showAlert( "Complete", "Purchase was successful", { "OK"}) -- Here some game data store.finishTransaction( transaction ) elseif event.transaction.state == "refunded" then native.setActivityIndicator(false) store.finishTransaction( transaction ) elseif event.transaction.state == "cancelled" then native.setActivityIndicator(false) store.finishTransaction( transaction ) elseif event.transaction.state == "failed" then native.setActivityIndicator(false) store.finishTransaction( transaction ) else native.setActivityIndicator(false) store.finishTransaction( transaction ) end end if store.availableStores.apple then store.init( "apple", storeTransaction) elseif store.availableStores.google then store.init( "google", storeTransaction) end native.setActivityIndicator(true) if Id == "500candies" then store.purchase({productList[1]}) elseif Id == "1200candies" then store.purchase({productList[2]}) elseif Id == "5000candies" then store.purchase({productList[3]}) end 

Store init - OK

Purchase - I receive the receipt on payment via e-mail and confirmation of successful transaction in app (not my --local alert = native.showAlert( “Complete”, “Purchase was successful”, { “OK”})   but DEFAULT Google play) 

After that no respond from transaction 15-20sec, then receive 4 alerts

alert1 = native.showAlert( “State”, “event.transaction.state”, { “OK”})

FAILED

FAILED

FAILED

FAILED

How can it be?