public PurchaseCompletedEventArgs(Product product, PurchaseCheckingState checkingState, SpecialOffers.Replacement replacement, string soPayload = null, string originReceipt = null) { this.product = product; this.checkingState = checkingState; this.replacement = replacement; this.soPayload = soPayload; this.originReceipt = originReceipt; }
public void Buy(SpecialOffers.Replacement replacement) { if (_store == null) { throw new UnityException("Not properly inited"); } Check(); LogUtils.Log("Buy special offer " + replacement.sku); if (!replacement.product.availableToPurchase) { LogUtils.Log("Product " + replacement.product.definition.id + " is not available to purchase"); return; } _store.InitiatePurchase(replacement.product, null); }
public void UpdateView() { if (!info) { return; } _coins.text = info.coins.ToString(); _price.text = "$" + info.price.ToString(); _icon.sprite = info.icon; _so.enabled = false; replacement = Gow.GetReplacement(info.name); if (replacement != null) { Debug.Log("Best price"); _so.enabled = true; _price.text = "$" + replacement.price.ToString("#.##"); } }
/// <summary> /// Initialize start of purchasing special offer. /// </summary> /// <param name="replacement">Special offer to buy</param> public static void Buy(SpecialOffers.Replacement replacement) { Controller.instance.Buy(replacement); }
public ReplacementEventArgs(SpecialOffers.Replacement replacement) { this.replacement = replacement; }