void purchaseSucceededEvent(GooglePurchase purchase) { Debug.Log("purchaseSucceededEvent: " + purchase); DataManagerAlarm.Instance.purchased_list.Add(purchase.productId); GameMain.Instance.Purchase(purchase.productId); }
public void queryInventorySucceeded(string json) { if (queryInventorySucceededEvent != null) { var dict = json.dictionaryFromJson(); queryInventorySucceededEvent(GooglePurchase.fromList(dict["purchases"] as List <object>), GoogleSkuInfo.fromList(dict["skus"] as List <object>)); } }
public void queryInventorySucceeded(string json) { if (queryInventorySucceededEvent != null) { Dictionary <string, object> dictionary = JsonExtensions.dictionaryFromJson(json); queryInventorySucceededEvent(GooglePurchase.fromList(dictionary["purchases"] as List <object>), GoogleSkuInfo.fromList(dictionary["skus"] as List <object>)); } }
void purchaseSucceededEvent(GooglePurchase purchase) { Debug.Log("purchaseSucceededEvent: " + purchase); if (purchase.productId == "teleport_up_no_ads") { Debug.Log("Purchased!"); PlayerPrefs.SetInt("NoAds", 1); } }
void consumePurchaseSucceededEvent(GooglePurchase purchase) { Debug.Log("consumePurchaseSucceededEvent: " + purchase); }
void purchaseSucceededEvent(GooglePurchase purchase) { Debug.Log("purchaseSucceededEvent: " + purchase); }
void consumePurchaseSucceededEvent( GooglePurchase purchase ) { Debug.Log( "consumePurchaseSucceededEvent: " + purchase ); }
void purchaseSucceededEvent( GooglePurchase purchase ) { Debug.Log( "purchaseSucceededEvent: " + purchase ); }
// online verification request (Android version) // here we build the POST request to our external server, // that will forward the request to Google's servers private void MakeRequest(GooglePurchase prod) { Dictionary<string, string> dic = new Dictionary<string, string>(); dic.Add("store", "Android"); dic.Add("pid", prod.productId); dic.Add("tid", prod.orderId); dic.Add("rec", prod.purchaseToken); IAPObject obj = GetIAPObject(prod.productId); if (obj != null && obj.type == IAPType.subscription) dic.Add("type", "subs"); StartCoroutine(WaitForRequest(dic)); }
// fired after a successful consumption (see PurchaseVerified()). // Method that fires the purchase succeeded action private void ConsumeSucceeded(GooglePurchase prod) { purchaseSucceededEvent(GetIAPIdentifier(prod.productId)); }
// fired when a purchase succeeds, Android version. // Optionally: verify new product transaction online private void PurchaseSucceeded(GooglePurchase prod) { string id = GetIAPIdentifier(prod.productId); if ((verificationType == VerificationType.onPurchase || verificationType == VerificationType.both) && !string.IsNullOrEmpty(serverUrl)) { MakeRequest(prod); return; } PurchaseVerified(id); }