Ver Fonte

feat: 支付回调BUG

xiansin há 2 anos atrás
pai
commit
22ed9a3779

+ 1 - 1
server/app/Http/Controllers/V1/PayNoticeController.php

xqd
@@ -43,7 +43,7 @@ class PayNoticeController extends Controller
 
                 if(isset($goods)){
                     /* @var Pay $payInfo*/
-                    $payInfo = Pay::with(['user'])->where('id', $payId)->first($payId);
+                    $payInfo = Pay::with(['user'])->where('pay_id', $payId)->first();
                     $factory->pushOrder($payInfo->user->open_id, $payId, $goods ,'已支付');
                 }
                 \DB::commit();

+ 1 - 1
server/app/Http/Controllers/V1/SettingController.php

xqd
@@ -59,7 +59,7 @@ class SettingController extends Controller
 
     public function rechargeCombo()
     {
-        $lists = RechargeCombo::all();
+        $lists = RechargeCombo::where('status', 1)->get();
 
         return $this->success($lists);
     }

+ 0 - 9
server/app/Http/Controllers/V1/User/RechargeController.php

xqd
@@ -74,15 +74,6 @@ class RechargeController extends Controller
                 $recharge->status = 0;
                 $recharge->save();
 
-                $factory = $this->getUniFactory();
-                $goods = [
-                    'id' => $combo->id,
-                    'title' => $combo->name,
-                    'price' => $combo->price
-                ];
-                /* @var Pay $payInfo*/
-                $payInfo = Pay::with(['user'])->where('id', $res['pay_id'])->first($res['pay_id']);
-                $factory->pushOrder($payInfo->user->open_id, $res['pay_id'], $goods ,'已支付');
             }
 
             \DB::commit();

+ 0 - 11
server/app/Http/Controllers/V1/User/VipController.php

xqd
@@ -63,17 +63,6 @@ class VipController extends Controller
                 $recharge->pay_id = $res['pay_id'];
                 $recharge->status = 0;
                 $recharge->save();
-
-                // 同步订单
-                $factory = $this->getUniFactory();
-                $goods = [
-                    'id' => $combo->id,
-                    'title' => $combo->name,
-                    'price' => $combo->price
-                ];
-                /* @var Pay $payInfo*/
-                $payInfo = Pay::with(['user'])->where('id', $res['pay_id'])->first($res['pay_id']);
-                $factory->pushOrder($payInfo->user->open_id, $res['pay_id'], $goods ,'已支付');
             }
             \DB::commit();
             return $this->success($res);