feat : wechatPay callback

This commit is contained in:
2025-03-18 15:52:16 +08:00
parent 2b7b3a0369
commit bdffc3311d

View File

@@ -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;