//发起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); }
/// <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); }
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); }