In App Purchase no longer working

I am converting a game to IAP model. I have another game with IAP so I just copied the code. It has the standard callback function

function transactionCallback( event )
local infoString
if event.transaction then
print("transaction state ", event.transaction.state)
end
if event.transaction.state == "purchased" then
...
end

But in this new game I always get this log:

Sep 22 12:54:41 sheldons-iPhone-4 trunk[4222] : Error setting audio session active! 560030580

Sep 22 12:54:41 sheldons-iPhone-4 sandboxd[4233] : trunk(4222) deny file-write-create /Applications/.dat107e.01e

When I do an IAP, I am prompted with the iTunes test account login, then after logging in I was informed I already bought the IAP but I haven't downloaded it yet. Then after I click "OK", nothing happens, and the above log appears. No information about the transaction event was ever present. What was I doing wrong?

Thanks.

more info: this is on iOS platform using corona build 528

views:1379 update:2011/10/15 21:01:16
corona forums © 2003-2011