Ken 2 тижнів тому
батько
коміт
7c00c8accf
4 змінених файлів з 78 додано та 34 видалено
  1. 30 30
      app/Services/WithdrawService.php
  2. 14 0
      lang/en/messages.php
  3. 14 0
      lang/vi/messages.php
  4. 20 4
      lang/zh/messages.php

+ 30 - 30
app/Services/WithdrawService.php

@@ -354,14 +354,14 @@ class WithdrawService
         $bl->save();
 
         $temp = floatval($wallet->available_balance);
-        $text = "✅ 提现申请已提交!\n\n";
-        $text .= "钱包余额:{$temp} RMB\n";
-        $text .= "汇率:1 USDT = {$rate} RMB\n";
-        $text .= "剩余可用USDT余额:" . number_format(bcdiv($temp, $rate, 2), 2) . " USDT\n";
-        $text .= "提现金额:{$amount} USDT\n";
-        $text .= "实际到账:{$real} USDT\n";
-        $text .= "手续费:{$serviceCharge} USDT\n\n";
-        $text .= "⌛️请等待系统处理, 到账时间可能需要几分钟!\n";
+        $text = "✅ " . lang("提现申请已提交!") . "\n\n";
+        $text .= lang("钱包余额") . ":{$temp} RMB\n";
+        $text .= lang("汇率") . ":1 USDT = {$rate} RMB\n";
+        $text .= lang("剩余可用USDT余额") . ":" . number_format(bcdiv($temp, $rate, 2), 2) . " USDT\n";
+        $text .= lang("提现金额") . ":{$amount} USDT\n";
+        $text .= lang("实际到账") . ":{$real} USDT\n";
+        $text .= lang("手续费") . ":{$serviceCharge} USDT\n\n";
+        $text .= lang("⌛️请等待系统处理, 到账时间可能需要几分钟!") . "\n";
         Cache::delete(get_step_key($chatId));
         return [
             'chat_id' => $chatId,
@@ -383,18 +383,18 @@ class WithdrawService
             ->where('member_id', $chatId)->first();
 
 
-        $text = "请确认\n\n";
-        $text .= "手续费:{$serviceCharge} USDT\n";
-        $text .= "提现金额:{$amount} USDT\n";
-        $text .= "实际到账:{$real} USDT\n";
-        $text .= "提现地址:{$address->address}\n";
+        $text = lang("请确认") . "\n\n";
+        $text .= lang('手续费') . ":{$serviceCharge} USDT\n";
+        $text .= lang("提现金额") . ":{$amount} USDT\n";
+        $text .= lang("实际到账") . ":{$real} USDT\n";
+        $text .= lang("提现地址") . ":{$address->address}\n";
 
         $keyboard = [
             [
-                ['text' => '✅ 确认', 'callback_data' => "withdrawAddress@@done"],
+                ['text' => lang('✅ 确认'), 'callback_data' => "withdrawAddress@@done"],
             ],
             [
-                ['text' => '❌取消', 'callback_data' => "message@@close"]
+                ['text' => lang('❌取消'), 'callback_data' => "message@@close"]
             ]
         ];
         Cache::put("{$chatId}_WITHDRAW_ADDRESS", $address->address);
@@ -413,7 +413,7 @@ class WithdrawService
         if (!preg_match('/^-?\d+(\.\d+)?$/', $amount)) {
             return [[
                 'chat_id' => $chatId,
-                'text' => "金额输入不正确,请发送提现数字",
+                'text' => lang("金额输入不正确,请发送提现数字"),
                 'reply_to_message_id' => $messageId
             ]];
         }
@@ -425,14 +425,14 @@ class WithdrawService
         if ($amount <= $this->serviceCharge) {
             return [[
                 'chat_id' => $chatId,
-                'text' => "⚠️提现不能少于{$this->serviceCharge} USDT,请重试",
+                'text' => lang("⚠️提现不能少于") . "{$this->serviceCharge} USDT," . lang('请重试'),
                 'reply_to_message_id' => $messageId
             ]];
         }
         if ($amount > $rate_amount) {
             return [[
                 'chat_id' => $chatId,
-                'text' => "⚠️可用余额不足,请重试",
+                'text' => lang("可用余额不足,请重试"),
                 'reply_to_message_id' => $messageId
             ]];
         }
@@ -440,14 +440,14 @@ class WithdrawService
             ->whereIn('status', [0, 1, 2, 3])
             ->first();
         if ($ru) {
-            $text = "*游戏未结算*\n";
-            $text .= "⚠️ 您还有进行中的游戏,所有游戏结算后方可提现\n";
+            $text = lang('*游戏未结算*')."\n";
+            $text .= lang("⚠️ 您还有进行中的游戏,所有游戏结算后方可提现")."\n";
             return [[
                 'chat_id' => $chatId,
                 'text' => $text,
                 'parse_mode' => 'MarkdownV2',
                 'reply_markup' => json_encode(['inline_keyboard' => [[
-                    ['text' => '进入房间', 'callback_data' => "games@@home{$ru->room_id}"],
+                    ['text' => lang('进入房间'), 'callback_data' => "games@@home{$ru->room_id}"],
                 ]]])
             ]];
         }
@@ -459,12 +459,12 @@ class WithdrawService
             $keyboard[] = [['text' => $item->alias, 'callback_data' => "withdrawAddress@@choose{$item->id}"]];
         }
         $keyboard[] = [
-            ['text' => '🏠 地址管理', 'callback_data' => "withdraw@@address"],
-            ['text' => '❌取消', 'callback_data' => "message@@close"]
+            ['text' => lang("🏠 地址管理"), 'callback_data' => "withdraw@@address"],
+            ['text' => lang('❌取消'), 'callback_data' => "message@@close"]
         ];
 
-        $text = "请直接选择下面的地址\n";
-        $text .= "⚠️提示:请务必确认提现地址正确无误,\n否则资金丢失将无法找回请自负!";
+        $text = lang('请直接选择下面的地址')."\n";
+        $text .= lang("⚠️提示:请务必确认提现地址正确无误,\n否则资金丢失将无法找回请自负!");
         Cache::put("{$chatId}_WITHDRAW_MONEY", $amount);
         Cache::put(get_step_key($chatId), StepStatus::CHOOSE_WITHDRAW_ADDRESS);
         return [[
@@ -484,11 +484,11 @@ class WithdrawService
         $rate = Config::where('field', 'exchange_rate_rmb')->first()->val ?? 1;
         $temp = floatval($wallet->available_balance);
         $amount = bcdiv($temp, $rate, 2);
-        $text = "请发送提现金额\n";
-        $text .= "💰 当前余额{$temp} RMB\n";
-        $text .= "⚠️汇率:1 USDT = {$rate} RMB\n";
-        $text .= "💰 当前可用USDT余额:{$amount}\n";
-        $text .= "⚠️ 提现将收取{$this->serviceCharge}U作为手续费\n";
+        $text = lang("请发送提现金额");
+        $text .= "\n💰 ".lang('当前余额')."{$temp} RMB\n";
+        $text .= "⚠️".lang('汇率').":1 USDT = {$rate} RMB\n";
+        $text .= "💰 ".lang('当前可用USDT余额').":{$amount}\n";
+        $text .= "⚠️ ".lang('提现将收取')."{$this->serviceCharge}".lang('U作为手续费')."\n";
 //        $keyboard = [[
 //            ['text' => "🔙返回", 'callback_data' => "withdraw@@home"],
 //        ]];

+ 14 - 0
lang/en/messages.php

@@ -179,6 +179,20 @@ return [
     "游戏未结算" => "Game not settled",
     "您还有进行中的游戏,所有游戏结算后方可提现" => "You have ongoing games. Withdrawal can only be made after all games are settled",
     '进入房间' => 'Enter Room',
+    "提现申请已提交!" => "Withdrawal request submitted!",
+    "钱包余额" => "Wallet balance",
+    "汇率" => "Exchange rate",
+    "剩余可用USDT余额" => "Remaining available USDT balance",
+    "实际到账" => "Actual amount received",
+    "手续费" => "Transaction fee",
+    "⌛️请等待系统处理, 到账时间可能需要几分钟!" => "⌛️ Please wait for the system to process, it may take a few minutes to receive the funds!",
+    "请确认" => "Please confirm",
+    "提现地址" => "Withdrawal address",
+    "✅ 确认" => "✅ Confirm",
+    "*游戏未结算*" => "*Game not settled*",
+    "⚠️ 您还有进行中的游戏,所有游戏结算后方可提现" => "⚠️ You have ongoing games. Withdrawal is only possible after all games are settled",
+    "请直接选择下面的地址" => "Please select one of the addresses below",
+    "⚠️提示:请务必确认提现地址正确无误,\n否则资金丢失将无法找回请自负!" => "⚠️ Warning: Please make sure the withdrawal address is correct, \notherwise lost funds cannot be recovered, you are responsible!",
 
 
 ];

+ 14 - 0
lang/vi/messages.php

@@ -179,6 +179,20 @@ return [
     "游戏未结算" => "Trò chơi chưa được thanh toán",
     "您还有进行中的游戏,所有游戏结算后方可提现" => "Bạn còn trò chơi đang chơi, chỉ có thể rút tiền sau khi tất cả trò chơi được thanh toán",
     '进入房间' => 'Vào phòng',
+    "提现申请已提交!" => "Yêu cầu rút tiền đã được gửi!",
+    "钱包余额" => "Số dư ví",
+    "汇率" => "Tỷ giá",
+    "剩余可用USDT余额" => "Số dư USDT khả dụng còn lại",
+    "实际到账" => "Số tiền thực tế đã nhận",
+    "手续费" => "Phí giao dịch",
+    "⌛️请等待系统处理, 到账时间可能需要几分钟!" => "⌛️ Vui lòng chờ hệ thống xử lý, thời gian đến tài khoản có thể mất vài phút!",
+    "请确认" => "Vui lòng xác nhận",
+    "提现地址" => "Địa chỉ rút tiền",
+    "✅ 确认" => "✅ Xác nhận",
+    "*游戏未结算*" => "*Trò chơi chưa thanh toán*",
+    "⚠️ 您还有进行中的游戏,所有游戏结算后方可提现" => "⚠️ Bạn còn trò chơi đang chơi, chỉ có thể rút tiền sau khi tất cả trò chơi được thanh toán",
+    "请直接选择下面的地址" => "Vui lòng chọn địa chỉ bên dưới",
+    "⚠️提示:请务必确认提现地址正确无误,\n否则资金丢失将无法找回请自负!" => "⚠️ Lưu ý: Vui lòng chắc chắn rằng địa chỉ rút tiền chính xác, \n nếu không, tiền sẽ bị mất và không thể khôi phục, bạn sẽ tự chịu trách nhiệm!",
 
 
 

+ 20 - 4
lang/zh/messages.php

@@ -175,10 +175,26 @@ return [
     "那么请发送:【提现】100" => "那么请发送:【提现】100",
     "⚠️提现不能少于" => "⚠️提现不能少于",
     "请重试" => "请重试",
-    "⚠️可用余额不足,请重试"=>"⚠️可用余额不足,请重试",
-    "游戏未结算"=>"游戏未结算",
-    "您还有进行中的游戏,所有游戏结算后方可提现"=>"您还有进行中的游戏,所有游戏结算后方可提现",
-    '进入房间'=>'进入房间',
+    "⚠️可用余额不足,请重试" => "⚠️可用余额不足,请重试",
+    "游戏未结算" => "游戏未结算",
+    "您还有进行中的游戏,所有游戏结算后方可提现" => "您还有进行中的游戏,所有游戏结算后方可提现",
+    '进入房间' => '进入房间',
+    "提现申请已提交!" => "提现申请已提交!",
+    "钱包余额" => "钱包余额",
+    "汇率" => "汇率",
+    "剩余可用USDT余额" => "剩余可用USDT余额",
+    "实际到账" => "实际到账",
+    "手续费" => "手续费",
+    "⌛️请等待系统处理, 到账时间可能需要几分钟!" => "⌛️请等待系统处理, 到账时间可能需要几分钟!",
+    "请确认" => "请确认",
+    "提现地址" => "提现地址",
+    "✅ 确认" => "✅ 确认",
+    "*游戏未结算*" => "*游戏未结算*",
+    "⚠️ 您还有进行中的游戏,所有游戏结算后方可提现"=>"⚠️ 您还有进行中的游戏,所有游戏结算后方可提现",
+    "请直接选择下面的地址"=>"请直接选择下面的地址",
+    "⚠️提示:请务必确认提现地址正确无误,\n否则资金丢失将无法找回请自负!"=>"⚠️提示:请务必确认提现地址正确无误,\n否则资金丢失将无法找回请自负!",
+
+