|
@@ -129,6 +129,47 @@ class TelegramWebHook extends Controller
|
|
|
// ]);
|
|
|
}
|
|
|
|
|
|
+ //点击我已付款按钮
|
|
|
+ //手动充值(后台审核后到账)
|
|
|
+ if ($data === 'topUp@@pay2') {
|
|
|
+ $telegram->deleteMessage([
|
|
|
+ 'chat_id' => $chatId,
|
|
|
+ 'message_id' => $messageId
|
|
|
+ ]);
|
|
|
+ $res = TopUpService::pay2($chatId);
|
|
|
+ $telegram->sendMessage($res);
|
|
|
+ } //
|
|
|
+ //自动充值
|
|
|
+ elseif ($data === 'topUp@@pay') {
|
|
|
+ $telegram->deleteMessage([
|
|
|
+ 'chat_id' => $chatId,
|
|
|
+ 'message_id' => $messageId
|
|
|
+ ]);
|
|
|
+ $topService = new TopUpService();
|
|
|
+ $res = $topService->done($chatId);
|
|
|
+ $telegram->sendMessage($res);
|
|
|
+ }
|
|
|
+
|
|
|
+ //充值账单,下一页
|
|
|
+ $pattern = "/^topUpBillNextPage@@\d+$/";
|
|
|
+ if (preg_match($pattern, $data)) {
|
|
|
+ $page = preg_replace('/^topUpBillNextPage@@/', '', $data);
|
|
|
+ $page = intval($page);
|
|
|
+ $res = (new TopUpService())->bill($chatId, $firstName, $messageId, $page);
|
|
|
+ $telegram->editMessageText($res);
|
|
|
+ }
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ //提现账单,下一页
|
|
|
+ $pattern = "/^withdrawBillNextPage@@\d+$/";
|
|
|
+ if (preg_match($pattern, $data)) {
|
|
|
+ $page = preg_replace('/^withdrawBillNextPage@@/', '', $data);
|
|
|
+ $page = intval($page);
|
|
|
+ $res = (new WithdrawService())->bill($chatId, $firstName, $messageId, $page);
|
|
|
+ $telegram->editMessageText($res);
|
|
|
+ }
|
|
|
+
|
|
|
//近期注单,下一页
|
|
|
$pattern = "/^betRecordNextPage@@\d+$/";
|
|
|
if (preg_match($pattern, $data)) {
|