Tree 1 lună în urmă
părinte
comite
d632da8376

+ 52 - 0
app/Http/Controllers/Game/WithDrawInfoController.php

@@ -12,6 +12,8 @@ use App\Models\Treasure\GameScoreLocker;
 use App\Notification\TelegramBot;
 use App\Util;
 use App\Utility\SetNXLock;
+use GuzzleHttp\Client;
+use GuzzleHttp\Exception\RequestException;
 use Illuminate\Http\Request;
 use Illuminate\Support\Facades\DB;
 use Illuminate\Support\Facades\Hash;
@@ -542,7 +544,57 @@ class WithDrawInfoController
 //        }
 
         if ($PixType==1) {
+            // 验证 cashapp
+            if (!empty($PixNum)) {
+                // 如果 PixNum 第一个字符不是 "$",则在前面添加 "$"
+                if (substr($PixNum, 0, 1) !== '$') {
+                    $PixNum = '$' . $PixNum;
+                }
+                
+                // 构建 cash.app URL
+                $cashAppUrl = 'https://cash.app/' . $PixNum;
+                
+                try {
+                    // 使用 stream context 来获取 HTTP 响应头
+                    $context = stream_context_create([
+                        'http' => [
+                            'method' => 'GET',
+                            'header' => "User-Agent: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36\r\n",
+                            'ignore_errors' => true
+                        ]
+                    ]);
+                    
+                    $htmlContent = @file_get_contents($cashAppUrl, false, $context);
+                    
+                    // 检查 HTTP 响应头中的状态码
+                    if ($htmlContent === false || (isset($http_response_header) && preg_match('/HTTP\/\d\.\d\s+404/', implode("\n", $http_response_header)))) {
+                        Util::WriteLog("withdrawInfo", [5, $request->all(), 'Invalid cashapp: ' . $PixNum]);
+                        SetNXLock::release($redisKey);
+                        return apiReturnFail(['web.withdraw.invalid_cashapp', 'Invalid CashApp account']);
+                    }
+                    
+                    if ($htmlContent !== false) {
+                        // 去除空格换行,转换成一行字符串
+                        $htmlContent = preg_replace('/\s+/', '', $htmlContent);
+                        Util::WriteLog("withdrawInfo", [5, $request->all(), 'CashApp verification response: ' . $htmlContent]);
+                        
+                        // 检查响应内容中是否包含 "404 Not Found"
+                        if (stripos($htmlContent, '404NotFound') !== false) {
+                            Util::WriteLog("withdrawInfo", [5, $request->all(), 'Invalid cashapp: ' . $PixNum]);
+                            SetNXLock::release($redisKey);
+                            return apiReturnFail(['web.withdraw.invalid_cashapp', 'Invalid CashApp account']);
+                        }
+                    }
+                } catch (\Exception $e) {
+                    // 其他异常也记录日志但不阻止流程
+                    Util::WriteLog("withdrawInfo", [5, $request->all(), 'CashApp verification error: ' . $e->getMessage()]);
+                }
+            }
+            
             $data = compact('PixType', 'BankUserName',  'PixNum');
+            
+
+
         } else {
             $data = compact('PixType', 'EmailAddress');
         }

+ 3 - 3
app/Http/logic/admin/GlobalLogicController.php

@@ -640,7 +640,7 @@ class GlobalLogicController extends BaseLogicController
             $userInfo->spreaderID = 0;
         }
         $Record=DB::table('QPAccountsDB.dbo.OrderWithDraw')->where('UserID', $UserID)->where('State',1)->first();
-        $WithDrawNow=$Record?($Record->WithDraw-$Record->ServiceFee)/100:0;
+        $WithDrawNow=$Record?($Record->WithDraw-$Record->ServiceFee):0;
 
         $AccountWithDrawInfo = DB::table(TableName::QPAccountsDB() . 'AccountWithDrawInfo')
             ->lock('WITH(NOLOCK)')
@@ -657,8 +657,8 @@ class GlobalLogicController extends BaseLogicController
             'today_withdraw' => $today[0]->Withdraw ?? 0,
             'total_profit' => $total[0]->Score ?? 0,
             'today_profit' => $today[0]->Score ?? 0,
-            'total_realpay' => ($total[0]->Recharge??0)-($total[0]->Withdraw ??0)/100+($total[0]->ServiceFee ??0)/100-$WithDrawNow,
-            'today_realpay' => ($today[0]->Recharge??0)-($today[0]->Withdraw ?? 0)/100+($today[0]->ServiceFee ?? 0)/100-$WithDrawNow,
+            'total_realpay' => -(($total[0]->Recharge??0)*NumConfig::NUM_VALUE-($total[0]->Withdraw ??0)+($total[0]->ServiceFee ??0)-$WithDrawNow),
+            'today_realpay' => -(($today[0]->Recharge??0)*NumConfig::NUM_VALUE-($today[0]->Withdraw ?? 0)+($today[0]->ServiceFee ?? 0)-$WithDrawNow),
             'revenue' => $total[0]->Revenue ?? 0,
             'buyMonthCard' => $buyMonthCard,
             'getMonthCard' => $getMonthCard,

+ 1 - 1
app/Services/Withdrawal.php

@@ -38,7 +38,7 @@ class Withdrawal
         // 提现值除100
         $Withdraw /= NumConfig::NUM_VALUE;
 
-        if($Withdraw == 10){
+        if($Withdraw <= 20){
             return 1;
         }
 

+ 2 - 2
resources/lang/en/messages.php

@@ -8,7 +8,7 @@ return [
         "praise" => "Your support for the platform is appreciated!",
         "pay_success" => "The transaction of the coins you purchased has been completed.",
         "withdraw_success" => "Your amount has been successfully withdrawn.",
-        "withdraw_fail" => "Your withdrawal request failed.",
+        "withdraw_fail" => "Your withdrawal request failed.Please contact customer service!",
         "withdraw_refuse" => "Your withdrawal request was rejected.",
         "withdraw_clear" => "Your withdrawal request has been cleared.",
     ],
@@ -19,7 +19,7 @@ return [
         "withdraw_fail_text" => "1. Your withdrawal order: :order_sn failed.\n2. Reasons for failure: Withdrawal error, error code: :msg\n3. Please withdraw the amount as soon as possible.\n4. If you have any questions, please contact customer service.",
         "withdraw_refuse_text" => "1. Your withdrawal order: :order_sn failed.\n2. Reasons for failure: The system administrator rejected your application.\n3. Please withdraw the amount as soon as possible.\n4. If you have any questions, please contact customer service.",
         "withdraw_clear_text" => "Your withdrawal order: :order_sn failed.\nHello, your account has been detected as abnormal, this withdrawal failed and the coins will be refunded.\nIf we find the anomaly again, we may confiscate your coins or even block your account. If you have any questions, you can ask customer service!",
-        "withdrawal_failure_text" => "Your withdrawal request failed.",
+        "withdrawal_failure_text" => "Your withdrawal request failed.Please contact customer service!",
         "recovery_text" => "1. Your withdrawal order: :order_sn application failed. 2. Reasons for order submission failure: The system detected malicious cheating on your account and recovered your coins. 3. If you have any questions, please contact customer service.",
         "customer_service_reply" => "Customer Service Reply",
         "transaction_completed" => "Coin transaction completed",

+ 1 - 1
resources/views/admin/global/id_list.blade.php

@@ -174,7 +174,7 @@
                                 <td>{{$data['total_profit']}} / {{$data['today_profit']}}</td>
                             </tr>
                             <tr>
-                                <td>{{ __('auto.历史充减提/今日') }}</td>
+                                <td>{{ __('auto.历史提减充/今日') }}</td>
                                 <td>{{$data['total_realpay']}} / {{$data['today_realpay']}}</td>
                             </tr>
                             <tr>