|
@@ -53,6 +53,14 @@ class QianBaoWithdrawService
|
|
|
$res = QianBaoWithdrawService::addBank($chatId, $messageId);
|
|
$res = QianBaoWithdrawService::addBank($chatId, $messageId);
|
|
|
$telegram->editMessageText($res);
|
|
$telegram->editMessageText($res);
|
|
|
}
|
|
}
|
|
|
|
|
+ $pattern = "/^withdrawAddress@@bank_choose_channel_.*$/";
|
|
|
|
|
+ if (preg_match($pattern, $data)) {
|
|
|
|
|
+ $channel = preg_replace('/^withdrawAddress@@bank_choose_channel_/', '', $data);
|
|
|
|
|
+ $res = static::chooseChannel($chatId, $messageId, $channel);
|
|
|
|
|
+ $telegram->editMessageText($res);
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
@@ -197,7 +205,6 @@ class QianBaoWithdrawService
|
|
|
['text' => '❌取消', 'callback_data' => "message@@close"]
|
|
['text' => '❌取消', 'callback_data' => "message@@close"]
|
|
|
]
|
|
]
|
|
|
];
|
|
];
|
|
|
-
|
|
|
|
|
return [
|
|
return [
|
|
|
'chat_id' => $chatId,
|
|
'chat_id' => $chatId,
|
|
|
'text' => $text,
|
|
'text' => $text,
|
|
@@ -206,5 +213,46 @@ class QianBaoWithdrawService
|
|
|
];
|
|
];
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ static function chooseChannel($chatId, $messageId, $channel)
|
|
|
|
|
+ {
|
|
|
|
|
+ Cache::put("{$chatId}_QB_WITHDRAW_CHANNEL", $channel);
|
|
|
|
|
+
|
|
|
|
|
+ switch ($channel) {
|
|
|
|
|
+ case "DF002"://支付宝
|
|
|
|
|
+ Cache::put("{$chatId}_QB_WITHDRAW_BANK_NAME", '支付宝');
|
|
|
|
|
+ return [
|
|
|
|
|
+ 'chat_id' => $chatId,
|
|
|
|
|
+ 'text' => "请输入支付宝账号",
|
|
|
|
|
+ 'message_id' => $messageId,
|
|
|
|
|
+ ];
|
|
|
|
|
+ break;
|
|
|
|
|
+ case "DF001"://银行卡
|
|
|
|
|
+ Cache::put(get_step_key($chatId), StepStatus::QB_INPUT_BANK_NAME);
|
|
|
|
|
+ return [
|
|
|
|
|
+ 'chat_id' => $chatId,
|
|
|
|
|
+ 'text' => "请输入银行名称",
|
|
|
|
|
+ 'message_id' => $messageId,
|
|
|
|
|
+ ];
|
|
|
|
|
+ break;
|
|
|
|
|
+ default:
|
|
|
|
|
+ return [
|
|
|
|
|
+
|
|
|
|
|
+ ];
|
|
|
|
|
+ break;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+ static function inputBankName($chatId, $bankName, $messageId)
|
|
|
|
|
+ {
|
|
|
|
|
+ Cache::put("{$chatId}_QB_WITHDRAW_BANK_NAME", $bankName);
|
|
|
|
|
+ return [
|
|
|
|
|
+ 'chat_id' => $chatId,
|
|
|
|
|
+ 'text' => "请输入银行卡号",
|
|
|
|
|
+ 'message_id' => $messageId,
|
|
|
|
|
+ ];
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
|
|
|
}
|
|
}
|