Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

微信支付结果通知 返回后 仍然继续通知多次 #1088

Closed
shenqiancheng opened this issue Jun 29, 2019 · 9 comments

Comments

@shenqiancheng
Copy link

commented Jun 29, 2019

return WxPayNotifyResponse.success("OK");
这样返回 微信仍然会通知多次

return "<xml><return_code><![CDATA[SUCCESS]]></return_code><return_msg><![CDATA[OK]]></return_msg></xml>";
如果直接用原生的返回 微信就不会通知了

@binarywang

This comment has been minimized.

Copy link
Member

commented Jun 30, 2019

https://pay.weixin.qq.com/wiki/doc/api/jsapi.php?chapter=9_7&index=8
https://pay.weixin.qq.com/wiki/doc/api/wxa/wxa_api.php?chapter=9_7&index=8
https://pay.weixin.qq.com/wiki/doc/api/app/app.php?chapter=9_7&index=3

看了三种微信支付通知结果的格式,均为如下:

<xml>
  <return_code><![CDATA[SUCCESS]]></return_code>
  <return_msg><![CDATA[OK]]></return_msg>
</xml>

跟代码输出结果一致,不知道你哪儿来的格式,不带外层的xml?

@shenqiancheng

This comment has been minimized.

Copy link
Author

commented Jun 30, 2019

@binarywang

This comment has been minimized.

Copy link
Member

commented Jun 30, 2019

回复的时候直接复制过来的, 带外层的xml, 应该是github给我转义了. 我已经重新修改

那你再仔细检查下你回复给微信的内容是什么,有什么区别?

@forfuns

This comment has been minimized.

Copy link

commented Jul 1, 2019

@binarywang 我们公司的项目好像也有这个问题

@shenqiancheng

This comment has been minimized.

Copy link
Author

commented Jul 1, 2019

回复的时候直接复制过来的, 带外层的xml, 应该是github给我转义了. 我已经重新修改

那你再仔细检查下你回复给微信的内容是什么,有什么区别?

二者返回给微信的内容
<xml>\n <return_code><![CDATA[SUCCESS]]></return_code>\n <return_msg><![CDATA[OK]]></return_msg>\n</xml>

<xml><return_code><![CDATA[SUCCESS]]></return_code><return_msg><![CDATA[OK]]></return_msg></xml>

@binarywang

This comment has been minimized.

Copy link
Member

commented Jul 8, 2019

就因为多了几个换行符吗?

@shenqiancheng

This comment has been minimized.

Copy link
Author

commented Jul 9, 2019

就因为多了几个换行符吗?

可能是吧

@binarywang

This comment has been minimized.

Copy link
Member

commented Jul 14, 2019

什么鬼,如果真是这个问题,那就真是离谱到家了,他们自己提供的样例就是带换行和空格的。

@binarywang

This comment has been minimized.

Copy link
Member

commented Jul 14, 2019

3.4.7.B测试版本 已修复,欢迎试用

@binarywang binarywang closed this Jul 14, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
3 participants
You can’t perform that action at this time.