zhangguidong 2 роки тому
батько
коміт
53e7c1f8dc

+ 2 - 2
app/data/controller/api/business/Order.php

@@ -269,8 +269,8 @@ class Order  extends Controller
             'mch_id' => '1634830915',
             'key' => '7aa3fg0htful8nttb135rnusbvmeggbi',
             'notify_url' => '',
-            'cert_client' => 'https://ship-expert.zhousi.hdlkeji.com/cert/apiclient_cert.pem', // optional, 退款,红包等情况时需要用到
-            'cert_key' => 'https://ship-expert.zhousi.hdlkeji.com/cert/apiclient_key.pem',// optional, 退款,红包等情况时需要用到
+            'cert_client' => 'https://ship-expert.zhousi.hdlkeji.com/public/cert/apiclient_cert.pem', // optional, 退款,红包等情况时需要用到
+            'cert_key' => 'https://ship-expert.zhousi.hdlkeji.com/public/cert/apiclient_key.pem',// optional, 退款,红包等情况时需要用到
             'log' => [ // optional
                 'file' => './logs/wechat.log',
                 'level' => 'info', // 建议生产环境等级调整为 info,开发环境为 debug

BIN
public/cert/apiclient_cert.p12


+ 25 - 0
public/cert/apiclient_cert.pem

@@ -0,0 +1,25 @@
+-----BEGIN CERTIFICATE-----
+MIIELjCCAxagAwIBAgIUblpz4LAITPBGG7RP4Pg5MYKgCE0wDQYJKoZIhvcNAQEL
+BQAwXjELMAkGA1UEBhMCQ04xEzARBgNVBAoTClRlbnBheS5jb20xHTAbBgNVBAsT
+FFRlbnBheS5jb20gQ0EgQ2VudGVyMRswGQYDVQQDExJUZW5wYXkuY29tIFJvb3Qg
+Q0EwHhcNMjMwMzAyMDgzNzU5WhcNMjgwMjI5MDgzNzU5WjCBhzETMBEGA1UEAwwK
+MTYzNDgzMDkxNTEbMBkGA1UECgwS5b6u5L+h5ZWG5oi357O757ufMTMwMQYDVQQL
+DCrkuIrmtbfmn4/nlaXmnLrnlLXlt6XkuJrmnI3liqHmnInpmZDlhazlj7gxCzAJ
+BgNVBAYMAkNOMREwDwYDVQQHDAhTaGVuWmhlbjCCASIwDQYJKoZIhvcNAQEBBQAD
+ggEPADCCAQoCggEBAK3a6X4+wTAh4wHWB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IXD0hNROXBH7ikKWpkg1SlU5VPO+lKbXR66yaL1m3cetIIaCF
+L83p+0XfhssCgYBprt3UXI2JZihGM8yRjpdI28ABUDUTfl0n/xFT0H+e6UTKlvSk
+fLfktBOuqE/rmrT/kS2PIIqZKE6Mq2rJB/yhFf78rvbaOM21T2d8xc7SirxtpvaE
+oBJfb+I38QpE7ndeLmh2ExHEEKKHKkWMudf1w2wkcR/Bw5yp2R4LzgBxmwKBgCir
+0yYg88iqJn4l/2jS6fse5+tWqQIDC05l0O6Cq3J50hYhytQISmX31XdC3TfWZXd7
+zfmwNJFR5w4t9k9J6DPY4jWGDjwl9XXx8L+FPiGQDmb5Qz9vrBc/lFKC62GuSOu7
+Eqaji0nzaLjV4xSu/UDotPW1qG9qyx8I4h8/4y1zAoGBAKefaUPWgom3UEsWFmc3
+ppkcgdiFha3rIem1S2HA1HHJ2ub2BTofPyrYzxU/7Q1JJlaL2h/NzsFR5e4qBoYQ
+EOugK/Q13NT69SCPbF2rp+A4LK+SA1VyXQr29iG8QXCMkoH/eliJgWtDgUDz8aBD
+8HKSX1/os4YYgIobG9wy1TM4
+-----END PRIVATE KEY-----

+ 18 - 0
public/cert/证书使用说明.txt

@@ -0,0 +1,18 @@
+欢迎使用微信支付!
+附件中的三份文件(证书pkcs12格式、证书pem格式、证书密钥pem格式),为接口中强制要求时需携带的证书文件。
+证书属于敏感信息,请妥善保管不要泄露和被他人复制。
+不同开发语言下的证书格式不同,以下为说明指引:
+    证书pkcs12格式(apiclient_cert.p12)
+        包含了私钥信息的证书文件,为p12(pfx)格式,由微信支付签发给您用来标识和界定您的身份
+        部分安全性要求较高的API需要使用该证书来确认您的调用身份
+        windows上可以直接双击导入系统,导入过程中会提示输入证书密码,证书密码默认为您的商户号(如:1900006031)
+    证书pem格式(apiclient_cert.pem)
+        从apiclient_cert.p12中导出证书部分的文件,为pem格式,请妥善保管不要泄漏和被他人复制
+        部分开发语言和环境,不能直接使用p12文件,而需要使用pem,所以为了方便您使用,已为您直接提供
+        您也可以使用openssl命令来自己导出:openssl pkcs12 -clcerts -nokeys -in apiclient_cert.p12 -out apiclient_cert.pem
+    证书密钥pem格式(apiclient_key.pem)
+        从apiclient_cert.p12中导出密钥部分的文件,为pem格式
+        部分开发语言和环境,不能直接使用p12文件,而需要使用pem,所以为了方便您使用,已为您直接提供
+        您也可以使用openssl命令来自己导出:openssl pkcs12 -nocerts -in apiclient_cert.p12 -out apiclient_key.pem
+备注说明:  
+        由于绝大部分操作系统已内置了微信支付服务器证书的根CA证书,  2018年3月6日后, 不再提供CA证书文件(rootca.pem)下载