How to test InAppPurchases

Hello!
I want to test IAP in my game. On iTunesconnect I’ve created a record for the game (without uploading binaries there) and created 1 in-app-purchase items for this game (right now the status of it “Waiting for screenshot”).
In my app everything is pretty simple:

  1. Calling store.init( onInappPurchase )
  2. On button press calling store.purchase{ inapp_id }
  3. Waiting for transaction end
    My debug string shows me that store.purchase() is called OK. But my onInappPurchase () handler never called.
    So it looks like in-app-purchase doesnt work like this.
    Is therer any way how I can text it in other way?
    Any help will be really appreciated!!!
    Thanks!

P.S.
Here tis the code I have for all this purchasing process:
[lua]store.init( onInAppPurchase )
–[[…]]
function onItemBuy( event )
if( store.canMakePurchases ) then
if( event.target.isVisible == true ) then
local item = event.target.item
print( “onItemBuy”, item.type_id )
–dbg.text = "Buying "…item.inapp_id
–dbg:toFront()
native.showAlert( "Buying "…item.inapp_id, { “OK” } )
store.purchase{ item.inapp_id }
end
end
end
–[[…]]
function onInAppPurchase( event )
local transaction = event.transaction
–dbg.text = transaction.state
–dbg:toFront()
native.showAlert( transaction.state, { “OK” } )
if( transaction ~= nil and transaction.state == “purchased” ) then
local item = getItemByInAppId( transaction.productIdentifier )
if( item ~= nil ) then
local isOK = markItemPurchased( item )

if( isOK == true ) then
hideBuyButtons( event.target.parent )
end
end
end

end[/lua]
[import]uid: 67485 topic_id: 19906 reply_id: 319906[/import]

It may be worth reviewing the sample code for IAP.

Assuming you’re hooked up to Xcode are you getting anything unexpected (or errors) in the console? [import]uid: 52491 topic_id: 19906 reply_id: 77491[/import]