Parcourir la source

Merge branch 'master' of http://gits.hdlkeji.com:3000/zhangguidong/chuyu

wanglu il y a 2 ans
Parent
commit
bd2b61e5f0

+ 16 - 17
application/admin/controller/Goodorder.php

@@ -90,23 +90,22 @@ class Goodorder extends Backend
             $params = $this->request->post('row/a');
 
             if($params['status']==1) {
-//                //必要配置
-//                $config = [
-//                    // 必要配置
-//                    'app_id' => 'wx30e9e4bccd4cd489',
-//                    'mch_id' => '1581511381',
-//                    'key' => 'lMZIVguKAbGHqbBYOjqljOkDqQMG9o6R',   // API v2 密钥 (注意: 是v2密钥 是v2密钥 是v2密钥)
-//                    'cert_path'          => common_url().'/cert/apiclient_cert.pem', // XXX: 绝对路径!!!!
-//                    'key_path'           => common_url().'/cert/apiclient_key.pem',      // XXX: 绝对路径!!!
-//                    'notify_url' => common_url() . '/api/Notice/tableware_notify',     // 你也可以在下单时单独设置来想覆盖它
-//                ];
-//
-//                $app = Factory::payment($config);
-//                $refund_no = 'TK' . pay_no(999);
-//                $result = $app->refund->byOutTradeNumber($row['pay_no'], $refund_no, $row['total'], $params['refund_money'], [
-//                    // 可在此处传入其他参数,详细参数见微信支付文档
-//                    'refund_desc' => '退款',
-//                ]);
+                //必要配置
+                $config = [
+                    'app_id' => 'wxdc450b7c5d0a0f80',
+                    'mch_id' => '1635096198',
+                    'key' => 'e3NkU3L7vmz84H92kfKT5d9qBCOmvdEB',    // API v2 密钥 (注意: 是v2密钥 是v2密钥 是v2密钥)
+                    'cert_path'          => common_url().'/cert/apiclient_cert.pem', // XXX: 绝对路径!!!!
+                    'key_path'           => common_url().'/cert/apiclient_key.pem',      // XXX: 绝对路径!!!
+                    'notify_url' => common_url() . '/api/Notice/tableware_notify',     // 你也可以在下单时单独设置来想覆盖它
+                ];
+
+                $app = Factory::payment($config);
+                $refund_no = 'TK' . pay_no(999);
+                $result = $app->refund->byOutTradeNumber($row['pay_no'], $refund_no, $row['total'], $params['refund_money'], [
+                    // 可在此处传入其他参数,详细参数见微信支付文档
+                    'refund_desc' => '退款',
+                ]);
 
                 $this->model->save(['status'=>7],['id'=>$ids]);
                 $this->success('退款成功', 'index');

+ 9 - 9
application/api/controller/Notify.php

@@ -27,9 +27,9 @@ class Notify extends Api
         //必要配置
         $config = [
             // 必要配置
-            'app_id' => 'wx30e9e4bccd4cd489',
-            'mch_id' => '1581511381',
-            'key' => 'lMZIVguKAbGHqbBYOjqljOkDqQMG9o6R',   // API v2 密钥 (注意: 是v2密钥 是v2密钥 是v2密钥)
+            'app_id' => 'wxdc450b7c5d0a0f80',
+            'mch_id' => '1635096198',
+            'key' => 'e3NkU3L7vmz84H92kfKT5d9qBCOmvdEB',    // API v2 密钥 (注意: 是v2密钥 是v2密钥 是v2密钥)
             'notify_url' => common_url().'/api/Notice/good_notify',     // 你也可以在下单时单独设置来想覆盖它
         ];
 
@@ -82,9 +82,9 @@ class Notify extends Api
         //必要配置
         $config = [
             // 必要配置
-            'app_id' => 'wx30e9e4bccd4cd489',
-            'mch_id' => '1581511381',
-            'key' => 'lMZIVguKAbGHqbBYOjqljOkDqQMG9o6R',   // API v2 密钥 (注意: 是v2密钥 是v2密钥 是v2密钥)
+            'app_id' => 'wxdc450b7c5d0a0f80',
+            'mch_id' => '1635096198',
+            'key' => 'e3NkU3L7vmz84H92kfKT5d9qBCOmvdEB',   // API v2 密钥 (注意: 是v2密钥 是v2密钥 是v2密钥)
             'notify_url' => common_url().'/api/Notice/recovery_notify',     // 你也可以在下单时单独设置来想覆盖它
         ];
 
@@ -156,9 +156,9 @@ class Notify extends Api
         //必要配置
         $config = [
             // 必要配置
-            'app_id' => 'wx30e9e4bccd4cd489',
-            'mch_id' => '1581511381',
-            'key' => 'lMZIVguKAbGHqbBYOjqljOkDqQMG9o6R',   // API v2 密钥 (注意: 是v2密钥 是v2密钥 是v2密钥)
+            'app_id' => 'wxdc450b7c5d0a0f80',
+            'mch_id' => '1635096198',
+            'key' => 'e3NkU3L7vmz84H92kfKT5d9qBCOmvdEB',     // API v2 密钥 (注意: 是v2密钥 是v2密钥 是v2密钥)
             'notify_url' => common_url().'/api/Notice/tableware_notify',     // 你也可以在下单时单独设置来想覆盖它
         ];
 

+ 9 - 9
application/api/controller/Pay.php

@@ -37,9 +37,9 @@ class Pay extends Api
         $notify_url = common_url().'/index.php/api/Notify/good_notify';
         $config = [
             // 必要配置
-            'app_id' => 'wx30e9e4bccd4cd489',
-            'mch_id' => '1581511381',
-            'key' => 'lMZIVguKAbGHqbBYOjqljOkDqQMG9o6R',   // API v2 密钥 (注意: 是v2密钥 是v2密钥 是v2密钥)
+            'app_id' => 'wxdc450b7c5d0a0f80',
+            'mch_id' => '1635096198',
+            'key' => 'e3NkU3L7vmz84H92kfKT5d9qBCOmvdEB',     // API v2 密钥 (注意: 是v2密钥 是v2密钥 是v2密钥)
             'notify_url' => $notify_url,     // 你也可以在下单时单独设置来想覆盖它
         ];
         $app = Factory::payment($config);
@@ -97,9 +97,9 @@ class Pay extends Api
         $notify_url = common_url().'/index.php/api/Notify/tableware_notify';
         $config = [
             // 必要配置
-            'app_id' => 'wx30e9e4bccd4cd489',
-            'mch_id' => '1581511381',
-            'key' => 'lMZIVguKAbGHqbBYOjqljOkDqQMG9o6R',   // API v2 密钥 (注意: 是v2密钥 是v2密钥 是v2密钥)
+            'app_id' => 'wxdc450b7c5d0a0f80',
+            'mch_id' => '1635096198',
+            'key' => 'e3NkU3L7vmz84H92kfKT5d9qBCOmvdEB',     // API v2 密钥 (注意: 是v2密钥 是v2密钥 是v2密钥)
             'notify_url' => $notify_url,     // 你也可以在下单时单独设置来想覆盖它
         ];
         $app = Factory::payment($config);
@@ -160,9 +160,9 @@ class Pay extends Api
         $notify_url = common_url().'/index.php/api/Notify/recovery_notify';
         $config = [
             // 必要配置
-            'app_id' => 'wx30e9e4bccd4cd489',
-            'mch_id' => '1581511381',
-            'key' => 'lMZIVguKAbGHqbBYOjqljOkDqQMG9o6R',   // API v2 密钥 (注意: 是v2密钥 是v2密钥 是v2密钥)
+            'app_id' => 'wxdc450b7c5d0a0f80',
+            'mch_id' => '1635096198',
+            'key' => 'e3NkU3L7vmz84H92kfKT5d9qBCOmvdEB',    // API v2 密钥 (注意: 是v2密钥 是v2密钥 是v2密钥)
             'notify_url' => $notify_url,     // 你也可以在下单时单独设置来想覆盖它
         ];
         $app = Factory::payment($config);

BIN
public/cert/apiclient_cert.p12


+ 19 - 20
public/cert/apiclient_cert.pem

@@ -1,24 +1,23 @@
 -----BEGIN CERTIFICATE-----
-MIID8zCCAtugAwIBAgIUEhtLW3WakPOXfZrdeM7dw7iHBuwwDQYJKoZIhvcNAQEL
+MIID6TCCAtGgAwIBAgIUeigWlbMRaXESqNOo6tNElpUtaswwDQYJKoZIhvcNAQEL
 BQAwXjELMAkGA1UEBhMCQ04xEzARBgNVBAoTClRlbnBheS5jb20xHTAbBgNVBAsT
 FFRlbnBheS5jb20gQ0EgQ2VudGVyMRswGQYDVQQDExJUZW5wYXkuY29tIFJvb3Qg
-Q0EwHhcNMjIxMTEyMDYxNzE5WhcNMjcxMTExMDYxNzE5WjCBhDETMBEGA1UEAwwK
-MTU4MTUxMTM4MTEbMBkGA1UECgwS5b6u5L+h5ZWG5oi357O757ufMTAwLgYDVQQL
-DCfkuLTmsoLmtbflvrfmi4nnvZHnu5znp5HmioDmnInpmZDlhazlj7gxCzAJBgNV
-BAYMAkNOMREwDwYDVQQHDAhTaGVuWmhlbjCCASIwDQYJKoZIhvcNAQEBBQADggEP
-ADCCAQoCggEBAOBIv7aCQZLRQJSLLfFMOAg5lh3e84JFLuELPcVM6ECpyr1qUdGM
-dVjRHkS/zTii6x0uPjNB3asakAbzut+hpeNeKOQFU5dt7uoAvyJZh3pSqnpJhVT1
-GgFMDoV0A39cvFUBZJZanCz9lfxivrUYJTCYkhZvfGJALr84Hu3p4/BMVBNMLHTi
-W6t3JJNuaMdTsOPKOMIDv1+iVI32IRl074/gSGmyssrrbv5dTHRS19PQo3J119SX
-42GcR3M9CGFA8d4P4xiogAqpuOVFLk57ve8kgf/ZUj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