From bdffc3311d45f677df2dc510709dad2570fbc434 Mon Sep 17 00:00:00 2001 From: ctexthuang Date: Tue, 18 Mar 2025 15:52:16 +0800 Subject: [PATCH] feat : wechatPay callback --- app/Service/Common/Pay/Wx/WxJsRechargeBaseService.php | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/app/Service/Common/Pay/Wx/WxJsRechargeBaseService.php b/app/Service/Common/Pay/Wx/WxJsRechargeBaseService.php index cf8b8bb..de0c24e 100644 --- a/app/Service/Common/Pay/Wx/WxJsRechargeBaseService.php +++ b/app/Service/Common/Pay/Wx/WxJsRechargeBaseService.php @@ -130,6 +130,7 @@ abstract class WxJsRechargeBaseService implements ThirdPayInterface public function setConfig(): void { $this->config = config('ysdPay'); + $this->config = array_merge($this->config, ['_force' => true]); } /** @@ -157,7 +158,8 @@ abstract class WxJsRechargeBaseService implements ThirdPayInterface ], ]; - $result = $this->ysdPay->wechat(array_merge($this->config, ['_force' => true]))->mp($wxOrder); + $result = $this->ysdPay->wechat($this->config)->mp($wxOrder); +// $result = $this->ysdPay->wechat(array_merge($this->config, ['_force' => true]))->mp($wxOrder); $this->log->callbackLog(__CLASS__.'微信支付调起数据|回调地址:'. json_encode($this->config['wechat']['default']).'|回调数据:'.json_encode($result).'|请求数据:'.json_encode($wxOrder)); return $result; @@ -192,7 +194,8 @@ abstract class WxJsRechargeBaseService implements ThirdPayInterface '_action' => 'mini', // jsapi 退款,默认 ]; - $result = $this->ysdPay->wechat(array_merge($this->config, ['_force' => true]))->refund($order); + $result = $this->ysdPay->wechat($this->config)->refund($order); +// $result = $this->ysdPay->wechat(array_merge($this->config, ['_force' => true]))->refund($order); $this->log->callbackLog(__CLASS__.'微信退款调起数据|回调地址:'. json_encode($this->config['wechat']['default']).'|回调数据:'.json_encode($result).'|请求数据:'.json_encode($order)); return $result;