/// <summary> /// 功能描述:处理锐支付的返回结果 /// 创建 人:周文卿 /// 创建时间:2019-02-19 /// </summary> /// <param name="result">请求结果</param> /// <param name="transactionnum">流水号</param> /// <param name="OrderID">订单号</param> /// <param name="ratecode">支付代码</param> /// <returns></returns> public string ResultY(string result, string ratecode, string transactionnum, string OrderID) { string Ownresult = ""; JToken rejson = JToken.Parse(result); string code = rejson["retcode"].ToString(); int i = 0; if (code == "1") { Ownresult = "支付中"; if (ratecode == "102") { RuleAlipay alipay = new RuleAlipay(); i = alipay.insertAlipay(OrderID, transactionnum, rejson["payUrl"].ToString(), DateTime.Now); if (i == 0) { Ownresult = "支付失败"; } } if (ratecode == "101") { RuleAlipay alipay = new RuleAlipay(); i = alipay.insertAlipay(OrderID, transactionnum, rejson["payUrl"].ToString(), DateTime.Now); if (i == 0) { Ownresult = "支付失败"; } } } else { messageLog.inserttblPayfailMessageLog("易极速", "10783", result, transactionnum, OrderID, DateTime.Now, result); } return(Ownresult); }
/// <summary> /// 功能描述:处理万通的返回结果 /// 创建 人:周文卿 /// 创建时间:2019-02-19 /// </summary> /// <param name="result">请求结果</param> /// <param name="transactionnum">流水号</param> /// <param name="OrderID">订单号</param> /// <param name="ratecode">支付代码</param> /// <returns></returns> public rerurnpram ResultQJ(string result, string ratecode, string transactionnum, string OrderID) { JToken rejson = JToken.Parse(result); string aa = rejson["payment"].ToString(); rerurnpram rerurnpram = new rerurnpram(); int i = 0; if (aa == "True") { rerurnpram.message = "支付中"; switch (ratecode) { case "101": RuleAlipay alipay = new RuleAlipay(); i = alipay.insertAlipay(OrderID, transactionnum, rejson["payUrl"].ToString(), DateTime.Now); if (i == 0) { rerurnpram.message = "支付失败"; } break; case "103": RuleWeixinpay weixinpay = new RuleWeixinpay(); i = weixinpay.insertweixinpay(OrderID, transactionnum, rejson["payUrl"].ToString(), DateTime.Now); if (i == 0) { rerurnpram.message = "支付失败"; } break; case "119": RuleJDpay ruleJDpay = new RuleJDpay(); rerurnpram.urlcode = rejson["payUrl"].ToString(); i = ruleJDpay.insertjdpay(OrderID, transactionnum, rejson["payUrl"].ToString(), DateTime.Now); if (i == 0) { rerurnpram.message = "支付失败"; } break; } } else { rerurnpram.message = rejson["message"].ToString(); messageLog.inserttblPayfailMessageLog("万通", "1550473045", rerurnpram.message, transactionnum, OrderID, DateTime.Now, result); } return(rerurnpram); }
/// <summary> /// 功能描述:处理锐支付的返回结果 /// 创建 人:周文卿 /// 创建时间:2019-02-19 /// </summary> /// <param name="result">请求结果</param> /// <param name="transactionnum">流水号</param> /// <param name="OrderID">订单号</param> /// <param name="ratecode">支付代码</param> /// <returns></returns> public string ResultRUI(string result, string ratecode, string transactionnum, string OrderID) { string Ownresult = ""; JToken rejson = JToken.Parse(result); string code = rejson["code"].ToString(); int i = 0; if (code == "success") { JToken data = JToken.Parse(rejson["data"].ToString()); Ownresult = "支付中"; switch (ratecode) { case "102": RuleAlipay alipay = new RuleAlipay(); string hh = Utils.UrlDecode(data["payurl"].ToString()); i = alipay.insertAlipay(OrderID, transactionnum, Utils.UrlDecode(data["payurl"].ToString()), DateTime.Now); if (i == 0) { Ownresult = "支付失败"; } break; case "104": RuleWeixinpay rule = new RuleWeixinpay(); //string hh = Utils.UrlDecode(data["payurl"].ToString()); i = rule.insertweixinpay(OrderID, transactionnum, Utils.UrlDecode(data["payurl"].ToString()), DateTime.Now); if (i == 0) { Ownresult = "支付失败"; } break; } } else { Ownresult = rejson["msg"].ToString(); messageLog.inserttblPayfailMessageLog("锐支付", "A190305145337941", Ownresult, transactionnum, OrderID, DateTime.Now, result); } return(Ownresult); }
/// <summary> /// 功能描述:处理海付的返回结果 /// 创建 人:周文卿 /// 创建时间:2019-04-30 /// </summary> /// <param name="result">请求结果</param> /// <param name="transactionnum">流水号</param> /// <param name="OrderID">订单号</param> /// <param name="ratecode">支付代码</param> /// <returns></returns> public string ResultHF(string result, string ratecode, string transactionnum, string OrderID) { string Ownresult = ""; JToken jToken = JsonConvert.DeserializeObject(result) as JObject; if (jToken["respCode"].ToString() == "0000") { if (ratecode == "104") { RuleWeixinpay weixinpay = new RuleWeixinpay(); int i = weixinpay.insertweixinpay(OrderID, transactionnum, jToken["payUrl"].ToString(), DateTime.Now); if (i == 0) { Ownresult = "支付失败"; } Ownresult = "支付中"; } if (ratecode == "102") { RuleAlipay alipay = new RuleAlipay(); int i = alipay.insertAlipay(OrderID, transactionnum, jToken["payUrl"].ToString(), DateTime.Now); if (i == 0) { Ownresult = "支付失败"; } Ownresult = "支付中"; } } else { Ownresult = "支付失败"; messageLog.inserttblPayfailMessageLog("亿动", "888017", result, "支付", "", DateTime.Now, result); } return(Ownresult); }