wesmiler před 2 měsíci
rodič
revize
1a54c56d0c
2 změnil soubory, kde provedl 2 přidání a 10 odebrání
  1. 0 8
      app/Services/PaymentService.php
  2. 2 2
      config/payment.php

+ 0 - 8
app/Services/PaymentService.php

@@ -72,7 +72,6 @@ class PaymentService extends BaseService
                 $appid = isset($config['wxpay_appid']) ? $config['wxpay_appid'] : '';
                 $mpAppid = isset($config['wxpay_mp_appid']) ? $config['wxpay_mp_appid'] : '';
                 $minAppid = isset($config['wxpay_min_appid']) ? $config['wxpay_min_appid'] : '';
-                $serialNo = isset($config['wxpay_serial_no']) ? $config['wxpay_serial_no'] : '';
                 $mchid = isset($config['wxpay_mchd']) ? $config['wxpay_mchd'] : '';
                 $secretV3Key = isset($config['wxpay_key_v3']) ? $config['wxpay_key_v3'] : '';
                 $secretV2Key = isset($config['wxpay_key_v2']) ? $config['wxpay_key_v2'] : '';
@@ -86,13 +85,6 @@ class PaymentService extends BaseService
                 // 支付参数
                 $payConfig = config('payment.wechat');
                 $payConfig['wechat']['default']['mch_id'] = $mchid;
-                // 证书序列号方式验证
-                if($serialNo){
-                    $payConfig['wechat']['default']['serial_no'] = $serialNo;
-                    unset($payConfig['wechat']['default']['wechat_public_cert_path']);
-                }else{
-                    unset($payConfig['wechat']['default']['serial_no']);
-                }
 
                 if ($payPt == 'min') {
                     // 小程序支付

+ 2 - 2
config/payment.php

@@ -15,7 +15,7 @@ return [
                 // 必填-v3商户秘钥
                 'mch_secret_key' => '',
                 // 证书序列号
-                'serial_no' => '',  // 仅证书,非公钥方式验证签名
+                'serial_no' => '',  // 仅证书,非公钥方式验证签名,24年前的商户可用
                 // 必填-商户私钥 字符串或路径
                 'mch_secret_cert' => base_path().'/resources/certs/wechat/apiclient_key.pem',
                 // 必填-商户公钥证书路径
@@ -23,7 +23,7 @@ return [
                 // 选填-微信公钥证书路径,公钥方式验证签名需配置
                 'wechat_public_cert_path' => [
                     //前面是证书***,登录商户平台【API安全】->【API证书】->【查看证书】,可查看商户API证书***
-//                    'PUB_KEY_ID_0116426419052026020300212051002807' => base_path().'/resources/certs/wechat/pub_key.pem',
+                    'PUB_KEY_ID_0116426419052026020300212051002807' => base_path().'/resources/certs/wechat/pub_key.pem',
                 ],
                 // 必填
                 'notify_url' => '',