Ejemplo n.º 1
0
    private void GE_XY_PAY_MSG(SG.GameEvent ge, SG.EventParameter parameter)
    {
        MsgData_WC_RechargeRet msg = parameter.msgParameter as MsgData_WC_RechargeRet;

        Debug.Log("GE_XY_PAY_MSG " + msg.m_szOrderID + ":" + msg.m_szProductName);

        Debug.Log("TrackingPay: " + data["amount"] + " : " + data["itemId"] + " : " + data["itemName"] + " : " + data["strPayOrder"]);
        XYSDK.Instance.TrackingPay(data["amount"], "1", data["itemId"], data["itemName"], data["strPayOrder"]);
    }
Ejemplo n.º 2
0
    private void GE_LOGIN_MSG(SG.GameEvent ge, SG.EventParameter parameter)
    {
        MsgData_sLogin data = parameter.msgParameter as MsgData_sLogin;

        if (0 == data.ResultCode || -1 == data.ResultCode)
        {
            SGSDK.instance.SetUseInfo(SG.Account.Instance.AccountId, "");
        }
    }
Ejemplo n.º 3
0
    /// <summary>
    /// 服务器充值订单回复
    /// </summary>
    /// <param name="ge"></param>
    /// <param name="parameter"></param>
    private void GE_DYB_RECHARGE_MSG(SG.GameEvent ge, SG.EventParameter parameter)
    {
        MsgData_sGetRechargeorder_DYB data = parameter.msgParameter as MsgData_sGetRechargeorder_DYB;

        Debug.Log("订单号 : " + data.data.ToString());
        Debug.Log("大小  : " + data.dataSize.ToString());
        Debug.Log("ID : " + data.ItemID.ToString());

        string jsonData = data.data.ToArray().BytesToString();

        Debug.Log("xy rechargeData: " + jsonData);
        JsonData json = JsonMapper.ToObject(jsonData);
        var      tmp  = json["orderNo"];

        if (tmp.IsString)
        {
            sdkPayOrderId = (string)tmp;
        }
        else
        {
            sdkPayOrderId = "";
        }

        tmp = json["extension"];
        if (tmp.IsObject || tmp.IsArray)
        {
            sdkPayExtension = tmp.ToJson();
        }
        else
        {
            sdkPayExtension = (string)tmp;
        }

        Debug.Log("sdkPayOrderId :" + sdkPayOrderId + " sdkPayExtension:" + sdkPayExtension + " itemID:" + data.ItemID);
        int configid = data.ItemID;

        CallBackPay(configid);
    }
Ejemplo n.º 4
0
    /// <summary>
    /// 服务器充值订单回复
    /// </summary>
    /// <param name="ge"></param>
    /// <param name="parameter"></param>
    private void GE_SQW_RECHARGE_MSG_FUN(SG.GameEvent ge, SG.EventParameter parameter)
    {
        Debug.Log("GE_SQW_RECHARGE_MSG_FUN : ");
        MsgData_sGetRechargeorder_SQW data = parameter.msgParameter as MsgData_sGetRechargeorder_SQW;

        Debug.Log("订单号 : " + data.data.ToString());
        Debug.Log("大小  : " + data.dataSize.ToString());
        Debug.Log("ID : " + data.ItemID.ToString());

        string jsonData = data.data.ToArray().BytesToString();

        Debug.Log("xy rechargeData: " + jsonData);
        JsonData json = JsonMapper.ToObject(jsonData);
        var      tmp  = json["order_no"];

        if (tmp.IsString)
        {
            sdkPayOrderId = (string)tmp;
        }
        else
        {
            sdkPayOrderId = "";
        }

        tmp = json["ext"];
        if (tmp.IsObject || tmp.IsArray)
        {
            sdkPayExtension = tmp.ToJson();
        }
        else
        {
            sdkPayExtension = (string)tmp;
        }

        tmp = json["sign"];
        if (tmp.IsString)
        {
            sdkSign = (string)tmp;
        }
        else
        {
            sdkSign = "";
        }

        tmp = json["flag"];
        if (tmp.IsString)
        {
            sdkFlag = (string)tmp;
        }
        else
        {
            sdkFlag = "";
        }

        tmp = json["time"];
        if (tmp.IsString)
        {
            sdkTime = (string)tmp;
        }
        else
        {
            sdkTime = "";
        }

        tmp = json["userid"];
        if (tmp.IsString)
        {
            userID = (string)tmp;
        }
        else
        {
            userID = "";
        }

        Debug.Log("sdkPayOrderId :" + sdkPayOrderId + "time :" + sdkTime + "sdkSign :" + sdkSign + " sdkPayExtension:" + sdkPayExtension + " itemID:" + data.ItemID);
        int configid = data.ItemID;

        CallBackPay(configid);
    }