Hi i use following to restore my IAPs. now google and Unity IAP plugin provide automatic IAP restore but some how automatic restoration of IAPs don’t work always so i use this to manually restore my IAPs on button press.
public void Resore()
{
if (m_StoreController.products.WithID("com.your.iap.id.1").hasReceipt)
{
// IAP success results.
}
if (m_StoreController.products.WithID("com.your.iap.id.2").hasReceipt)
{
// IAP success results.
}
.
.
.
.
if (m_StoreController.products.WithID("com.your.iap.id.N").hasReceipt)
{
// IAP success results.
}
this only works with non consumable and subscriptions.
You feel like you need to do something extra to perform the enabling of already purchased items but you don’t.
When the app is deleted or downloaded on a new phone, the IAP’s back end process will call the ProcessPurchase Function you have specified from the IStoreListener class on each item being restored(this is saved internally on each players google account). So what ever code was executed for when the player originally bought the item is executed again, there for re-enabling it.