From c4a43da49855ab600bcf43befb738cd6aff3dc1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=E9=82=B9=E6=99=AF=E7=AB=8B?= Date: Wed, 5 Mar 2025 23:14:38 +0800 Subject: [PATCH] =?UTF-8?q?fix:=20=E6=9B=B4=E6=96=B0=E5=BE=AE=E4=BF=A1V3?= =?UTF-8?q?=E6=94=AF=E4=BB=98=E9=85=8D=E7=BD=AE=E5=8F=82=E6=95=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../src/service/payment/WechatPayment.php | 3 ++ .../src/view/config/form_wechat.html | 45 ++++++++++++++----- 2 files changed, 38 insertions(+), 10 deletions(-) diff --git a/plugin/think-plugs-payment/src/service/payment/WechatPayment.php b/plugin/think-plugs-payment/src/service/payment/WechatPayment.php index 357b4fa10..708d49b27 100644 --- a/plugin/think-plugs-payment/src/service/payment/WechatPayment.php +++ b/plugin/think-plugs-payment/src/service/payment/WechatPayment.php @@ -93,5 +93,8 @@ abstract class WechatPayment implements PaymentInterface $this->config['ssl_key'] = $local->path($sslKey, true); $this->config['cert_public'] = $this->config['ssl_cer']; $this->config['cert_private'] = $this->config['ssl_key']; + $this->config['cert_serial'] = $this->cfgParams['wechat_mch_cer_id'] ?? ''; + $this->config['mp_cert_serial'] = $this->cfgParams['wechat_mch_v3_paycer_id'] ?? ''; + $this->config['mp_cert_content'] = $this->cfgParams['wechat_mch_v3_paycer_text'] ?? ''; } } \ No newline at end of file diff --git a/plugin/think-plugs-payment/src/view/config/form_wechat.html b/plugin/think-plugs-payment/src/view/config/form_wechat.html index f3f9d2c32..bc3fc639d 100644 --- a/plugin/think-plugs-payment/src/view/config/form_wechat.html +++ b/plugin/think-plugs-payment/src/view/config/form_wechat.html @@ -38,17 +38,42 @@ 必填,微信商户密钥,需要在微信商户平台操作设置密码并获取密钥,建议定期更换密钥。 - +
+ 微信商户证书 +
+ + + +
+
- +
+ 微信支付公钥 +
+ + +
+