模拟微信支付

有时候在调试微信支付时,不需要每次调试都需要在真实环境下单,这时候就可以使用postman。
1 在真实环境中下单,然后打印出微信支付返回的日志

file_put_contents('pay.log','========start=======<br/>',8);
file_put_contents('pay.log',var_export($get,1),8);
file_put_contents('pay.log','========end=======<br/>',8);

日志文件目录:
这里写图片描述
2 用postman模拟微信支付,然后访问微信支付回调

https://ch-zgmart.wshoto.com/addons/ewei_shop/payment/wechat/notify_app.php?appid=你的appid&attach=1:0&openid=你的openid&out_trade_no=SH201807011224043525&result_code=SUCCESS&return_code=SUCCESS&total_fee=1&sign=AC17D4E631EC1BF9920818697F2832EF

3 对回调进行相关处理

猜你喜欢

转载自blog.csdn.net/helenxd/article/details/80873688