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.
[import]uid: 8745 topic_id: 15463 reply_id: 315463[/import]

more info: this is on iOS platform using corona build 528 [import]uid: 8745 topic_id: 15463 reply_id: 57159[/import]