QianBaoWithdrawService.php 22 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563564565566567568569570571572573574575576577578579580581582583584585586587588589590591592593594595596597598599600601602603604605606607608609610611612613614615616617618619620621622623624625626627628629630631632633634635636637638639640641642643
  1. <?php
  2. namespace App\Services;
  3. use App\Constants\StepStatus;
  4. use App\Models\Bank;
  5. use App\Models\Config;
  6. use App\Models\PaymentOrder;
  7. use App\Models\Wallet;
  8. use Illuminate\Support\Facades\Cache;
  9. use Telegram\Bot\Api;
  10. class QianBaoWithdrawService
  11. {
  12. /**
  13. * @param Api $telegram
  14. * @param $data
  15. * @param $chatId
  16. * @param $firstName
  17. * @param $messageId
  18. * @throws \Telegram\Bot\Exceptions\TelegramSDKException
  19. */
  20. public static function init(Api $telegram, $data, $chatId, $firstName, $messageId)
  21. {
  22. //点击钱宝提现按钮
  23. if ($data === "withdraw@@qb_show_channel") {
  24. $res = QianBaoWithdrawService::chooseType($chatId, $messageId);
  25. $telegram->editMessageText($res);
  26. }
  27. $pattern = "/^withdraw@@qb_choose_.*$/";
  28. if (preg_match($pattern, $data)) {
  29. $type = preg_replace('/^withdraw@@qb_choose_/', '', $data);
  30. $res = QianBaoWithdrawService::showBanks($chatId, $messageId, $type);
  31. $telegram->editMessageText($res);
  32. }
  33. //选择银行卡号
  34. $pattern = "/^withdrawAddress@@choose_qb_\d+$/";
  35. if (preg_match($pattern, $data)) {
  36. $id = preg_replace('/^withdrawAddress@@choose_qb_/', '', $data);
  37. $res = QianBaoWithdrawService::chooseBank($chatId, $id);
  38. $telegram->deleteMessage([
  39. 'chat_id' => $chatId,
  40. 'message_id' => $messageId,
  41. ]);
  42. $telegram->sendMessage($res);
  43. }
  44. //确认提现信息
  45. if ($data === "withdraw@@qb_confirm") {
  46. $res = QianBaoWithdrawService::confirm($chatId, $messageId);
  47. $telegram->editMessageText($res);
  48. }
  49. if ($data === "withdraw@@qb_apply") {
  50. $res = QianBaoWithdrawService::qbApply($chatId, $messageId);
  51. $telegram->editMessageText($res);
  52. }
  53. //钱宝账单
  54. $pattern = "/^withdraw@@bank_bill_\d+$/";
  55. if (preg_match($pattern, $data)) {
  56. $page = preg_replace('/^withdraw@@bank_bill_/', '', $data);
  57. if (empty($page) || $page < 1) $page = 1;
  58. $page = intval($page);
  59. $res = QianBaoWithdrawService::bill($chatId, $firstName, $messageId, $page);
  60. $telegram->editMessageText($res);
  61. }
  62. //银行卡管理
  63. $pattern = "/^withdraw@@management_.*$/";
  64. if (preg_match($pattern, $data)) {
  65. $channel = preg_replace('/^withdraw@@management_/', '', $data);
  66. $res = QianBaoWithdrawService::banks($chatId, $messageId, $channel);
  67. $telegram->editMessageText($res);
  68. }
  69. //添加银行卡
  70. // $pattern = "/^withdraw@@bank_add.*$/";
  71. // if (preg_match($pattern, $data)) {
  72. // $channel = preg_replace('/^withdraw@@bank_add/', '', $data);
  73. // $res = QianBaoWithdrawService::chooseChannel($chatId, $messageId,$channel);
  74. // $telegram->editMessageText($res);
  75. // }
  76. //银行卡详情
  77. $pattern = "/^withdrawAddress@@bank_detail\d+$/";
  78. if (preg_match($pattern, $data)) {
  79. $id = preg_replace('/^withdrawAddress@@bank_detail/', '', $data);
  80. $res = static::bankDetails($chatId, $messageId, $id);
  81. $telegram->editMessageText($res);
  82. }
  83. $pattern = "/^withdraw@@bank_del_\d+$/";
  84. if (preg_match($pattern, $data)) {
  85. $id = preg_replace('/^withdraw@@bank_del_/', '', $data);
  86. $res = static::bankDelete($chatId, $messageId, $id);
  87. $telegram->editMessageText($res);
  88. }
  89. $pattern = "/^withdrawAddress@@bank_choose_channel_.*$/";
  90. if (preg_match($pattern, $data)) {
  91. $channel = preg_replace('/^withdrawAddress@@bank_choose_channel_/', '', $data);
  92. $res = static::chooseChannel($chatId, $messageId, $channel);
  93. $telegram->editMessageText($res);
  94. }
  95. }
  96. public static function onMessage($chatId, $text, $messageId, $stepStatus)
  97. {
  98. switch ($stepStatus) {
  99. case StepStatus::QB_INPUT_ALIAS:
  100. $res = QianBaoWithdrawService::inputAliAs($chatId, $text, $messageId);
  101. return $res;
  102. break;
  103. case StepStatus::INPUT_WITHDRAW_QB_MONEY://输入提现金额
  104. $res = QianBaoWithdrawService::inputQbAmount($chatId, $text, $messageId);
  105. return $res;
  106. break;
  107. case StepStatus::QB_INPUT_BANK_NAME://输入银行名称
  108. $res = QianBaoWithdrawService::inputBankName($chatId, $text, $messageId);
  109. return $res;
  110. case StepStatus::QB_INPUT_CARD_NO://输入银行卡号/支付宝账号
  111. $res = QianBaoWithdrawService::inputCardNo($chatId, $text, $messageId);
  112. return $res;
  113. break;
  114. case StepStatus::QB_INPUT_ACCOUNT://输入姓名
  115. $res = QianBaoWithdrawService::inputAccount($chatId, $text, $messageId);
  116. return $res;
  117. break;
  118. }
  119. return null;
  120. }
  121. private static function chooseType($chatId, $messageId)
  122. {
  123. $keyboard = [
  124. [
  125. ['text' => "USDT", 'callback_data' => "withdraw@@apply"],
  126. ],
  127. [
  128. ['text' => "银行卡", 'callback_data' => "withdraw@@qb_choose_bank"],
  129. ],
  130. [
  131. ['text' => "支付宝", 'callback_data' => "withdraw@@qb_choose_aliPay"],
  132. ],
  133. [
  134. ['text' => "数字人民币", 'callback_data' => "withdraw@@qb_choose_digital_RMB"],
  135. ],
  136. [
  137. ['text' => "返回", 'callback_data' => "topUp@@home"],
  138. ],
  139. ];
  140. // $keyboard[] = [
  141. // ['text' => "提现账户管理", 'callback_data' => "withdraw@@banks"],
  142. // ];
  143. return [
  144. 'chat_id' => $chatId,
  145. 'text' => "请选择提现方式",
  146. 'message_id' => $messageId,
  147. 'reply_markup' => json_encode(['inline_keyboard' => $keyboard])
  148. ];
  149. }
  150. private static function showBanks($chatId, $messageId, $type)
  151. {
  152. $channel = '';
  153. $card = "";
  154. switch ($type) {
  155. case "bank":
  156. $card = "银行卡";
  157. $text = "请选择提现的银行卡";
  158. $channel = 'DF001';
  159. break;
  160. case "aliPay":
  161. $card = "支付宝";
  162. $text = "请选择提现的支付宝";
  163. $channel = "DF002";
  164. break;
  165. case "digital_RMB":
  166. $card = "数字人民币";
  167. $text = "请选择提现的账户";
  168. $channel = "DF005";
  169. break;
  170. }
  171. $list = Bank::where('channel', $channel)->get();
  172. $keyboard = [];
  173. foreach ($list as $item) {
  174. $keyboard[] = [['text' => $item->alias, 'callback_data' => "withdrawAddress@@choose_qb_{$item->id}"]];
  175. }
  176. $keyboard[] = [
  177. ['text' => "{$card}管理", 'callback_data' => "withdraw@@management_{$channel}"],
  178. ['text' => "返回", 'callback_data' => "withdraw@@qb_show_channel"]];
  179. return [
  180. 'chat_id' => $chatId,
  181. 'text' => $text,
  182. 'message_id' => $messageId,
  183. 'reply_markup' => json_encode(['inline_keyboard' => $keyboard])
  184. ];
  185. }
  186. //钱宝账单
  187. private static function bill($chatId, $firstName, $messageId, $page = 1, $limit = 5)
  188. {
  189. $list = PaymentOrder::where('member_id', $chatId)
  190. ->where('type', 2)
  191. ->orderByDesc('created_at')
  192. ->forPage($page, $limit)
  193. ->get();
  194. $count = PaymentOrder::where('member_id', $chatId)
  195. ->where('type', 2)
  196. ->count();
  197. $text = "👤 {$firstName}({$chatId}) 钱宝提现记录\n\n";
  198. foreach ($list as $item) {
  199. $amount = floatval($item->amount);
  200. $amount = $item->type == 2 ? "➖ {$amount}" : "➕ $amount";
  201. $text .= "-------------------------------------\n";
  202. $text .= "{$amount} \n";
  203. $text .= "订单号:{$item->order_no}\n";
  204. $text .= "银行:{$item->bank_name}\n";
  205. $text .= "姓名:{$item->account}\n";
  206. $text .= "卡号:{$item->card_no}\n";
  207. $status = ['待处理', '处理中', '成功', '失败'];
  208. $text .= "状态:{$status[$item->status]}\n";
  209. if ($item->remark) {
  210. $text .= "说明:{$item->remark}\n";
  211. }
  212. $text .= "日期:{$item->created_at}\n";
  213. }
  214. if ($page > 1) {
  215. $keyboard[] = [
  216. ['text' => "👆上一页", 'callback_data' => "withdraw@@bank_bill_" . ($page - 1)]
  217. ];
  218. }
  219. $allPage = ceil($count / $limit);
  220. if ($allPage > $page) {
  221. if ($page > 1) {
  222. $keyboard[count($keyboard) - 1][] = ['text' => "👇下一页", 'callback_data' => "withdraw@@bank_bill_" . ($page + 1)];
  223. } else {
  224. $keyboard[] = [
  225. ['text' => "👇下一页", 'callback_data' => "withdraw@@bank_bill_" . ($page + 1)]
  226. ];
  227. }
  228. }
  229. $keyboard[] = [
  230. ['text' => "返回", 'callback_data' => "topUp@@home"]
  231. ];
  232. return [
  233. 'chat_id' => $chatId,
  234. 'text' => $text,
  235. 'message_id' => $messageId,
  236. 'reply_markup' => json_encode(['inline_keyboard' => $keyboard])
  237. ];
  238. }
  239. //1.钱宝提现
  240. private static function qbApply($chatId, $messageId)
  241. {
  242. $three_payment_switch = Config::where('field', 'three_payment_switch')->first()->val;
  243. if ($three_payment_switch != 1) {
  244. $res = WalletService::getBalance($chatId);
  245. $res['message_id'] = $messageId;
  246. return $res;
  247. }
  248. $wallet = Wallet::where('member_id', $chatId)->first();
  249. $temp = floatval($wallet->available_balance);
  250. $text = "请发送提现金额\n";
  251. $text .= "💰 当前余额{$temp} RMB\n";
  252. // Cache::put(get_step_key($chatId), StepStatus::INPUT_WITHDRAW_QB_MONEY);
  253. return [
  254. 'chat_id' => $chatId,
  255. 'text' => $text,
  256. 'message_id' => $messageId,
  257. ];
  258. }
  259. //2.选择银行卡号
  260. private static function chooseBank($chatId, $id)
  261. {
  262. Cache::put(get_step_key($chatId), StepStatus::INPUT_WITHDRAW_QB_MONEY);
  263. Cache::put("{$chatId}_QB_BANK_ID", $id);
  264. return [
  265. 'chat_id' => $chatId,
  266. 'text' => "请输入提现的金额",
  267. ];
  268. }
  269. //3.输入钱宝提现金额
  270. private static function inputQbAmount($chatId, $amount, $messageId)
  271. {
  272. if (!preg_match('/^\d+(\.\d{1,2})?$/', $amount)) {
  273. return [
  274. 'chat_id' => $chatId,
  275. 'text' => "金额输入不正确,请发送提现数字",
  276. 'reply_to_message_id' => $messageId
  277. ];
  278. }
  279. $amount = floatval($amount);
  280. $wallet = Wallet::where('member_id', $chatId)->first();
  281. $temp = floatval($wallet->available_balance);
  282. if ($amount > $temp) {
  283. return [
  284. 'chat_id' => $chatId,
  285. 'text' => "⚠️可用余额不足,请重试",
  286. 'reply_to_message_id' => $messageId
  287. ];
  288. }
  289. if ($amount < 100) {
  290. return [
  291. 'chat_id' => $chatId,
  292. 'text' => "⚠️提现不能少于100 RMB,请重试",
  293. 'reply_to_message_id' => $messageId
  294. ];
  295. }
  296. if ($amount > 49999) {
  297. return [
  298. 'chat_id' => $chatId,
  299. 'text' => "⚠️最多提现 49999 RMB,请重试",
  300. 'reply_to_message_id' => $messageId
  301. ];
  302. }
  303. $bankId = Cache::get("{$chatId}_QB_BANK_ID");
  304. $bank = Bank::where('id', $bankId)->first();
  305. $text = "";
  306. switch ($bank->channel) {
  307. case "DF001":
  308. $text = "银行卡提现确认\n";
  309. $text .= "开户行:{$bank->bank_name}\n";
  310. $text .= "姓名:{$bank->account}\n";
  311. $text .= "提现账号:{$bank->card_no}\n";
  312. $text .= "提现金额:{$amount}\n";
  313. break;
  314. case "DF002":
  315. $text = "支付宝提现确认\n";
  316. $text .= "姓名:{$bank->account}\n";
  317. $text .= "提现账号:{$bank->card_no}\n";
  318. $text .= "提现金额:{$amount}\n";
  319. break;
  320. case "DF005":
  321. $text = "数字人民币提现确认\n";
  322. $text .= "姓名:{$bank->account}\n";
  323. $text .= "提现账号:{$bank->card_no}\n";
  324. $text .= "提现金额:{$amount}\n";
  325. break;
  326. }
  327. $keyboard = [
  328. [
  329. ['text' => "确认", 'callback_data' => 'withdraw@@qb_confirm']
  330. ],
  331. [
  332. ['text' => '❌取消', 'callback_data' => "message@@close"]
  333. ]];
  334. Cache::put("{$chatId}_WITHDRAW_QB_MONEY", $amount);
  335. return [
  336. 'chat_id' => $chatId,
  337. 'text' => $text,
  338. // 'reply_to_message_id' => $messageId,
  339. 'reply_markup' => json_encode(['inline_keyboard' => $keyboard])
  340. ];
  341. }
  342. private static function confirm($chatId, $messageId)
  343. {
  344. $id = Cache::get("{$chatId}_QB_BANK_ID");
  345. $bank = Bank::where('id', $id)->first();
  346. $amount = Cache::get("{$chatId}_WITHDRAW_QB_MONEY");
  347. $res = PaymentOrderService::createPayout($chatId, $amount, $bank->channel, $bank->bank_name, $bank->account, $bank->card_no);
  348. $res['message_id'] = $messageId;
  349. return $res;
  350. }
  351. //银行卡管理
  352. private static function banks($chatId, $messageId, $channel)
  353. {
  354. switch ($channel) {
  355. case "DF001":
  356. $text = "银行卡列表\n";
  357. break;
  358. case "DF002":
  359. $text = "支付宝账户列表\n";
  360. break;
  361. case "DF005":
  362. $text = "数字人民币账户列表\n";
  363. break;
  364. }
  365. $list = Bank::where('member_id', $chatId)
  366. ->where("channel", $channel)
  367. ->get();
  368. $keyboard = [];
  369. foreach ($list as $item) {
  370. $keyboard[] = [['text' => $item->alias, 'callback_data' => "withdrawAddress@@bank_detail{$item->id}"]];
  371. }
  372. if (count($list) < 5) {
  373. $keyboard[] = [['text' => "➕ 添加", 'callback_data' => "withdrawAddress@@bank_choose_channel_{$channel}"], ['text' => "↩️返回", 'callback_data' => "topUp@@home"]];
  374. } else {
  375. $keyboard[] = [['text' => "↩️返回", 'callback_data' => "topUp@@home"]];
  376. }
  377. return [
  378. 'chat_id' => $chatId,
  379. 'text' => $text,
  380. 'message_id' => $messageId,
  381. 'reply_markup' => json_encode(['inline_keyboard' => $keyboard])
  382. ];
  383. }
  384. //银行卡详情
  385. private static function bankDetails($chatId, $messageId, $id)
  386. {
  387. $bank = Bank::where('id', $id)
  388. ->where('member_id', $chatId)->first();
  389. switch ($bank->channel) {
  390. case "DF001":
  391. $text = "*银行卡管理*\n\n";
  392. $text .= "姓名:{$bank->account}\n";
  393. $text .= "银行:{$bank->bank_name}\n";
  394. $text .= "卡号:{$bank->card_no}\n";
  395. break;
  396. case "DF002":
  397. $text = "*支付宝管理*\n\n";
  398. $text .= "姓名:{$bank->account}\n";
  399. $text .= "银行:{$bank->bank_name}\n";
  400. $text .= "账号:{$bank->card_no}\n";
  401. break;
  402. default:
  403. $text = "*银行卡管理*\n\n";
  404. $text .= "姓名:{$bank->account}\n";
  405. $text .= "银行:{$bank->bank_name}\n";
  406. $text .= "卡号:{$bank->card_no}\n";
  407. break;
  408. }
  409. $keyboard = [
  410. [['text' => '❌删除', 'callback_data' => "withdraw@@bank_del_{$id}"], ['text' => '↩️返回列表', 'callback_data' => "withdraw@@management_{$bank->channel}"]],
  411. ];
  412. return [
  413. 'chat_id' => $chatId,
  414. 'parse_mode' => 'MarkdownV2',
  415. 'text' => $text,
  416. 'reply_markup' => json_encode(['inline_keyboard' => $keyboard]),
  417. 'message_id' => $messageId
  418. ];
  419. }
  420. //删除银行卡
  421. private static function bankDelete($chatId, $messageId, $id)
  422. {
  423. Bank::where('id', $id)
  424. ->where('member_id', $chatId)->delete();
  425. return static::banks($chatId, $messageId);
  426. }
  427. //添加银行卡
  428. private static function addBank($chatId, $messageId)
  429. {
  430. $text = "请选择 提现通道\n";
  431. $keyboard = [
  432. [
  433. ['text' => '银行卡', 'callback_data' => "withdrawAddress@@bank_choose_channel_DF001"],
  434. ['text' => '支付宝', 'callback_data' => "withdrawAddress@@bank_choose_channel_DF002"]
  435. ],
  436. [
  437. ['text' => '❌取消', 'callback_data' => "message@@close"]
  438. ]
  439. ];
  440. return [
  441. 'chat_id' => $chatId,
  442. 'text' => $text,
  443. 'message_id' => $messageId,
  444. 'reply_markup' => json_encode(['inline_keyboard' => $keyboard])
  445. ];
  446. }
  447. //选择通道
  448. private static function chooseChannel($chatId, $messageId, $channel)
  449. {
  450. Cache::put("{$chatId}_QB_WITHDRAW_CHANNEL", $channel);
  451. switch ($channel) {
  452. case "DF001"://银行卡
  453. Cache::put(get_step_key($chatId), StepStatus::QB_INPUT_BANK_NAME);
  454. return [
  455. 'chat_id' => $chatId,
  456. 'text' => "请输入开户银行卡开户名称",
  457. 'message_id' => $messageId,
  458. ];
  459. break;
  460. case "DF002"://支付宝
  461. Cache::put("{$chatId}_QB_WITHDRAW_BANK_NAME", '支付宝');
  462. Cache::put(get_step_key($chatId), StepStatus::QB_INPUT_CARD_NO);
  463. return [
  464. 'chat_id' => $chatId,
  465. 'text' => "请输入支付宝账号",
  466. 'message_id' => $messageId,
  467. ];
  468. break;
  469. case "DF005"://数字人民币
  470. Cache::put("{$chatId}_QB_WITHDRAW_BANK_NAME", '数字人民币');
  471. Cache::put(get_step_key($chatId), StepStatus::QB_INPUT_CARD_NO);
  472. return [
  473. 'chat_id' => $chatId,
  474. 'text' => "请输入数字人民币账号",
  475. 'message_id' => $messageId,
  476. ];
  477. break;
  478. default:
  479. return [
  480. 'chat_id' => $chatId,
  481. 'text' => "选择通道错误",
  482. 'message_id' => $messageId,
  483. ];
  484. break;
  485. }
  486. }
  487. //输入银行名称
  488. private static function inputBankName($chatId, $bankName, $messageId)
  489. {
  490. Cache::put("{$chatId}_QB_WITHDRAW_BANK_NAME", $bankName);
  491. Cache::put(get_step_key($chatId), StepStatus::QB_INPUT_CARD_NO);
  492. return [
  493. 'chat_id' => $chatId,
  494. 'text' => "请输入银行卡号",
  495. 'message_id' => $messageId,
  496. ];
  497. }
  498. //输入卡号
  499. private static function inputCardNo($chatId, $cardNo, $messageId)
  500. {
  501. $channel = Cache::get("{$chatId}_QB_WITHDRAW_CHANNEL");
  502. if ($channel === 'DF001' && !preg_match('/^\d+$/', $cardNo)) {
  503. return [
  504. 'chat_id' => $chatId,
  505. 'text' => "输入的银行卡号有误,请重新输入",
  506. 'reply_to_message_id' => $messageId,
  507. ];
  508. }
  509. Cache::put("{$chatId}_QB_WITHDRAW_CARD_NO", $cardNo);
  510. Cache::put(get_step_key($chatId), StepStatus::QB_INPUT_ACCOUNT);
  511. return [
  512. 'chat_id' => $chatId,
  513. 'text' => "请输入姓名",
  514. 'message_id' => $messageId,
  515. ];
  516. }
  517. //输入姓名,并保存到数据库
  518. private static function inputAccount($chatId, $account, $messageId)
  519. {
  520. Cache::put("{$chatId}_QB_ACCOUNT", $account);
  521. Cache::put(get_step_key($chatId), StepStatus::QB_INPUT_ALIAS);
  522. $channel = Cache::get("{$chatId}_QB_WITHDRAW_CHANNEL");
  523. $text = "请输入别名";
  524. switch ($channel) {
  525. case "DF001":
  526. $text = "请输入账号别名";
  527. break;
  528. case "DF002":
  529. $text = "请输入别名";
  530. break;
  531. case "DF005":
  532. $text = "请输入账号别名";
  533. break;
  534. }
  535. return [
  536. 'chat_id' => $chatId,
  537. 'text' => $text,
  538. 'message_id' => $messageId,
  539. ];
  540. }
  541. private static function inputAliAs($chatId, $alias, $messageId)
  542. {
  543. $channel = Cache::get("{$chatId}_QB_WITHDRAW_CHANNEL");
  544. $cardNo = Cache::get("{$chatId}_QB_WITHDRAW_CARD_NO");
  545. $bankName = Cache::get("{$chatId}_QB_WITHDRAW_BANK_NAME");
  546. $account = Cache::get("{$chatId}_QB_ACCOUNT");
  547. Bank::create([
  548. 'member_id' => $chatId,
  549. 'account' => $account,
  550. 'channel' => $channel,
  551. 'card_no' => $cardNo,
  552. 'bank_name' => $bankName,
  553. 'alias' => $alias
  554. ]);
  555. Cache::delete(get_step_key($chatId));
  556. return static::banks($chatId, $messageId, $channel);
  557. }
  558. }