Ken 1 semana atrás
pai
commit
de33ede403
1 arquivos alterados com 19 adições e 1 exclusões
  1. 19 1
      app/Services/WithdrawService.php

+ 19 - 1
app/Services/WithdrawService.php

@@ -340,7 +340,7 @@ class WithdrawService
         $wallet = Wallet::where('member_id', $chatId)->first();
         $temp = floatval($wallet->available_balance);
         $text = "✅ " . lang('提现地址已设置') . "\n\n";
-        $text .= lang("请发送提现金额") . "\n";
+        $text .= lang("请发送提现金额") . "(RMB) \n";
         $text .= "💰 " . lang("当前可用余额") . ":{$temp}\n";
         $text .= "⚠️ " . lang('提现将收取') . "{$this->serviceCharge}" . lang("U作为手续费") . "\n";
         $text .= "------------------------------------\n";
@@ -484,6 +484,24 @@ class WithdrawService
                 'reply_to_message_id' => $messageId
             ]];
         }
+
+        if($amount < 100){
+            return [[
+                'chat_id' => $chatId,
+                'text' => lang("提现不能少于100 RMB,请重试"),
+                'reply_to_message_id' => $messageId
+            ]];
+        }
+
+        if ($amount > 49999) {
+            return [
+                'chat_id' => $chatId,
+                'text' => lang("最多提现 49999 RMB,请重试"),
+                'reply_to_message_id' => $messageId
+            ];
+        }
+
+
         $wallet = Wallet::where('member_id', $chatId)->first();
         $temp = floatval($wallet->available_balance);
         // 汇率