/// <summary>
 /// 自动上报支付
 /// </summary>
 static void OnPayCallBackListener(OnPayInfo info)
 {
     if (info.isSuccess)
     {
         LogPay(info.orderID, info.goodsId, 1, info.price, info.currency, info.storeName.ToString());
     }
 }
 protected void PayCallBack(OnPayInfo info)
 {
     //info.storeName = GetStoreName();
     if (SDKManager.PayCallBack != null)
     {
         SDKManager.PayCallBack(info);
     }
 }
Exemple #3
0
 /// <summary>
 /// 自动上报支付
 /// </summary>
 static void OnPayCallBackListener(OnPayInfo info)
 {
     Debug.Log("自动上报支付 success >" + info.isSuccess + "<");
     if (info.isSuccess)
     {
         LogPay(info.orderID, info.goodsId, 1, info.price, info.currency, info.storeName.ToString());
     }
 }
Exemple #4
0
        static void OnPay(Dictionary <string, string> data)
        {
            bool   isSuccess = bool.Parse(data[SDKInterfaceDefine.ParameterName_IsSuccess]);
            string goodsId   = data[SDKInterfaceDefine.Pay_ParameterName_GoodsID];
            //GoodsType goodsType = (GoodsType)Enum.Parse(typeof(GoodsType),data[SDKInterfaceDefine.Pay_ParameterName_GoodsType]);

            OnPayInfo info = new OnPayInfo();

            info.isSuccess = isSuccess;
            info.goodsId   = goodsId;

            OnPayCallBack(info);
        }
        static void OnPay(Dictionary <string, string> data)
        {
            OnPayInfo info      = new OnPayInfo();
            bool      isSuccess = bool.Parse(data[SDKInterfaceDefine.ParameterName_IsSuccess]);

            StoreName storeName = (StoreName)Enum.Parse(typeof(StoreName), data[SDKInterfaceDefine.Pay_ParameterName_Payment]);
            string    goodsId   = data[SDKInterfaceDefine.Pay_ParameterName_GoodsID];
            string    orderID   = data[SDKInterfaceDefine.Pay_ParameterName_OrderID];
            string    currency  = data[SDKInterfaceDefine.Pay_ParameterName_Currency];
            string    goodsName = data[SDKInterfaceDefine.Pay_ParameterName_GoodsName];
            string    receipt   = data[SDKInterfaceDefine.Pay_ParameterName_Receipt];
            float     price     = float.Parse(data[SDKInterfaceDefine.Pay_ParameterName_Price]);
            GoodsType goodsType = (GoodsType)Enum.Parse(typeof(GoodsType), data[SDKInterfaceDefine.Pay_ParameterName_GoodsType]);

            if (data.ContainsKey(SDKInterfaceDefine.ParameterName_Error))
            {
                info.error = data[SDKInterfaceDefine.ParameterName_Error];
            }

            info.isSuccess = isSuccess;
            info.storeName = storeName;
            info.goodsId   = goodsId;
            info.orderID   = orderID;
            info.currency  = currency;
            info.goodsName = goodsName;
            info.receipt   = receipt;
            info.price     = price;
            info.goodsType = goodsType;

            try
            {
                if (SDKManager.PayCallBack != null)
                {
                    SDKManager.PayCallBack(info);
                }
            }
            catch (Exception e)
            {
                Debug.LogError("OnPayCallBack Error" + e.ToString() + e.StackTrace);
            }
        }
Exemple #6
0
        static void OnPay(Dictionary <string, string> data)
        {
            bool   isSuccess = bool.Parse(data[SDKInterfaceDefine.ParameterName_IsSuccess]);
            string goodsId   = data[SDKInterfaceDefine.Pay_ParameterName_GoodsID];

            OnPayInfo info = new OnPayInfo();

            info.isSuccess = isSuccess;
            info.goodsId   = goodsId;

            try
            {
                if (OnPayCallBack != null)
                {
                    OnPayCallBack(info);
                }
            }
            catch (Exception e)
            {
                Debug.LogError("OnPayCallBack Error" + e.ToString() + e.StackTrace);
            }
        }