When the user calls restorePurchases(), the non-consumable com.premium is restored even thought they do not own it. Here are the functions that are responsible for the restoring
You should not update any purchase status in paymentQueueRestoreCompletedTransactionsFinished
. This function just lets you know that the restoration process has completed. You could use this to update your UI or display an alert or something.
The restoration process delivers the transactions to be restored to the updatedTransactions
function where you handle the .restored
state in the same way that you handle the .purchased
state.
Essentially "restore" just replays the purchase transaction process for non-consumable and auto-renewing subscription purchase types.