Home  >  Article  >  Backend Development  >  微信支付结果重复通知,要怎么返回参数给微信?

微信支付结果重复通知,要怎么返回参数给微信?

WBOY
WBOYOriginal
2016-06-06 20:16:051817browse

按微信开发文档上写的 直接return

<code><xml> 
<return_code></return_code>
  <return_msg></return_msg>
</xml>
</code>

这段xml代码不起作用,还是会重复收到微信的通知。该怎么解决呢?

回复内容:

按微信开发文档上写的 直接return

<code><xml> 
<return_code></return_code>
  <return_msg></return_msg>
</xml>
</code>

这段xml代码不起作用,还是会重复收到微信的通知。该怎么解决呢?

关于支付的开发,推荐去看官方的文档和源码。我之前就是因为没有仔细读文档,浪费了很多时间。请参考有关微信支付的开发(PHP):
http://www.ihuxu.com/blog/wechat-pay-sdk-development/

在return xml前判断订单是否已经更新过,更新过的订单直接不处理

最直接的就是下载官方的demo运行一下 看是否有问题 没问题 然后再对照自己的代码 看那个步骤出问题

http://www.oschina.net/question/560841_225367

你需要给一个回调的地址,然后将它post过来的数据获取就行了应该是xml格式的你自己解析一下

如果通知重复了,直接忽略即可。

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn