Exemplo n.º 1
0
 //发起UnityIAP 支付请求
 public void Pay(EB.IAP.Item item, EB.IAP.Transaction transaction, Action <int, object> callback)
 {
     EB.Debug.Log("---------------------------GoogleSDKManager.Pay------------------------");
     currenTransaction = transaction;
     mPayCallback      = callback;
     if (!IsInitialized())
     {
         EB.Debug.LogError("GoogleSDKManager.Pay: not initialized");
         return;
     }
     EB.Debug.Log("---------------------------GoogleSDKManager.BuyProduct------------------------" + item.payoutId.ToString());
     BuyProduct(item.payoutId.ToString(), transaction.transactionId);
 }
Exemplo n.º 2
0
 /// <summary>根据id获取商品</summary>
 public bool GetGiftItem(int id, out EB.IAP.Item item)
 {
     EB.IAP.Item[] tempArray = EB.Sparx.Hub.Instance.WalletManager.Payouts;
     for (int i = 0; i < tempArray.Length; i++)
     {
         if (tempArray[i].payoutId == id)
         {
             item = tempArray[i];
             return(true);
         }
     }
     item = null;
     return(false);
 }
Exemplo n.º 3
0
 public override void OnOfferPurchaseSuceeded(EB.IAP.Item item, EB.IAP.Transaction trans)
 {
     base.OnOfferPurchaseSuceeded(item, trans);
     // Hotfix_LT.Messenger.Raise(Hotfix_LT.EventName.OnOfferPurchaseSuceeded, item, trans);
     GlobalUtils.CallStaticHotfix("Hotfix_LT.MessengerAdapter", "Wallet_OnOfferPurchaseSuceeded", item, trans);
 }