Browse Source

修复支付问题

chenxiqiang 6 years ago
parent
commit
1661c6c897

+ 1
- 0
manage-server/app/Http/Controllers/PaymentController.php View File

@@ -34,6 +34,7 @@ class PaymentController extends Controller
34 34
                 'total_fee' => $order->price * 100,
35 35
                 'trade_type' => 'JSAPI',
36 36
                 'openid' => $wechat_id,
37
+                'notify_url' => 'https://wechat.sotype.com/api/payments/wechat-notify',
37 38
                 'time_expire' => Carbon::now()->addHour()->format('YmdHis')
38 39
             ]);
39 40
 

+ 3
- 2
manage-server/routes/api.php View File

@@ -46,7 +46,7 @@ Route::post('/campaign/store', 'CampaignController@store');
46 46
 Route::post('/product/store', 'ProductController@store');
47 47
 
48 48
 
49
-Route::any('payments/wechat-notify', 'PaymentController@notify');
49
+Route::post('/payments/wechat-notify', 'PaymentController@notify');
50 50
 
51 51
 
52 52
 Route::middleware(['token'])->group(function () {
@@ -60,5 +60,6 @@ Route::middleware(['token'])->group(function () {
60 60
     Route::post('/product_order/store', 'ProductOrderController@store');
61 61
     Route::post('/server_info/store', 'ServerInfoController@store');
62 62
     Route::post('/company_info/store', 'CompanyInfoController@store');
63
-    Route::post('payments/pay', 'PaymentController@buildOrder');
63
+    Route::post('/payments/pay', 'PaymentController@buildOrder');
64 64
 });
65
+

Loading…
Cancel
Save