HI All,
I have implemented IAP in my game to "RemoveAds", i used Unity IAP and the sample code (Below) this is not the full code but the section that requires the function, in my LevelManager script i have created bool set it to true and i check it before an ad is played, like so, PlayerPrefs.GetInt ("RemovedAds", 0) == 0) ..... the whole thing works, i send to alpha testers and they purchase the item but the ads still play, any ideas why?
` // Or ... a non-consumable product has been purchased by this user.
else if (String.Equals(args.purchasedProduct.definition.id, kProductIDNonConsumable, StringComparison.Ordinal))
{
Debug.Log(string.Format("ProcessPurchase: PASS. Product: '{0}'", args.purchasedProduct.definition.id));
// TODO: The non-consumable item has been successfully purchased, grant this item to the player.
PlayerPrefs.SetInt("AdsRemoved", 1);
PlayerPrefs.Save();
Debug.Log("Purchase Complete");
}`
↧