首次提交 Laravel 專案
This commit is contained in:
Executable
+26
@@ -0,0 +1,26 @@
|
||||
<?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;
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user