Przeglądaj źródła

支付回调地址用后台配置的

sugar1569 7 lat temu
rodzic
commit
81c156b516
1 zmienionych plików z 3 dodań i 1 usunięć
  1. 3 1
      extend/service/WechatService.php

+ 3 - 1
extend/service/WechatService.php

@@ -22,6 +22,7 @@ use EasyWeChat\Payment\Order;
 use EasyWeChat\Server\Guard;
 use EasyWeChat\Support\XML;
 use think\Url;
+use think\Request;
 
 class WechatService
 {
@@ -47,7 +48,8 @@ class WechatService
                 'key'=>$payment['pay_weixin_key'],
                 'cert_path'=>realpath('.'.$payment['pay_weixin_client_cert']),
                 'key_path'=>realpath('.'.$payment['pay_weixin_client_key']),
-                'notify_url'=>SystemConfigService::get('site_url').Url::build('wap/Wechat/notify')
+                //'notify_url'=>SystemConfigService::get('site_url').Url::build('wap/Wechat/notify')
+                'notify_url'=>Request::instance()->domain().Url::build('wap/Wechat/notify')
             ];
         }
         return $config;