禾匠小程序支付完成显示未付款问题解决方法
支付完成后显示未付款的主要原因是微信异步通知未正确接收,可尝试修改通知地址
对于目录结构如上的,可设置微信支付通知地址:
$res = $this->wechat->pay->unifiedOrder([
'body' => $goods_names,
'out_trade_no' => $this->order->order_no,
'total_fee' => $this->order->pay_price * 100,
'notify_url' => \Yii::$app->request->hostInfo . \Yii::$app->request->baseUrl . '/index.php/pay-notify/index',
'trade_type' => 'JSAPI',
'openid' => $this->user->wechat_open_id,
]);
这样微信通知将直接请求到controllers/PayNotifyController/ActionIndex;
然后就可以正常完成微信支付异步通知处理了O(∩_∩)O~~
微擎破解禾匠小程序商城
链接:https://cloud.szwyll.com/s/jrqfjnni 密码:gxg2sa
PayNotifyController
2018年12月20日 下午1:17
回调地址怎么设置???
https://xxx.xxx.xxx/web/