I am trying to check purchase of nonconsumable with a call to the following custom function in IAP script. For some reason it is not working. ... ..
public void checkpurchase() //check for purchase receipt
{
InitializePurchasing();
Product product2 = m_StoreController.products.WithID(purchasegame);
if (product2 != null && product2.hasReceipt) //check for receipt
{
//if receipt verified DO THIS STUFF BELOW
buythisgamebutton = GameObject.Find("Button3"); //select purchase game button
buythisgamebutton.SetActive(false); //hide purchase game button
}
}
↧