Restoring In-App purchases issue

So when I clicked restored for a brand new in-app purchase I made without ever initially buying it. It tells me it has been restored, and this occurs after I already buy the first in-app purchase with my sandbox user. Each In-App purchase is a non-consumable and has its own viewcontroller with its cooresponding productID, here is the restore action



@IBAction func restorePurchase(_ sender: Any) {

if (SKPaymentQueue.canMakePayments()) {

SKPaymentQueue.default().restoreCompletedTransactions()


}

Would it be because I have the same IBAction restore button in every swift file for each in-app purchase. Where am I going wrong?

Replies

The relevant code is in the updatedTransactions method. That should not get a call if there is no initial purchase. Are you saying that you get a call to updatedTransactions?