Help - How to reset the purchased state on a device? Once purchased, I can't return the device to non-purchased state.

I set up an In-App Purchase, and I tested in iTunes Connect Sandbox with test user 1. After test user 1 has successfully purchased the product, I am unable to revert the device back to the state where no purchase has been made.

Here's what I've tried:

Fact 1) I have store.init (transactionCallback) and transactionCallback(event) function in main.lua

Fact 2) transactionCallback function includes the standard if-statement that checks the status of event.transaction.state along with the print-statement, letting me know what it returns.

Step 1) Test User 1 successfully bought the product.

Step 2) Deleted the ad hoc build from the device on which Test User 1 bought the product.

Step 3) Created Test User 2 in iTunes Connect.

Step 4) Build and installed the new ad hoc build to the device.

Step 5) Checked to make sure the device isn't signed in by any user.

Step 6) Launched the game app on the device.

Step 7) As I monitor the terminal, I see that event.transaction.state is in "purchased" status. Because it's now always in "purchased" status, I can't check/test how my game should look & behave before & after the transaction, including what I want it to look when transaction fails or cancelled, etc.

How can I revert the "purchased" state to non-purchased state on a test device to test In-App Purchase in the sandbox environment? I need to tweak, update and test the store purchase experience. I don't think it's expected of any developers to have dozens and dozens of fresh device to test this. There must be a setting or function that I'm missing.

I'd very much appreciate any and all help. If you have key words suggestions for me to use in google search to find the solution to this problem, I'd be so happy to hear about it too.

views:1719 update:2011/10/22 17:28:16
corona forums © 2003-2011