王新凯 3 years ago
parent
commit
473c97a7d8

+ 2 - 0
application/common/model/User.php

@@ -876,6 +876,8 @@ class User Extends Model
                         'app_id'=>'wxdef89d7107305671',//微信appid
                         'mch_id'=>'1581511381',//商户号
                         'key'   =>'4a87a9e1b6c07cc4edbbd118d85fbffe',//秘钥
+                        'cert_path'=>'wx_cert/apiclient_cert.pem', //证书地址
+                        'key_path' =>'wx_cert/apiclient_key.pem', //证书地址
                     ];
                     try{
                         $app  =  Factory::payment($config);

BIN
public/wx_cert/apiclient_cert.p12


+ 24 - 0
public/wx_cert/apiclient_cert.pem

@@ -0,0 +1,24 @@
+-----BEGIN CERTIFICATE-----
+MIID8zCCAtugAwIBAgIUWU16v7f81wG0Bfu+3Te06kD7LLcwDQYJKoZIhvcNAQEL
+BQAwXjELMAkGA1UEBhMCQ04xEzARBgNVBAoTClRlbnBheS5jb20xHTAbBgNVBAsT
+FFRlbnBheS5jb20gQ0EgQ2VudGVyMRswGQYDVQQDExJUZW5wYXkuY29tIFJvb3Qg
+Q0EwHhcNMjAxMTA2MDUzMTQ1WhcNMjUxMTA1MDUzMTQ1WjCBhDETMBEGA1UEAwwK
+MTU4MTUxMTM4MTEbMBkGA1UECgwS5b6u5L+h5ZWG5oi357O757ufMTAwLgYDVQQL
+DCfkuLTmsoLmtbflvrfmi4nnvZHnu5znp5HmioDmnInpmZDlhazlj7gxCzAJBgNV
+BAYMAkNOMREwDwYDVQQHDAhTaGVuWmhlbjCCASIwDQYJKoZIhvcNAQEBBQADggEP
+ADCCAQoCggEBAOI6G8StA/0hgclKO07YZdcMW2crTkVABVxLMuubnnr73VNDlMnJ
+x0TaJ1lKoPcc2cshkxHFVT9oVboFOc1Rf2mmZqULJtGdZnASOOK4mKOiQI+n+j0K
+Guv/SGaS0beVEBPRhnCIDInG2Nyo9UlriNGKYIy11euh0eKaaBulODhyVreSDkmV
+DryZjNMT603iyMENCLpVgiCqhXRHvC57HcEFtjqDNekYi+H0PituhiQFpN73Q8CQ
+Rweokzwk7fTiwgKbjKzXf/sJt+/SFE6MkQfRv8nhkMyFkjizTxp0pVsgA8OIofj/
+t0/vL5CL9l4S6vitMEHDuwAcRBW72avYk0sCAwEAAaOBgTB/MAkGA1UdEwQCMAAw
+CwYDVR0PBAQDAgTwMGUGA1UdHwReMFwwWqBYoFaGVGh0dHA6Ly9ldmNhLml0cnVz
+LmNvbS5jbi9wdWJsaWMvaXRydXNjcmw/Q0E9MUJENDIyMEU1MERCQzA0QjA2QUQz
+OTc1NDk4NDZDMDFDM0U4RUJEMjANBgkqhkiG9w0BAQsFAAOCAQEAZjp5/1bnjho2
+9O65PxThWndM/raTxFquHDafopU75kfax+N9IWwgUi46DbMZGAyG1ajIH0X128Nf
+eeUZX26c6JeZ7AB1gPfTM4I8jNRFPRgkOMB62MK5AkszBLCuPm7vRH7lxkyvNvIN
+Nvd4MgOYmm3e098G+EEeCQaMxK17C6v8hah9VR9YbQIpfBcWTFD9YaWh1ynvbppc
+nl5dehafSpGVvpv082/qyo2/RKg0Yb91+ico6np/tsSbJoYNhgm1e0J5lYrTE4fx
+f6q8DYxjHaUAcAhQL3QF2EGtGWRMz8S71RONTjz3g/GRGclxq/xeP3YnseR8p405
+CH0iCMtzoQ==
+-----END CERTIFICATE-----

+ 28 - 0
public/wx_cert/apiclient_key.pem

@@ -0,0 +1,28 @@
+-----BEGIN PRIVATE KEY-----
+MIIEvgIBADANBgkqhkiG9w0BAQEFAASCBKgwggSkAgEAAoIBAQDiOhvErQP9IYHJ
+SjtO2GXXDFtnK05FQAVcSzLrm556+91TQ5TJycdE2idZSqD3HNnLIZMRxVU/aFW6
+BTnNUX9ppmalCybRnWZwEjjiuJijokCPp/o9Chrr/0hmktG3lRAT0YZwiAyJxtjc
+qPVJa4jRimCMtdXrodHimmgbpTg4cla3kg5JlQ68mYzTE+tN4sjBDQi6VYIgqoV0
+R7wuex3BBbY6gzXpGIvh9D4rboYkBaTe90PAkEcHqJM8JO304sICm4ys13/7Cbfv
+0hROjJEH0b/J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