-
-
Notifications
You must be signed in to change notification settings - Fork 2.4k
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
无法通知微信支付完成 #412
Comments
@zyj007 建议把弄错的原因贴上,便于帮忙其它人,谢谢! |
因为$response的信息不是很方便调试,所以一直找不到错误原因。后来在chrome上装了个simple-rest-client的扩展,通过easywechat日志中的微信返回的内容,再放到simple-rest-client中模拟微信返回,找到错误,解决问题 |
我也遇到了同样的问题, 请问你后来找到的错误是什么 @zyj007 |
请问你@zyj007如何解决的,我也遇到同样的问题. |
我通过$reponse->__toString(),把内容记录到log后看,内容是正确的 |
我用的环境
PHP 版本:5.6.20
overtrue/wechat 版本:3.0.16
问题及现象
使用扫描支付成功后,微信发送通知到本地,本地服务器可以通过handleNotify正确接收通知,但是使用
本地服务器通知微信支付完成时(return true,return $response),微信均无法正确收到通知。
调试$response,json_encode后出来的数据是{"headers":{}}
$app = new \EasyWeChat\Foundation\Application($this->options);
$response = $app->payment->handleNotify(function($notify, $successful){
$ticketid=$notify->out_trade_no;
//处理业务
return true;
});
return $response;
//M('ordernotice')->add(array('orderinfo'=>json_encode($response)));//调试用
The text was updated successfully, but these errors were encountered: