- Home /
Question by
DeveloperSalmon · Oct 30, 2018 at 10:17 PM ·
androidunityeditornot workingnoobiap
IAP doesn't work in google play store (on device) but works fine in the editor.
Hi guys, I would really appreciate some help. This is the first time trying to integrate iap into my game and when I published it on google play I soon realised that when you pressed the iap button nothing would happen. The product ID's are the same and in the google play console the iap are "active."
Here is my code but perhaps this is not where the problem is.
public class iapworking : MonoBehaviour
{
public GameObject theiapbutton;
public GameObject thegameobject;
private bool isCoroutineExecuting = false;
public void Fulfill(Product product)
{
if (product != null)
{
Invoke("onpurchase", 0.1f);
}
}
public void onpurchase()
{
theiapbutton.SetActive(false);
thegameobject.SetActive(true);
}
}
Comment