chenxiqiang пре 6 година
родитељ
комит
b69daf744e
1 измењених фајлова са 3 додато и 1 уклоњено
  1. 3
    1
      manage-server/app/Http/Controllers/PaymentController.php

+ 3
- 1
manage-server/app/Http/Controllers/PaymentController.php Прегледај датотеку

@@ -81,7 +81,9 @@ class PaymentController extends Controller
81 81
         $app = app('wechat.payment');
82 82
         $response = $app->handlePaidNotify(function($message, $fail){
83 83
             // 使用通知里的 "微信支付订单号" 或者 "商户订单号" 去自己的数据库找到订单
84
-            list($order_type, $order_id) = spilt("_", $message['out_trade_no']);
84
+            $arrays = preg_split("/_/", $message['out_trade_no']);
85
+            $order_type = $arrays[0];
86
+            $order_id = $arrays[1];
85 87
             $order = CommonController::getRecord($order_type, $order_id);
86 88
 
87 89
             if (!$order || $order->paid_at) { // 如果订单不存在 或者 订单已经支付过了

Loading…
Откажи
Сачувај