Browse Source

黑名单用户禁止下单

Tree 2 tuần trước cách đây
mục cha
commit
b655839588
1 tập tin đã thay đổi với 6 bổ sung0 xóa
  1. 6 0
      app/Http/Controllers/Game/PaymentEntryController.php

+ 6 - 0
app/Http/Controllers/Game/PaymentEntryController.php

@@ -6,6 +6,7 @@ namespace App\Http\Controllers\Game;
 
 use App\Facade\TableName;
 use App\Http\Controllers\Api\BroQrController;
+use App\Models\Account\UserBlacklist;
 use App\Notification\TelegramBot;
 use App\Services\PayMentService;
 use Illuminate\Http\Request;
@@ -44,6 +45,11 @@ class PaymentEntryController {
 //        ];
 
 
+        $exists = UserBlacklist::where('UserID', $userId)->first();
+        if ($exists){
+            return apiReturnFail(['web.payment.paytype_error','User In Control']);
+        }
+
 
         // 退款订单限制(仅在 pay_method = 2 时生效)
         if ((int)$pay_method === 2) {