Browse Source

修复支付问题

chenxiqiang 6 years ago
parent
commit
1d46212073
2 changed files with 16 additions and 18 deletions
  1. 1
    1
      manage-server/config/wechat.php
  2. 15
    17
      manage-server/routes/api.php

+ 1
- 1
manage-server/config/wechat.php View File

@@ -113,7 +113,7 @@ return [
113 113
             'key'                => env('WECHAT_PAYMENT_KEY', 'king3430439854450499252258817008'),
114 114
             //'cert_path'          => env('WECHAT_PAYMENT_CERT_PATH', 'path/to/cert/apiclient_cert.pem'),    // XXX: 绝对路径!!!!
115 115
             //'key_path'           => env('WECHAT_PAYMENT_KEY_PATH', 'path/to/cert/apiclient_key.pem'),      // XXX: 绝对路径!!!!
116
-            'notify_url'         => 'https://wechat.sotype.com/payments/wechat-notify',                           // 默认支付结果通知地址
116
+            'notify_url'         => 'https://wechat.sotype.com/api/payments/wechat-notify',                           // 默认支付结果通知地址
117 117
         ],
118 118
         // ...
119 119
     ],

+ 15
- 17
manage-server/routes/api.php View File

@@ -34,33 +34,31 @@ Route::get('/campaigns', 'CampaignController@list');
34 34
 Route::get('/products', 'ProductController@list');
35 35
 
36 36
 Route::get('/house_clean_orders', 'HouseCleanOrderController@list');
37
-
38 37
 Route::get('/house_appliance_clean_orders', 'HouseApplianceCleanOrderController@list');
39
-
40 38
 Route::get('/housekeeper_orders', 'HousekeeperOrderController@list');
41
-
42 39
 Route::get('/maternity_matron_orders', 'MaternityMatronOrderController@list');
43
-
44 40
 Route::get('/product_orders', 'ProductOrderController@list');
45
-
46 41
 Route::get('/server_infos', 'ServerInfoController@list');
47
-
48 42
 Route::get('/classifies', 'ClassifyController@list');
49
-
50 43
 Route::get('/company_info', 'CompanyInfoController@info');
51 44
 
52
-Route::get('/my/orders', 'CommonController@orders');
53
-Route::post('/{order_type}/{order_id}/comment', 'CommonController@addComment');
54 45
 Route::post('/campaign/store', 'CampaignController@store');
55 46
 Route::post('/product/store', 'ProductController@store');
56
-Route::post('/house_clean_order/store', 'HouseCleanOrderController@store');
57
-Route::post('/house_appliance_clean_order/store', 'HouseApplianceCleanOrderController@store');
58
-Route::post('/housekeeper_order/store', 'HousekeeperOrderController@store');
59
-Route::post('/maternity_matron_order/store', 'MaternityMatronOrderController@store');
60
-Route::post('/product_order/store', 'ProductOrderController@store');
61
-Route::post('/server_info/store', 'ServerInfoController@store');
62
-Route::post('/company_info/store', 'CompanyInfoController@store');
47
+
63 48
 
64 49
 Route::any('payments/wechat-notify', 'PaymentController@notify');
65 50
 
66
-Route::post('payments/pay', 'PaymentController@buildOrder');
51
+
52
+Route::middleware(['token'])->group(function () {
53
+
54
+    Route::get('/my/orders', 'CommonController@orders');
55
+    Route::post('/{order_type}/{order_id}/comment', 'CommonController@addComment');
56
+    Route::post('/house_clean_order/store', 'HouseCleanOrderController@store');
57
+    Route::post('/house_appliance_clean_order/store', 'HouseApplianceCleanOrderController@store');
58
+    Route::post('/housekeeper_order/store', 'HousekeeperOrderController@store');
59
+    Route::post('/maternity_matron_order/store', 'MaternityMatronOrderController@store');
60
+    Route::post('/product_order/store', 'ProductOrderController@store');
61
+    Route::post('/server_info/store', 'ServerInfoController@store');
62
+    Route::post('/company_info/store', 'CompanyInfoController@store');
63
+    Route::post('payments/pay', 'PaymentController@buildOrder');
64
+});

Loading…
Cancel
Save