Ken 4 luni în urmă
părinte
comite
60e3bb4367

+ 4 - 4
app/Http/Controllers/api/TelegramWebHook.php

@@ -769,7 +769,6 @@ class TelegramWebHook extends Controller
                 }
 
 
-                
                 //选择提现地址
                 $pattern = "/^withdrawAddress@@choose\d+$/";
                 if (preg_match($pattern, $data)) {
@@ -901,9 +900,10 @@ class TelegramWebHook extends Controller
                 }
 
                 //钱宝提现
-                if($data === 'withdraw@@qbApply'){
-                    $res =  WithdrawService::qbApply($chatId,$messageId);
-                    $telegram->editMessageText($res);
+                if ($data === 'withdraw@@qbApply') {
+                    $res = WithdrawService::qbApply($chatId, $messageId);
+                    if (isset($res['message_id'])) $telegram->editMessageText($res); else $telegram->sendMessage($res);
+
                 }
 
                 //地址管理

+ 5 - 0
app/Services/WithdrawService.php

@@ -477,6 +477,11 @@ class WithdrawService
     //钱宝提现
     static function qbApply($chatId, $messageId)
     {
+        $three_payment_switch = Config::where('field', 'three_payment_switch')->first()->val;
+        if ($three_payment_switch != 1) {
+            return WalletService::getBalance($chatId);
+        }
+//
         return [
 
             'chat_id' => $chatId,