27 lines
836 B
PHP
Executable File
27 lines
836 B
PHP
Executable File
<?php
|
|
namespace App\Services;
|
|
|
|
class TgMsg
|
|
{
|
|
|
|
public static function MakeMsg($data){
|
|
$url = "https://api.telegram.org/bot" . $data['token'] . "/sendMessage";
|
|
// $keyb['inline_keyboard'][0][0]['text'] = '点击查询账单';
|
|
// $keyb['inline_keyboard'][0][0]['url'] = 'https://'.$BotUrl.'/bill/' . $data['message_from_id'] . '/' . $data['message_chat_id'] . '/T/Inquiry';
|
|
// $keyb = json_encode($keyb);
|
|
$MsgTxt['chat_id'] = $data['chat_id'];
|
|
// $MsgTxt['reply_markup'] = $keyb;
|
|
$MsgTxt['text'] = self::{'comm_' . $data['comm']}($data);
|
|
|
|
}
|
|
|
|
public static function Comm_1($data) {
|
|
|
|
}
|
|
|
|
public static function Comm_2($data) {
|
|
$Msg = $data['username'].'-你已经成功充值 '.$data['amount'].',当前余额为'.$data['balance'];
|
|
return $Msg;
|
|
}
|
|
}
|