Bläddra i källkod

修复支付问题

chenxiqiang 6 år sedan
förälder
incheckning
3cb29ae74e
1 ändrade filer med 2 tillägg och 2 borttagningar
  1. 2
    2
      manage-server/app/Http/Controllers/PaymentController.php

+ 2
- 2
manage-server/app/Http/Controllers/PaymentController.php Visa fil

37
             }
37
             }
38
 
38
 
39
 
39
 
40
-            $out_trade_no = $order_type . "_" . $order_id;
40
+            $out_trade_no = $order_type . "-" . $order_id;
41
             $app = app('wechat.payment');
41
             $app = app('wechat.payment');
42
 
42
 
43
             $result = $app->order->unify([
43
             $result = $app->order->unify([
81
         $app = app('wechat.payment');
81
         $app = app('wechat.payment');
82
         $response = $app->handlePaidNotify(function($message, $fail){
82
         $response = $app->handlePaidNotify(function($message, $fail){
83
             // 使用通知里的 "微信支付订单号" 或者 "商户订单号" 去自己的数据库找到订单
83
             // 使用通知里的 "微信支付订单号" 或者 "商户订单号" 去自己的数据库找到订单
84
-            $arrays = preg_split("/_/", $message['out_trade_no']);
84
+            $arrays = preg_split("/-/", $message['out_trade_no']);
85
             $order_type = $arrays[0];
85
             $order_type = $arrays[0];
86
             $order_id = $arrays[1];
86
             $order_id = $arrays[1];
87
             $order = CommonController::getRecord($order_type, $order_id);
87
             $order = CommonController::getRecord($order_type, $order_id);

Loading…
Avbryt
Spara