- Home /
Question by
zadeh79 · Dec 25, 2019 at 04:03 PM ·
iapin app purchase
IAP purchase check with hasReceipt not working
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
}
}
Comment
Your answer
![](https://koobas.hobune.stream/wayback/20220612220630im_/https://answers.unity.com/themes/thub/images/avi.jpg)