Hi all
I am using the storekit plugin and trying to test a restore purchases button.
When I set up a fresh itunes test acount, fire up our app and hit the restore button it asks for credentials and then unlocks the content. There is no prompt saying you have no previous transactions as it does on the live Appstore. So the itunes account appears to have “bought” the content previously even though I have not. Making testing difficult.
Has anyone else come across this, just making sure incase we have made a mistake with our code.
void handler_restoreClicked ()
{
if(StoreKitBinding.canMakePayments()){
StoreKitManager.restoreTransactionsFinishedEvent += addPurchaseCompleteListener;
StoreKitBinding.restoreCompletedTransactions();
}
}
thanks
Matt
Just incase anyone else comes across this. It was the case of a simple if statement to make sure the transaction was true. What was happening was the content unlock from within the app was firing whether the user had made a purchase or not.
void handler_restoreClicked ()
{
if(StoreKitBinding.canMakePayments()){
addListeners();
StoreKitBinding.restoreCompletedTransactions();
}
}
So to answer my intitial question above. Test itunes account users can be used to test restore purchases. Once they have made a “purchase” you will need a new test user to buy it from fresh. They would be pretty useless otherwise!
cheers
Matt
Yeah your are right but…
But basically if you delete the app from your device and install it again…
… if the user wants to buy the item one more time, you’ll get a prompt saying you already bought the item once.
Finally pressing ok, you should receive the exact same datas if you was buying the item for the first time…
… and it should be the same behavior for your script to receive the datas, parse the content and to active the new item…
Maybe do not lost time with creating a new test user on each new attempt, it really works well this way o_<