Ejemplo n.º 1
0
        /// <summary>
        /// 功能描述:处理亿点代付返回的结果
        /// 创建  人:周文卿
        /// 创建时间:2019-04-29
        /// </summary>
        /// <param name="result">请求结果</param>
        /// <param name="key"></param>
        ///  <param name="orid"></param>
        /// <returns></returns>
        public string ResultYDSub(string result, string key)
        {
            string Ownresult = "";

            JToken jToken = JsonConvert.DeserializeObject(result) as JObject;

            if (jToken["transferStatus"] != null)
            {
                if (jToken["transferStatus"].ToString() == "C")
                {
                    Ownresult = "ok";
                    ////开启线程 查询
                    Thread thread1 = new Thread(() => RuleAgentPayQuery.QueryAgentThend("888017", jToken["transferId"].ToString(), key, "YD_010"));
                    thread1.Start();
                }
                else
                {
                    Ownresult = "err";
                }
            }
            else
            {
                Ownresult = "err";
                messageLog.inserttblPayfailMessageLog("亿点", "888017", result, "支付", "", DateTime.Now, result);
            }
            return(Ownresult);
        }
Ejemplo n.º 2
0
        /// <summary>
        /// 功能描述:处理汇通代付返回的结果
        /// 创建  人:周文卿
        /// 创建时间:2019-02-19
        /// </summary>
        /// <param name="result">请求结果</param>
        /// <param name="key"></param>
        /// <returns></returns>
        public string ResultHTSub(string result, string key)
        {
            string Ownresult = Utils.UrlDecode(result);

            Dictionary <string, string> valuePairs = new Dictionary <string, string>();

            //先按& 转换成数组
            string[] jsontext = result.Split('&');

            for (int i = 0; i < jsontext.Length; i++)
            {
                //在进行=的截取 获得key值很Value值
                string[] keyvalue = jsontext[i].Split('=');
                valuePairs.Add(keyvalue[0], keyvalue[1]);
            }
            //判断是否成功
            if (valuePairs["RspCod"].ToString() == "00000")
            {
                String[] base64Keys = new String[] { "CodeUrl", "ImgUrl", "Token_Id", "PayInfo", "sPayUrl", "PayUrl", "NotifyUrl", "ReturnUrl" };
                string[] arrKeynew  = valuePairs.Keys.ToArray();
                for (int i = 0; i < arrKeynew.Length; i++)
                {
                    //对所有的值值 进行 UrlDecode
                    valuePairs[arrKeynew[i].ToString()] = Utils.UrlDecode(valuePairs[arrKeynew[i].ToString()].ToString());
                    //对特殊参数先进行把其中的”%2b”替换为“+”然后 Base64解码
                    for (int j = 0; j < base64Keys.Length; j++)
                    {
                        if (arrKeynew[i].ToString() == base64Keys[j].ToString())
                        {
                            string value = valuePairs[arrKeynew[i].ToString()].ToString().Replace("%2b", "+");
                            byte[] bytes = Convert.FromBase64String(value);
                            string uec   = Encoding.GetEncoding("utf-8").GetString(bytes);
                            valuePairs[arrKeynew[i].ToString()] = uec;
                        }
                    }
                }
                //开启线程 查询
                Thread thread1 = new Thread(() => RuleAgentPayQuery.QueryAgentThend("40939485", valuePairs["TxSN"].ToString(), key, "HT_006"));
                thread1.Start();

                Ownresult = "ok";
            }
            else
            {
                Ownresult = Utils.UrlDecode(result);
                messageLog.inserttblPayfailMessageLog("汇通", "40939485", Ownresult, "代付", "", DateTime.Now, Ownresult);
            }
            return(Ownresult);
        }
Ejemplo n.º 3
0
        /// <summary>
        /// 功能描述:处理海付代付返回的结果
        /// 创建  人:周文卿
        /// 创建时间:2019-04-29
        /// </summary>
        /// <param name="result">请求结果</param>
        /// <param name="key"></param>
        ///  <param name="orid"></param>
        /// <returns></returns>
        public string ResultHFSub(string result, string key)
        {
            string Ownresult = "";

            JToken jToken = JsonConvert.DeserializeObject(result) as JObject;

            if (jToken["respCode"].ToString() == "0000")
            {
                Ownresult = "ok";
                ////开启线程 查询
                Thread thread1 = new Thread(() => RuleAgentPayQuery.QueryAgentThend("734641", jToken["pay_number"].ToString(), key, "HF_011"));
                thread1.Start();
            }
            else
            {
                Ownresult = "err";
                messageLog.inserttblPayfailMessageLog("海付", "734641", result, "代付", "", DateTime.Now, result);
            }
            return(Ownresult);
        }
Ejemplo n.º 4
0
        /// <summary>
        /// 功能描述:处理万通代付返回的结果
        /// 创建  人:周文卿
        /// 创建时间:2019-02-19
        /// </summary>
        /// <param name="result">请求结果</param>
        /// <param name="key">key值</param>
        /// <param name="orid">订单号</param>
        /// <returns></returns>
        public string ResultQJSub(string result, string key, string orid)
        {
            string Ownresult = "";
            JToken rejson    = JToken.Parse(result);
            string aa        = rejson["status"].ToString();

            if (aa == "True")
            {
                Ownresult = "ok";
                ////开启线程 查询
                Thread thread1 = new Thread(() => RuleAgentPayQuery.QueryAgentThend("40939485", orid, key, "QJ_004"));
                thread1.Start();
            }
            else
            {
                Ownresult = rejson["message"].ToString();
                messageLog.inserttblPayfailMessageLog("万通", "1550473045", Ownresult, "代付", "", DateTime.Now, result);
            }
            return(Ownresult);
        }
Ejemplo n.º 5
0
        /// <summary>
        /// 功能描述:处理再创代付的返回结果
        /// 创建  人:周文卿
        /// 创建时间:2019-05-01
        /// </summary>
        /// <param name="result">请求结果</param>
        /// <param name="key">加密字段</param>
        /// <param name="orid"></param>
        /// <returns></returns>
        public string ResultZCSub(string result, string key, string orid)
        {
            string Ownresult = "";
            JToken rejson    = JToken.Parse(result);
            string code      = rejson["status"].ToString();

            if (code == "0")
            {
                ////开启线程 查询
                Thread thread1 = new Thread(() => RuleAgentPayQuery.QueryAgentThend("605", orid, key, "ZC_008"));
                thread1.Start();
                Ownresult = "ok";
            }
            else
            {
                Ownresult = "err";
                messageLog.inserttblPayfailMessageLog("再创支付", "605", result, "ZC_008", "", DateTime.Now, result);
            }
            return(Ownresult);
        }