- Home /
Purchase not being acknowledged on google store
I have an option to remove ads in my game, it is a one time purchase and when using the google test purchase I will get an email about 5 minutes after the purchase stating that the test purchase was cancelled because it was not acknowledged. I have done some research but not had any luck on how to fix this. Below is a screenshot of my IAP button. I have ensured I am updated to the latest package. I have the consume purchase box checked. Any idea as to what may be causing this?
using System.Collections;
using System.Collections.Generic;
using UnityEngine;
using UnityEngine.Purchasing;
public class RemoveAds : MonoBehaviour
{
public GameObject button;
public GameObject button2;
IStoreController controller;
public void Start()
{
if (PlayerPrefs.HasKey("ads"))
{
button.SetActive(false);
button2.SetActive(false);
}
}
public void RemoveAdverts()
{
if (PlayerPrefs.HasKey("ads") == false)
{
PlayerPrefs.SetInt("ads", 0);
button.SetActive(false);
button2.SetActive(false);
}
}
public void Restore()
{
if (controller.products.WithID("cowabductor.removeads").hasReceipt)
{
PlayerPrefs.SetInt("ads", 0);
button.SetActive(false);
button2.SetActive(false);
}
}
}
Your answer
Follow this Question
Related Questions
How to use Google play billing library 3? 0 Answers
IAP Restore purchase on Android "Already Recorded Transaction" 0 Answers
how can I make a IAP Subscription code in unity 2019.1.9 for google play ? 0 Answers
Unity IAP + Google Play Promo Codes 0 Answers
Google Play IAP - "The item you requested is not available for purchase." 1 Answer