예제 #1
0
        public void Pay(EB.IAP.Item item, EB.IAP.Transaction transaction, Action <string, object> callback)
        {
            EB.Debug.Log("HuaweiSDKManager.Pay");
            if (!mInitialized)
            {
                EB.Debug.LogError("HuaweiSDKManager.Pay: not initialized");
                callback("have not init sdk", null);
                return;
            }

            var extraInfo = JSON.Parse(transaction.payload);

            EB.Debug.Log("HuaweiSDKManager extraInfo = {0}", transaction.payload);

            string payPrivateKey = EB.Dot.String("privateKey", extraInfo, string.Empty);

            EB.Debug.Log("HuaweiSDKManager payPrivateKey = {0}", payPrivateKey);

            mPayCallback += callback;
            var    user = Hub.Instance.LoginManager.LocalUser;
            string cost = item.cost.ToString("#0.00");

            EB.Debug.Log("HuaweiSDKManager cost = {0}", cost);
            HuaweiSDK.Pay(appId, payId, user.Name, cost, item.longName, transaction.transactionId, item.localizedDesc, payPrivateKey);
        }
예제 #2
0
        /// <summary>
        /// 商城礼包购买成功调用
        /// </summary>
        /// <param name="item"></param>
        private void OnOfferPurchaseSuceeded(EB.IAP.Item item, EB.IAP.Transaction trans)
        {
            if (!UIStack.Instance.IsStacked(controller))
            {
                EB.Debug.Log("OnOfferPurchaseSuceeded——return!");
                return;
            }

            //处理礼包类型的
            EB.Debug.Log("OnOfferPurchaseSuceeded");

            List <LTShowItemData> itemDataList = new List <LTShowItemData>();

            for (int i = 0; i < item.redeemers.Count; i++)
            {
                if (!LTChargeManager.Instance.IgnoreItemList.Contains(item.redeemers[i].Type)) //item.redeemers[i].Type.CompareTo("mcard") != 0 && item.redeemers[i].Type.CompareTo("bpt") != 0 && item.redeemers[i].Type.CompareTo("pab") != 0 && item.redeemers[i].Type.CompareTo("pdb") != 0 && item.redeemers[i].Type.CompareTo("heromedal") != 0)
                {
                    LTShowItemData tempData = new LTShowItemData(item.redeemers[i].Data, item.redeemers[i].Quantity, item.redeemers[i].Type);
                    itemDataList.Add(tempData);
                }
            }
            if (itemDataList.Count > 0)
            {
                GlobalMenuManager.Instance.Open("LTShowRewardView", itemDataList);
            }

            MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, EB.Localizer.GetString("ID_CHARGE_PAY_SUCC"));

            controller.Close();
        }
예제 #3
0
        public void Pay(EB.IAP.Item item, EB.IAP.Transaction transaction, Action <int, object> callback)
        {
            EB.Debug.Log("TencentSDKManager.Pay");
            if (!mInitialized)
            {
                EB.Debug.LogError("TencentSDKManager.Pay: not initialized");
                var callbackData = new Hashtable();
                callbackData.Add("flag", TencentPayState.PAYSTATE_PAYERROR);
                callback(TencentPayRet.RET_FAIL, TencentPayState.PAYSTATE_PAYERROR);
                return;
            }

            var extraInfo = JSON.Parse(transaction.payload);
            int balance   = EB.Dot.Integer("balance", extraInfo, 0);

            if (balance < item.cost)
            {
                mPayCallback += callback;
                TencentSDK.Pay(zoneId, (item.cost * 10).ToString());
            }
            else
            {
                var callbackData = new Hashtable();
                callbackData.Add("payState", TencentPayState.PAYSTATE_PAYSUCC);
                callback(TencentPayRet.RET_SUCC, callbackData);
            }
        }
예제 #4
0
        public void Pay(EB.IAP.Item item, EB.IAP.Transaction transaction, System.Action <int> callback)
        {
            if (!mInitialized)
            {
                EB.Debug.LogError("AibeiSDKManager.Pay: mInitialized = {0}", mInitialized);
                callback(AibeiConfig.PAY_ERROR);
                return;
            }

            mPayCallback = callback;

            object extraInfo = EB.JSON.Parse(transaction.payload);
            string tid       = EB.Dot.String("tid", extraInfo, string.Empty);
            string transid   = transaction.transactionId;

            EB.Debug.Log("AibeiSDKManager.Pay: tid = {0}", tid);
            EB.Debug.Log("AibeiSDKManager.Pay: transid = {0}", transid);
            EB.Debug.Log("AibeiSDKManager.Pay: appId = {0}", appId);
            if (!string.IsNullOrEmpty(appId))
            {
                AibeiSDK.pxPay(tid, appId);

                //EB.Coroutines.SetTimeout(delegate ()
                //{
                //    OnPayCallback(AibeiConfig.PAY_NO_RESULT);
                //}, 3 * 1000);
            }
        }
예제 #5
0
        /// <summary>
        /// 商城礼包购买成功调用
        /// </summary>
        /// <param name="item"></param>
        private void OnOfferPurchaseSuceeded(EB.IAP.Item item, EB.IAP.Transaction trans)
        {
            if (item.category.CompareTo("comeback") != 0)
            {
                return;                                          //非回归礼包return;
            }
            EB.Debug.Log("OnOfferPurchaseSuceeded");
            List <LTShowItemData> itemDataList = new List <LTShowItemData>();

            for (int i = 0; i < item.redeemers.Count; i++)
            {
                if (!LTChargeManager.Instance.IgnoreItemList.Contains(item.redeemers[i].Type))
                {
                    LTShowItemData tempData = new LTShowItemData(item.redeemers[i].Data, item.redeemers[i].Quantity, item.redeemers[i].Type);
                    itemDataList.Add(tempData);
                }
            }
            if (itemDataList.Count > 0)
            {
                GlobalMenuManager.Instance.Open("LTShowRewardView", itemDataList);
            }

            MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, EB.Localizer.GetString("ID_CHARGE_PAY_SUCC"));

            LTChargeManager.Instance.ReflashLimitedTimeGiftInfo(false, true);
        }
예제 #6
0
        public void Pay(EB.IAP.Item item, EB.IAP.Transaction transaction, System.Action <int, object> callback)
        {
            if (!mInitialized)
            {
                EB.Debug.LogError("UCSDKManager.Pay: not initialized");
                callback(UCStatusCode.NO_INIT, null);
                return;
            }

            mPayCallback += callback;

            var  user = Hub.Instance.LoginManager.LocalUser;
            long uid  = user.Id.Value;
            //int worldId = user.WorldId;
            string name  = user.Name;
            int    level = user.Level;

            object extraInfo = EB.JSON.Parse(transaction.payload);

            SDKParams param = new SDKParams();

            param.Add(SDKParamKey.ACCOUNT_ID, EB.Dot.String("accountId", extraInfo, "0"));
            param.Add(SDKParamKey.CP_ORDER_ID, EB.Dot.String("cpOrderId", extraInfo, transaction.transactionId));
            param.Add(SDKParamKey.AMOUNT, EB.Dot.String("amount", extraInfo, string.Format("{0:N2}", item.cost)));
            param.Add(SDKParamKey.SERVER_ID, EB.Dot.String("serverId", extraInfo, "0"));
            param.Add(SDKParamKey.ROLE_ID, EB.Dot.String("roleId", extraInfo, uid.ToString()));
            param.Add(SDKParamKey.ROLE_NAME, EB.Dot.String("roleName", extraInfo, name));
            param.Add(SDKParamKey.GRADE, EB.Dot.String("grade", extraInfo, level.ToString()));
            param.Add(SDKParamKey.CALLBACK_INFO, EB.Dot.String("callbackInfo", extraInfo, "0"));
            param.Add(SDKParamKey.NOTIFY_URL, EB.Dot.String("notifyUrl", extraInfo, mNotifyUrl));
            param.Add(SDKParamKey.SIGN_TYPE, "MD5");
            param.Add(SDKParamKey.SIGN, transaction.signature);
            UCGameSdk.pay(param);
        }
예제 #7
0
        public void Pay(EB.IAP.Item item, EB.IAP.Transaction transaction, System.Action <int, object> callback)
        {
            if (!mInitialized)
            {
                Debug.LogError("ASDKManager.Pay: not initialized");
                callback(AStatusCode.FAIL, null);
                return;
            }

            mPayCallback += callback;

            var  user = Hub.Instance.LoginManager.LocalUser;
            long uid  = user.Id.Value;
            //int worldId = user.WorldId;
            string name  = user.Name;
            int    level = user.Level;

            //object extraInfo = EB.JSON.Parse(transaction.payload);
            //string tid = EB.Dot.String("tid", extraInfo, string.Empty);
            string transid = transaction.transactionId;

            //customorderid;订单
            //url回调地址
            //sum数额
            //desc描述
            //callBackData其他
            EB.Debug.Log(string.Format("!!!ASDKManager Pay = customorderid {0},url ={1}, cost ={2},desc={3}, callBackData={4}!!!", transid, mNotifyUrl, item.cost, item.category, null));
            ASdk.pay(transid, mNotifyUrl, item.cost.ToString(), item.category, "");
        }
예제 #8
0
        public void Pay(EB.IAP.Item item, EB.IAP.Transaction transaction, System.Action <int> callback)
        {
            EB.Debug.Log("WeChatSDKManager.Pay");
            if (!mInitialized)
            {
                EB.Debug.LogError("WeChatSDKManager.Pay: not initialized");
                callback(WeChatSDKResultCode.PayFailed);
                return;
            }
            mPayCallback += callback;

            object extraInfo = EB.JSON.Parse(transaction.payload);
            string partnerid = EB.Dot.String("partnerid", extraInfo, string.Empty);
            string prepayid  = EB.Dot.String("prepayid", extraInfo, string.Empty);
            string package   = EB.Dot.String("package", extraInfo, string.Empty);
            string noncestr  = EB.Dot.String("noncestr", extraInfo, string.Empty);
            string timestamp = EB.Dot.String("timestamp", extraInfo, string.Empty);
            string sign      = EB.Dot.String("sign", extraInfo, string.Empty);

            int    je   = (int)item.cost;
            string mark = transaction.transactionId;
            string name = item.longName;

            EB.Debug.Log("WeChatSDKManager.Pay: je = {0}, mark={1}, name = {2}", je, mark, name);
            WeChatSDK.Pay(partnerid, prepayid, package, noncestr, timestamp, sign);
        }
예제 #9
0
        public void Pay(EB.IAP.Item item, EB.IAP.Transaction transaction, System.Action <int> callback)
        {
            EB.Debug.Log("VFPKSDKManager.Pay");
            if (!mInitialized)
            {
                EB.Debug.LogError("VFPKSDKManager.Pay: not initialized");
                callback(VFPKSDKResultCode.Failed);
                return;
            }
            mPayCallback += callback;

            object extraInfo  = EB.JSON.Parse(transaction.payload);
            float  cost       = item.cost;
            string name       = item.longName;
            string serverId   = string.Empty;
            var    gameWorlds = Hub.Instance.LoginManager.GameWorlds;
            var    gameWorld  = System.Array.Find(gameWorlds, w => w.Default);

            if (gameWorld != null)
            {
                serverId = gameWorld.Id.ToString();
            }
            string charId    = EB.Sparx.LoginManager.Instance.LocalUserId.Value.ToString();
            string cporderId = transaction.transactionId;

            string callbackInfo = EB.Dot.String("callbackInfo", extraInfo, string.Empty);

            EB.Debug.Log("VFPKSDKManager.Pay: cost = {0},name = {1}", cost, name);
#if UNITY_ANDROID
            VFPKSDK.Pay(cost, name, serverId, charId, cporderId, callbackInfo);
#endif

#if UNITY_IPHONE
            //rmb 充值金额 单位元
            //productID iTunes 苹果后台配置的内购物品的产品ID
            //name 商品名
            //charid 角色ID
            //serverid 服务器ID
            //info 扩展信息
            //cporderid 游戏商订单ID
            string payInfo = cost + ";"
                             + transaction.productId + ";"
                             + name + ";"
                             + charId + ";"
                             + serverId + ";"
                             + callbackInfo + ";"
                             + cporderId;
            Debug.LogError("支付内容:payInfo:" + payInfo);
            VFPKSDK.Pay(payInfo);
#endif
        }
예제 #10
0
        /// <summary>
        /// 支付成功
        /// </summary>
        /// <param name="item"></param>
        private void OnOfferPurchaseSuceeded(EB.IAP.Item item, EB.IAP.Transaction trans)
        {
            if (!UIStack.Instance.IsStacked(controller))
            {
                EB.Debug.Log("OnOfferPurchaseSuceeded——return!");
                return;
            }
            if (curChargeType == EChargeType.eGift || curChargeType == EChargeType.eGift1 || curChargeType == EChargeType.eGift2 || curChargeType == EChargeType.eGift3)
            {
                return;
            }

            //只处理非礼包类型的
            EB.Debug.Log("OnOfferPurchaseSuceeded");
            List <LTShowItemData> itemDataList = new List <LTShowItemData>();

            for (int i = 0; i < item.redeemers.Count; i++)
            {
                if (!LTChargeManager.Instance.IgnoreItemList.Contains(item.redeemers[i].Type))//item.redeemers[i].Type.CompareTo("mcard") != 0 && item.redeemers[i].Type.CompareTo("bpt") != 0 && item.redeemers[i].Type.CompareTo("pab") != 0 && item.redeemers[i].Type.CompareTo("pdb") != 0&& item.redeemers[i].Type.CompareTo("heromedal") != 0)
                {
                    LTShowItemData tempData = new LTShowItemData(item.redeemers[i].Data, item.redeemers[i].Quantity, item.redeemers[i].Type);
                    itemDataList.Add(tempData);
                }
            }

            //永久月卡额外赠送的特写
            if (item.payoutId == 2001)
            {
                var world = System.Array.Find(LoginManager.Instance.GameWorlds, w => w.Default);
                if (world.OpenTime > 0)
                {
                    int timeZone = Hotfix_LT.Data.ZoneTimeDiff.GetTimeZone();//需处理时区问题
                    int day      = System.TimeSpan.FromSeconds(EB.Time.Now + timeZone * 3600).Days - System.TimeSpan.FromSeconds(world.OpenTime + timeZone * 3600).Days;
                    var reward   = Hotfix_LT.Data.EventTemplateManager.Instance.GetDailyRewardByType("silver_month_card");
                    if (reward != null && day > 0)
                    {
                        for (int i = 0; i < reward.ItemList.Count; i++)
                        {
                            itemDataList.Add(new LTShowItemData(reward.ItemList[i].id, reward.ItemList[i].count * day, reward.ItemList[i].type));
                        }
                    }
                }
            }

            if (itemDataList.Count > 0)
            {
                GlobalMenuManager.Instance.Open("LTShowRewardView", itemDataList);
            }

            MessageTemplateManager.ShowMessage(eMessageUIType.FloatingText, EB.Localizer.GetString("ID_CHARGE_PAY_SUCC"));
        }
예제 #11
0
        public void Pay(EB.IAP.Item item, EB.IAP.Transaction transaction, System.Action <int> callback)
        {
            EB.Debug.Log("WinnerSDKManager.Pay={0}");
            if (!mInitialized)
            {
                EB.Debug.LogError("WinnerSDKManager.Pay: not initialized");
                callback(WinnerStatusCode.FAIL);
                return;
            }
            var user = Hub.Instance.LoginManager.LocalUser;

            mPayCallback += callback;
            WinnerGameSDK.Pay(GetUserId(), item.cost.ToString(), user.WorldId.ToString(), item.longName, item.localizedDesc, mNotifyUrl, transaction.transactionId);
        }
예제 #12
0
        public void Pay(EB.IAP.Item item, EB.IAP.Transaction transaction, System.Action <int> callback)
        {
            EB.Debug.Log("QiHooSDKManager.Pay");
            if (!mInitialized)
            {
                EB.Debug.LogError("QiHooSDKManager.Pay: not initialized");
                callback(OPPOStatusCode.FAILURE);
                return;
            }

            mPayCallback += callback;
            var user = Hub.Instance.LoginManager.LocalUser;

            OPPOGameSDK.Pay(transaction.transactionId, item.cents, item.localizedDesc, item.longName, mNotifyUrl);
        }
예제 #13
0
        public void Pay(EB.IAP.Item item, EB.IAP.Transaction transaction, System.Action <string> callback)
        {
            if (!IsInited())
            {
                EB.Debug.LogWarning("AsSDKManager.Pay: AsSDK not inited");
                return;
            }

            mPayResultCallback += callback;

            string uid     = EB.Sparx.Hub.Instance.LoginManager.LocalUserId.Value.ToString();
            int    worldId = EB.Sparx.Hub.Instance.LoginManager.LocalUser.WorldId;

            pxAsPayRMB((int)item.cost, transaction.transactionId, item.longName, uid, worldId);
            EB.Debug.Log("AsSDKManager.Pay Success item.cost = {0}; transaction.transactionId = {1}; item.longName = {2}; uid = {3}; worldId = {4}",
                         item.cost, transaction.transactionId, item.longName, uid, worldId);
        }
예제 #14
0
        //public void DestroySDK()
        //{
        //	if (mInitialized)
        //	{
        //		mInitialized = false;
        //		mLoggedIn = false;
        //		mAuthCallback = null;
        //		mInitCallback = null;
        //		mPayCallback = null;
        //		XiaoMiGameSdk.exitSDK();
        //	}
        //}

        public void Pay(EB.IAP.Item item, EB.IAP.Transaction transaction, System.Action <int, object> callback)
        {
            if (!mInitialized)
            {
                EB.Debug.LogError("EWanSDKManager.Pay: not initialized");
                callback(EWanStatusCode.FAIL, null);
                return;
            }

            mPayCallback += callback;

            var    user        = Hub.Instance.LoginManager.LocalUser;
            int    worldId     = user.WorldId;
            string diamondName = Localizer.GetString("ID_RESOURCE_NAME_HC");

            EWanGameSdk.pay(item.cost, worldId.ToString(), diamondName, item.value, transaction.transactionId);
        }
예제 #15
0
        public void Pay(EB.IAP.Item item, EB.IAP.Transaction transaction, System.Action <int, object> callback)
        {
            EB.Debug.Log("LBSDKManager.Pay");
            if (!mInitialized)
            {
                EB.Debug.LogError("LBSDKManager.Pay: not initialized");
                callback(LBStatusCode.FAIL, null);
                return;
            }

            mPayCallback += callback;
            var    user     = Hub.Instance.LoginManager.LocalUser;
            string roleId   = user.Id.Value.ToString();
            string roleName = user.Name;
            int    level    = user.Level;

            LBGameSDK.Pay(roleId, roleName, level.ToString(), "serverId", "serverName", item.productId, item.longName, item.localizedDesc, ((int)item.cost).ToString(), transaction.transactionId);
        }
예제 #16
0
        public void Pay(EB.IAP.Item item, EB.IAP.Transaction transaction, System.Action <int> callback)
        {
            EB.Debug.Log("M4399SDKManager.Pay");
            if (!mInitialized)
            {
                EB.Debug.LogError("M4399SDKManager.Pay: not initialized");
                callback(M4399ResultCode.Failed);
                return;
            }

            mPayCallback += callback;
            var    user = Hub.Instance.LoginManager.LocalUser;
            int    je   = (int)item.cost;
            string mark = transaction.transactionId;
            string name = item.longName;

            EB.Debug.Log("M4399SDKManager.Pay: je = {0}, mark={1}, name = {2}", je, mark, name);
            M4399SDK.Pay((int)item.cost, transaction.transactionId, item.longName);
        }
예제 #17
0
        public void Pay(EB.IAP.Item item, EB.IAP.Transaction transaction, System.Action <int, object> callback)
        {
            if (!mInitialized)
            {
                EB.Debug.LogError("XiaoMiSDKManager.Pay: not initialized");
                callback(XiaoMiStatusCode.NO_INIT, null);
                return;
            }

            mPayCallback += callback;

            var    user     = Hub.Instance.LoginManager.LocalUser;
            long   uid      = user.Id.Value;
            int    worldId  = user.WorldId;
            string name     = user.Name;
            int    level    = user.Level;
            int    vipLevel = user.Vip;

            XiaoMiGameSdk.pay((int)item.cost, worldId.ToString(), uid.ToString(), name, level.ToString(), vipLevel.ToString(), string.Empty, transaction.transactionId);
        }
예제 #18
0
        public void Pay(EB.IAP.Item item, EB.IAP.Transaction transaction, System.Action <int> callback)
        {
            EB.Debug.Log("QiHooSDKManager.Pay={0}");
            if (!mInitialized)
            {
                EB.Debug.LogError("QiHooSDKManager.Pay: not initialized");
                callback(QiHooPayStatusCode.FAIL);
                return;
            }

            mPayCallback += callback;
            var    user       = Hub.Instance.LoginManager.LocalUser;
            object obj        = EB.JSON.Parse(transaction.payload);
            string servername = EB.Dot.String("serverName", obj, "111");
            int    balance    = EB.Dot.Integer("balance", obj, 1000);
            string aname      = EB.Dot.String("aName", obj, "111");

            EB.Debug.Log(servername + balance + aname);
            QiHooGameSDK.Pay(GetUserId(), item.cents.ToString(), item.longName, item.productId, mNotifyUrl, user.Name, user.Id.ToString(), transaction.transactionId
                             , 1, user.WorldId.ToString(), servername, 10, "钻石", user.Level, balance, user.Vip.ToString(), aname);
        }
예제 #19
0
        static StackObject *Invoke_0(ILIntepreter __intp, StackObject *__esp, IList <object> __mStack, CLRMethod __method, bool isNewObj)
        {
            ILRuntime.Runtime.Enviorment.AppDomain __domain = __intp.AppDomain;
            StackObject *ptr_of_this_method;
            StackObject *__ret = ILIntepreter.Minus(__esp, 3);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 1);
            EB.IAP.Transaction @arg2 = (EB.IAP.Transaction) typeof(EB.IAP.Transaction).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 2);
            EB.IAP.Item @arg1 = (EB.IAP.Item) typeof(EB.IAP.Item).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            ptr_of_this_method = ILIntepreter.Minus(__esp, 3);
            System.Action <EB.IAP.Item, EB.IAP.Transaction> instance_of_this_method = (System.Action <EB.IAP.Item, EB.IAP.Transaction>) typeof(System.Action <EB.IAP.Item, EB.IAP.Transaction>).CheckCLRTypes(StackObject.ToObject(ptr_of_this_method, __domain, __mStack));
            __intp.Free(ptr_of_this_method);

            instance_of_this_method.Invoke(@arg1, @arg2);

            return(__ret);
        }
예제 #20
0
        public void Pay(EB.IAP.Item item, EB.IAP.Transaction transaction, System.Action <int> callback)
        {
            EB.Debug.Log("AlipaySDKManager.Pay");
            if (!mInitialized)
            {
                //EB.Debug.LogError("AlipaySDKManager.Pay: not initialized");
                //callback(AlipaySDKResultCode.Failed);
                //return;
                IAPInit();
            }
            mPayCallback += callback;

            object extraInfo = EB.JSON.Parse(transaction.payload);
            string info      = EB.Dot.String("ret", extraInfo, string.Empty);

            int    je   = (int)item.cost;
            string mark = transaction.transactionId;
            string name = item.longName;

            EB.Debug.Log("AlipaySDKManager.Pay: je = {0}, mark={1}, name = {2}", je, mark, name);
            AlipaySDK.Pay(info);
        }
예제 #21
0
        public void Pay(EB.IAP.Item item, EB.IAP.Transaction transaction, System.Action <int, object> callback)
        {
            EB.Debug.Log("VivoSDKManager.Pay");
            if (!mInitialized)
            {
                EB.Debug.LogError("QiHooSDKManager.Pay: not initialized");
                callback(VivoStatusCode.FAIL, null);
                return;
            }

            mPayCallback += callback;
            var  user = Hub.Instance.LoginManager.LocalUser;
            long uid  = user.Id.Value;
            //int worldId = user.WorldId;
            string userName    = user.Name;
            int    level       = user.Level;
            int    vipLevel    = user.Vip;
            object payload     = JSON.Parse(transaction.payload);
            string accessKey   = EB.Dot.String("accessKey", payload, string.Empty);
            string orderNumber = EB.Dot.String("orderNumber", payload, string.Empty);

            VivoGameSDK.Pay(item.cents, level, item.longName, item.localizedDesc, vipLevel.ToString(), "noalliance", uid.ToString(), userName, "serverName", orderNumber, accessKey);
            //EB.Debug.LogError("price={0},level={1},productName={2},productDes={3},vip={4},party={5},roleId={6},roleName={7},serverName={8},transNo={9},accessKey={10}", item.cents, level, item.longName, item.localizedDesc, vipLevel.ToString(), "noalliance", uid.ToString(), userName, "serverName", orderNumber, accessKey);
        }
예제 #22
0
        public void Pay(EB.IAP.Item item, EB.IAP.Transaction transaction, Action <int> callback)
        {
            if (!mInitialized)
            {
                callback(YiJieSDKConfig.PAY_FAILURE);
                EB.Debug.LogError("YiJiSDK.Pay: not initialized");
                return;
            }
            mPayCallback += callback;
            int    unitPrice = 10;
            string unitName  = EB.Localizer.GetString("ID_LADDER_STAGE_ZUANSHI");
            int    count     = item.cents / 10;

            if (item.productId == "com.manhuang.fusesandbox.aliancecard" || item.productId == "com.manhuang.fusesandbox.monthcard")
            {
                unitPrice = item.cents;
                unitName  = item.longName;
                count     = 1;
            }
            string callbackInfo = transaction.transactionId;

            YiJieSDK.pxPay(unitPrice, unitName, count, callbackInfo, mCallbackUrl);
            EB.Debug.Log("YiJieSDKManager.Pay unitPrice = {0} unitName = {1} count = {2} callBackInfo = {3} callBackUrl = {4}", unitPrice, unitName, count, callbackInfo, mCallbackUrl);
        }
예제 #23
0
 public static void Wallet_OnOfferPurchaseSuceeded(EB.IAP.Item item, EB.IAP.Transaction trans)
 {
     Messenger.Raise(Hotfix_LT.EventName.OnOfferPurchaseSuceeded, item, trans);
 }
예제 #24
0
        public override void Pay(EB.IAP.Item item, EB.IAP.Transaction transaction, System.Action <int> callback)
        {
            EB.Debug.Log("XinkuaiSDKManager.Pay");

            if (item == null || transaction == null)
            {
                EB.Debug.LogError("XinkuaiSDKManager.Pay: item == null || transaction == null!!!");
                callback?.Invoke(XinkuaiSDKResultCode.Failed);
                return;
            }

            if (!mInitialized)
            {
                EB.Debug.LogError("XinkuaiSDKManager.Pay: not initialized!!!");
                callback?.Invoke(XinkuaiSDKResultCode.Failed);
                return;
            }

            mPayCallback += callback;

            object extraInfo   = EB.JSON.Parse(transaction.payload);
            int    price       = Mathf.FloorToInt(item.cost * 100f);
            string productId   = item.productId;
            string productName = item.longName;
            string productDesc = item.localizedDesc;
            string orderId     = transaction.transactionId;
            string roleId      = roleData.roleId;
            string roleName    = roleData.roleName;
            int    roleLevel   = roleData.roleLevel;
            string serverId    = roleData.serverId;
            string serverName  = roleData.serverName;

#if UNITY_IPHONE
            string extension = EB.Dot.String("callbackInfo", extraInfo, "0");
#else
            string extension = EB.Dot.String("callbackInfo", extraInfo, string.Empty);
#endif


            EB.Debug.Log("XinkuaiSDKManager.Pay: roleId = {0},roleName = {1},roleLevel = {2},serverId = {3},serverName = {4},CurHCCount = {5}", roleId, roleName, roleLevel, serverId, serverName, CurHCCount);
#if UNITY_ANDROID
            //price, productId, productName, productDesc, orderId, roleId, roleName, roleLevel, serverId, serverName, coinNum, payNotifyUrl, extension
            XinkuaiSDK.Pay(price, productId, productName, productDesc, orderId, roleId, roleName, roleLevel, serverId, serverName, CurHCCount, mNotifyUrl, extension);
#endif

#if UNITY_IPHONE
            //rmb 充值金额 单位元
            //productID iTunes 苹果后台配置的内购物品的产品ID
            //name 商品名
            //charid 角色ID
            //serverid 服务器ID
            //info 扩展信息
            //cporderid 游戏商订单ID
            // string payInfo = cost + ";"
            //     + transaction.productId + ";"
            //     + name + ";"
            //     + charId + ";"
            //     + serverId + ";"
            //     + callbackInfo + ";"
            //     + cporderId;
            // Debug.LogError("支付内容:payInfo:" + payInfo);
            EB.Debug.Log("XinkuaiSDKManager.Pay: productName = {0},productDesc = {1},orderId = {2},productId = {3},price = {4},extension = {5}", productName, productDesc, orderId, productId, price, extension);
            XinkuaiSDK.Pay(productName, productDesc, orderId, productId, serverId, price, extension /*, mNotifyUrl*/);
#endif
        }
예제 #25
0
 public abstract void Pay(EB.IAP.Item item, EB.IAP.Transaction transaction, System.Action <int> callback);
예제 #26
0
 private static void OnPurchaseSucced(EB.IAP.Item offer, EB.IAP.Transaction trans)
 {
     PostPay(offer.cost, trans.platform, offer.value);
 }
예제 #27
0
 private void SetDataAfterCharge(EB.IAP.Item item, EB.IAP.Transaction trans)
 {
     TimerManager.instance.AddTimer(3000, 1, SetChargeDataDelay);
 }
예제 #28
0
 public virtual void OnOfferPurchaseSuceeded(EB.IAP.Item item, EB.IAP.Transaction trans)
 {
     EB.Util.BroadcastMessage("OnOfferPurchaseSuceeded", item);
 }