关于微信支付后,回调5次 有没有高手帮忙解决

qq_16965193 qq_16965193 墨衍会员 · AI 创作全网分发 墨衍智能分发 通过墨衍一键同步至各平台 可同步平台 CSDN微信公众号微博知乎掘金百家号博客园抖音小红书 你的文章也可以这样分发 墨衍会员 ¥399起/年,写一次发全网 我也要 + 加入社区
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;
...全文

相关推荐

评论
收藏 已收藏
分享
返回顶部
qq_16965193
.NET社区 62,274 成员 668,968 内容