|
|
@@ -255,7 +255,7 @@ class TelegramWebHook extends BaseController
|
|
|
|
|
|
// 今日汇率
|
|
|
if ($data === 'todayExchangeRate@@rate') {
|
|
|
- $res = BetService::todayExchangeRate($chatId);
|
|
|
+ BetService::todayExchangeRate($chatId);
|
|
|
// $telegram->sendMessage($res);
|
|
|
}
|
|
|
|
|
|
@@ -263,7 +263,7 @@ class TelegramWebHook extends BaseController
|
|
|
$pattern = "/^showLotteryHistory@@\d+$/";
|
|
|
if (preg_match($pattern, $data)) {
|
|
|
$id = preg_replace('/^showLotteryHistory@@/', '', $data);
|
|
|
- $res = IssueService::sendLotteryImage($chatId, $id);
|
|
|
+ IssueService::sendLotteryImage($chatId, $id);
|
|
|
}
|
|
|
|
|
|
//选择投注记录
|
|
|
@@ -430,7 +430,7 @@ class TelegramWebHook extends BaseController
|
|
|
}
|
|
|
|
|
|
}
|
|
|
- }catch (\Exception $e){
|
|
|
+ } catch (\Exception $e) {
|
|
|
return response()->json(['status' => 'ok']);
|
|
|
}
|
|
|
return response()->json(['status' => 'ok']);
|
|
|
@@ -452,19 +452,16 @@ class TelegramWebHook extends BaseController
|
|
|
$stepStatus = Cache::get(get_step_key($chatId), -1);
|
|
|
$stepStatus = intval($stepStatus);
|
|
|
// //结算截图
|
|
|
- // if ($stepStatus === StepStatus::INPUT_IMAGE) {
|
|
|
- // $photo = $message['photo'][count($message['photo']) - 1];
|
|
|
- // $res = (new SettlementService())->photo($photo, $chatId);
|
|
|
- // if ($res) $telegram->sendMessage($res);
|
|
|
- // }//
|
|
|
- // //充值截图
|
|
|
- // else
|
|
|
- if ($stepStatus === StepStatus::INPUT_TOP_UP_IMAGE) {
|
|
|
+ if ($stepStatus === StepStatus::INPUT_IMAGE) {
|
|
|
$photo = $message['photo'][count($message['photo']) - 1];
|
|
|
- $res = TopUpService::photo($chatId, $photo);
|
|
|
- return $res;
|
|
|
- // if (isset($res['message_id'])) $telegram->editMessageText($res);
|
|
|
- // else $telegram->sendMessage($res);
|
|
|
+ return (new SettlementService())->photo($photo, $chatId);
|
|
|
+ }//
|
|
|
+ //充值截图
|
|
|
+ else if ($stepStatus === StepStatus::INPUT_TOP_UP_IMAGE) {
|
|
|
+ $photo = $message['photo'][count($message['photo']) - 1];
|
|
|
+ return TopUpService::photo($chatId, $photo);
|
|
|
+ } else {
|
|
|
+ return [];
|
|
|
}
|
|
|
|
|
|
} //用户发送了消息
|
|
|
@@ -498,79 +495,6 @@ class TelegramWebHook extends BaseController
|
|
|
WalletService::getUserWallet($chatId);
|
|
|
self::setReplyKeyboard($chatId, $user->language);
|
|
|
break;
|
|
|
- // case lang("近期注单"):
|
|
|
- // case lang('"✅近期注单"'):
|
|
|
- // Util::delCache($chatId);
|
|
|
- // $returnMsg = BetService::record($chatId);
|
|
|
- // break;
|
|
|
- // case lang("今日流水"):
|
|
|
- // case lang("🔍今日流水"):
|
|
|
- // Util::delCache($chatId);
|
|
|
- // $returnMsg = BalanceLogService::getTodayFlowing($chatId);
|
|
|
- // // $this->telegram->sendMessage($result);
|
|
|
- // break;
|
|
|
- // case lang("流水列表"):
|
|
|
- // case lang("🔍流水列表"):
|
|
|
- // Util::delCache($chatId);
|
|
|
- // $returnMsg = BalanceLogService::getFlowingHistory($chatId);
|
|
|
- // // $this->telegram->sendMessage($result);
|
|
|
- // break;
|
|
|
- // case lang("联系客服"):
|
|
|
- // Util::delCache($chatId);
|
|
|
- // $receivingAddress = Config::where('field', 'receiving_address')->first()->val;
|
|
|
- // $serviceCustomer = Config::where('field', 'service_customer')->first()->val;
|
|
|
- // $text = "官方唯一上分地址:\n";
|
|
|
- // $text .= "USDT: \n";
|
|
|
- // $text .= "{$receivingAddress}\n\n\n";
|
|
|
- // $text .= "‼️特别注意‼️特别注意‼️\n";
|
|
|
- // $text .= "‼️近期骗子肆意妄为,猖狂狡诈。经常冒充我方财务,管理人员以各种手段行使诈骗之术。多数为要求转账/提供验证码等。任何主动私聊您的都是非奸即盗。望各位老板谨记,预防受骗!\n";
|
|
|
- // $text .= "‼️本群管理以及财务绝不会主动私聊客户。请各位老板务必认准群内带标识管理账号,转账前务必核对是否官方账号以及地址。任何一切不是官方行为的受骗上当,本群概不负责,谢谢!\n";
|
|
|
- // $text .= "‼️为了您的资金安全,下分更换地址请提前告知财务,并使用原地址进行转账或录屏进行身份核实,核实为本人操作后才可进行更换地址下分\n";
|
|
|
- // $text .= "‼️如查分金额与实际转账金额不同,请重新喊查。玩家重复查3次以上错误金额则视为恶意捣乱,将不退还转账金额!\n";
|
|
|
- // $text .= "‼️如因为人为失误问题,到账金额与玩家实际转账金额不符,到账后的一切下注视为无效。\n";
|
|
|
- // $text .= "‼️本群不接待以任何形式刷水的水军,一经发现玩家存在刷水行为将扣除历史所有返水、彩金。并冻结分数一个月,每天仅可下分账户余额10%。不纠结,不解释,请各大水军自行绕道。\n";
|
|
|
- // $keyboard = [];
|
|
|
- // $keyboard[] = [['text' => '✅ 唯一客服', 'callback_data' => "", 'url' => "https://t.me/{$serviceCustomer}"]];
|
|
|
- // $returnMsg = [
|
|
|
- // 'chat_id' => $chatId,
|
|
|
- // 'text' => $text,
|
|
|
- // 'reply_markup' => json_encode(['inline_keyboard' => $keyboard])
|
|
|
- // ];
|
|
|
- // break;
|
|
|
- // case lang("开奖历史"):
|
|
|
- // case lang("📝开奖历史"):
|
|
|
- // Util::delCache($chatId);
|
|
|
- // IssueService::currentLotteryResults($chatId);
|
|
|
- // break;
|
|
|
- // case lang("当期下注"):
|
|
|
- // case lang("🔥当期下注"):
|
|
|
- // case lang("🔥本期下注"):
|
|
|
- // Util::delCache($chatId);
|
|
|
- // $returnMsg = BetService::currentBet($chatId);
|
|
|
- // break;
|
|
|
- // case lang("选择语言"):
|
|
|
- // Util::delCache($chatId);
|
|
|
- // $returnMsg = UserService::getLanguages($chatId);
|
|
|
- // break;
|
|
|
- // case lang("查看余额"):
|
|
|
- // case lang("💰查看余额"):
|
|
|
- // Util::delCache($chatId);
|
|
|
- // $returnMsg = WalletService::getBalance($chatId);
|
|
|
- // break;
|
|
|
- // case lang("投注大群"):
|
|
|
- // Util::delCache($chatId);
|
|
|
-
|
|
|
- // $bettingGroup = Config::where('field', 'betting_group')->first()->val;
|
|
|
-
|
|
|
- // $text = "👇👇👇点击下方按钮进群投注👇👇👇 \n";
|
|
|
- // $keyboard = [];
|
|
|
- // $keyboard[] = [['text' => '✅ 投注群', 'callback_data' => "", 'url' => "https://t.me/{$bettingGroup}"]];
|
|
|
- // $returnMsg = [
|
|
|
- // 'chat_id' => $chatId,
|
|
|
- // 'text' => $text,
|
|
|
- // 'reply_markup' => json_encode(['inline_keyboard' => $keyboard])
|
|
|
- // ];
|
|
|
- // break;
|
|
|
default:
|
|
|
// 关键字回复
|
|
|
$keyboardText = KeyboardService::findOne(['button' => $text]);
|
|
|
@@ -593,50 +517,34 @@ class TelegramWebHook extends BaseController
|
|
|
unset($res['text']);
|
|
|
$res['caption'] = $text;
|
|
|
$res['protect_content'] = true; // 防止转发
|
|
|
-
|
|
|
}
|
|
|
-
|
|
|
return $res;
|
|
|
- break;
|
|
|
}
|
|
|
|
|
|
$stepStatus = Cache::get(get_step_key($chatId), -1);
|
|
|
$stepStatus = intval($stepStatus);
|
|
|
$res = QianBaoWithdrawService::onMessage($chatId, $text, $messageId, $stepStatus);
|
|
|
- if (empty($res)) {
|
|
|
- $res = SanJinRechargeService::onMessage($chatId, $text, $messageId, $stepStatus);
|
|
|
- }
|
|
|
- if (empty($res)) {
|
|
|
- $res = SecretService::onMessage($chatId, $text, $messageId, $stepStatus);
|
|
|
- }
|
|
|
+ if (empty($res)) $res = SanJinRechargeService::onMessage($chatId, $text, $messageId, $stepStatus);
|
|
|
+ if (empty($res)) $res = SecretService::onMessage($chatId, $text, $messageId, $stepStatus);
|
|
|
if (!empty($res)) return $res;
|
|
|
switch ($stepStatus) {
|
|
|
case StepStatus::INPUT_TOP_UP_MONEY:
|
|
|
- $res = TopUpService::inputAmount($chatId, $text, $messageId);
|
|
|
- return $res;
|
|
|
- break;
|
|
|
+ return TopUpService::inputAmount($chatId, $text, $messageId);
|
|
|
case StepStatus::INPUT_WITHDRAW_MONEY:
|
|
|
$res = (new WithdrawService())->inputAmount($chatId, $text, $messageId);
|
|
|
return $res[0];
|
|
|
- break;
|
|
|
-
|
|
|
case StepStatus::INPUT_ADDRESS_TRC20:
|
|
|
- $res = WithdrawService::inputAddress($chatId, $text, $messageId);
|
|
|
- return $res;
|
|
|
- break;
|
|
|
+ return WithdrawService::inputAddress($chatId, $text, $messageId);
|
|
|
case StepStatus::INPUT_ADDRESS_ALIAS:
|
|
|
- $res = WithdrawService::inputAlias($chatId, $text, $messageId);
|
|
|
- return $res;
|
|
|
- break;
|
|
|
-
|
|
|
+ return WithdrawService::inputAlias($chatId, $text, $messageId);
|
|
|
}
|
|
|
$returnMsg = BetService::bet($chatId, $text, $messageId);
|
|
|
- // $this->telegram->sendMessage($returnMsg);
|
|
|
}
|
|
|
|
|
|
return $returnMsg;
|
|
|
}
|
|
|
}
|
|
|
+ return [];
|
|
|
}
|
|
|
|
|
|
/**
|