|
|
@@ -22,7 +22,15 @@ class QianBaoWithdrawService
|
|
|
*/
|
|
|
public static function init(Api $telegram, $data, $chatId, $firstName, $messageId)
|
|
|
{
|
|
|
+
|
|
|
+
|
|
|
//点击钱宝提现按钮
|
|
|
+ if ($data === "withdraw@@qb_show_channel") {
|
|
|
+ $res = QianBaoWithdrawService::chooseType($chatId, $messageId);
|
|
|
+ $telegram->editMessageText($res);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
if ($data === "withdraw@@qb_apply") {
|
|
|
$res = QianBaoWithdrawService::qbApply($chatId, $messageId);
|
|
|
$telegram->editMessageText($res);
|
|
|
@@ -114,6 +122,27 @@ class QianBaoWithdrawService
|
|
|
return null;
|
|
|
}
|
|
|
|
|
|
+
|
|
|
+ private static function chooseType($chatId, $messageId)
|
|
|
+ {
|
|
|
+ $keyboard = [];
|
|
|
+ $keyboard[] = [
|
|
|
+ ['text' => "银行卡", 'callback_data' => "withdraw@@qb_choose_bank"],
|
|
|
+ ['text' => "支付宝", 'callback_data' => "withdraw@@qb_choose_aliPay"],
|
|
|
+ ['text' => "数字人民币", 'callback_data' => "withdraw@@qb_choose_digital_RMB"]
|
|
|
+ ];
|
|
|
+ $keyboard[] =[[
|
|
|
+ ['text' => "提现账户管理", 'callback_data' => "withdraw@@banks"],
|
|
|
+ ]];
|
|
|
+
|
|
|
+ return [
|
|
|
+ 'chat_id' => $chatId,
|
|
|
+ 'text' => "请选择提现方式",
|
|
|
+ 'message_id' => $messageId,
|
|
|
+ 'reply_markup' => json_encode(['inline_keyboard' => $keyboard])
|
|
|
+ ];
|
|
|
+ }
|
|
|
+
|
|
|
//钱宝账单
|
|
|
private static function bill($chatId, $firstName, $messageId, $page = 1, $limit = 5)
|
|
|
{
|