public static string Query_youmifu(string merchant_order) { string url = ApplicationSettings.Get("url_ymf"); string value = ApplicationSettings.Get("parter_ymf"); string key = ApplicationSettings.Get("key_ymf"); Dictionary <string, string> dictionary = new Dictionary <string, string>(); dictionary["apiName"] = "SINGLE_SETT_QUERY"; dictionary["apiVersion"] = "1.0.0.0"; dictionary["platformID"] = value; dictionary["merchNo"] = value; dictionary["orderNo"] = merchant_order; dictionary["tradeDate"] = DateTime.Now.ToString("yyyyMMdd"); string sourceData = PayHelper.PrepareSign(dictionary); string text2 = dictionary["signMsg"] = Jiami.sign(sourceData, key); string param = HttpHelper.GetParam(dictionary); string text3 = HttpHelper.HttpRequest(url, param); if (text3.Contains("respCode")) { XmlDocument xmlDocument = new XmlDocument(); xmlDocument.LoadXml(text3); string innerText = xmlDocument.SelectSingleNode("/moboAccount/respData/respCode").InnerText; string innerText2 = xmlDocument.SelectSingleNode("/moboAccount/respData/Status").InnerText; if (innerText == "00" && innerText2 != "2") { return("SUCCESS"); } return(xmlDocument.SelectSingleNode("/moboAccount/respData/respDesc").InnerText); } return("查询订单失败"); }
public static string Daifu_youmifu(string order_no, decimal amount, string full_name, string bank_card_no, string bank_code, string bankAddress, string province, string city, string host, out string flowid) { switch (bank_code) { case "CMBCHINA": bank_code = "CMB"; break; case "BOCOM": bank_code = "COMM"; break; case "ECITIC": bank_code = "CNCB"; break; case "PINGAN": bank_code = "PAB"; break; case "CGB": bank_code = "GDB"; break; } string url = ApplicationSettings.Get("url_ymf"); string value = ApplicationSettings.Get("parter_ymf"); string key = ApplicationSettings.Get("key_ymf"); Dictionary <string, string> dictionary = new Dictionary <string, string>(); dictionary["apiName"] = "SINGLE_ENTRUST_SETT"; dictionary["apiVersion"] = "1.0.0.0"; dictionary["platformID"] = value; dictionary["merchNo"] = value; dictionary["orderNo"] = order_no; dictionary["tradeDate"] = DateTime.Now.ToString("yyyyMMdd"); dictionary["merchUrl"] = "http://" + host + "/handler.aspx"; dictionary["merchParam"] = TextUtility.CreateAuthStr(20, false); dictionary["bankAccNo"] = bank_card_no.Trim(); dictionary["bankAccName"] = full_name.Trim(); dictionary["bankCode"] = bank_code.Trim(); dictionary["bankName"] = bankAddress.Trim(); if (province.Trim() != "") { dictionary["province"] = province.Trim(); } if (city.Trim() != "") { dictionary["city"] = city.Trim(); } dictionary["Amt"] = amount.ToString("#0.00"); dictionary["tradeSummary"] = "shop"; string sourceData = PayHelper.PrepareSign(dictionary); string text2 = dictionary["signMsg"] = Jiami.sign(sourceData, key); string param = HttpHelper.GetParam(dictionary); string text3 = HttpHelper.HttpRequest(url, param); flowid = ""; if (text3.Contains("respCode")) { XmlDocument xmlDocument = new XmlDocument(); xmlDocument.LoadXml(text3); string innerText = xmlDocument.SelectSingleNode("/moboAccount/respData/respCode").InnerText; if (innerText == "00") { string text4 = flowid = xmlDocument.SelectSingleNode("/moboAccount/respData/batchNo").InnerText; return("SUCCESS"); } return(xmlDocument.SelectSingleNode("/moboAccount/respData/respDesc").InnerText); } return(text3); }