关于微信支付后,回调5次 有没有高手帮忙解决
public static string notice_url()
{
string result = "";
string resultFromWx = getPostStr();
var res = System.Xml.Linq.XDocument.Parse(resultFromWx);
string patha1 = System.Web.HttpRuntime.BinDirectory;
System.IO.StreamWriter loga1 = new System.IO.StreamWriter(patha1 + "SUOYOU.txt", true);
loga1.WriteLine(res);
loga1.Close();
if (res.Element("xml").Element("return_code").Value == "SUCCESS")
{
if (res.Element("xml").Element("result_code").Value == "SUCCESS")
{
string attach = res.Element("xml").Element("attach").Value;
string total_fee_str = res.Element("xml").Element("total_fee").Value;
//存入数据库
DalHelper dbHelper = new DalHelper();
int ss = dbHelper.AjaxInserttotal_fee(System.Convert.ToString(total_fee_str), attach);
if (ss > 0)
{
//告诉微信我知道了,不要再给我发消息了,否则微信会8连击的反馈支付信息
WxPayData Res = new WxPayData();
Res.SetValue("return_code", "SUCCESS");
Res.SetValue("return_msg", "OK");
result = Res.ToXml();
string patha = System.Web.HttpRuntime.BinDirectory;
System.IO.StreamWriter loga = new System.IO.StreamWriter(patha + "resultInfo.txt", true);
loga.WriteLine(result);
loga.Close();
}
}
}
return result;
{
string result = "";
string resultFromWx = getPostStr();
var res = System.Xml.Linq.XDocument.Parse(resultFromWx);
string patha1 = System.Web.HttpRuntime.BinDirectory;
System.IO.StreamWriter loga1 = new System.IO.StreamWriter(patha1 + "SUOYOU.txt", true);
loga1.WriteLine(res);
loga1.Close();
if (res.Element("xml").Element("return_code").Value == "SUCCESS")
{
if (res.Element("xml").Element("result_code").Value == "SUCCESS")
{
string attach = res.Element("xml").Element("attach").Value;
string total_fee_str = res.Element("xml").Element("total_fee").Value;
//存入数据库
DalHelper dbHelper = new DalHelper();
int ss = dbHelper.AjaxInserttotal_fee(System.Convert.ToString(total_fee_str), attach);
if (ss > 0)
{
//告诉微信我知道了,不要再给我发消息了,否则微信会8连击的反馈支付信息
WxPayData Res = new WxPayData();
Res.SetValue("return_code", "SUCCESS");
Res.SetValue("return_msg", "OK");
result = Res.ToXml();
string patha = System.Web.HttpRuntime.BinDirectory;
System.IO.StreamWriter loga = new System.IO.StreamWriter(patha + "resultInfo.txt", true);
loga.WriteLine(result);
loga.Close();
}
}
}
return result;
...全文
相关推荐
微信支付demo 最新版 V3.3.7 有微信支付加 微信回调所有程序 可直接运行
里面是微信最新支付程序 demo,填写参数可直接运行,无效我是2B,里面无多余代码 已整理,C#版
微信支付回调工具类
对接微信支付统一下单接口时,下单支付成功后的回调工具类,相关的回调工具类使用,大家可以关注我的博客进入查看,有关键代码解析,配套使用更佳
微信支付-商户支付模式一url接口回调-java版
微信支付-商户支付模式一url接口回调-java版,代码清晰,可直接运行
详解APP微信支付(java后台_统一下单和回调)
主要介绍了APP微信支付(java后台_统一下单和回调),文中通过示例代码介绍的非常详细,对大家的学习或者工作具有一定的参考学习价值,需要的朋友们下面随着小编来一起学习学习吧
SpringMvc微信支付回调示例代码
微信一直是一个比较热门的词汇,今天这篇文章主要介绍的是SpringMvc微信支付回调的示例代码,对大家开发微信支付具有一定的参考借鉴价值,下面来一起看看吧。


