Sistema Contenedor Ibiza v2.0 - Despliegue Docker
This commit is contained in:
17
public/telegram/webhook.php
Normal file
17
public/telegram/webhook.php
Normal file
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
require_once __DIR__ . '/../../vendor/autoload.php';
|
||||
|
||||
use App\Services\TelegramBot;
|
||||
|
||||
// Recibir solicitud webhook
|
||||
$input = file_get_contents('php://input');
|
||||
$data = json_decode($input, true);
|
||||
|
||||
if ($data) {
|
||||
$bot = new TelegramBot();
|
||||
$bot->processWebhook($data);
|
||||
}
|
||||
|
||||
// Retornar 200 OK siempre a Telegram
|
||||
http_response_code(200);
|
||||
echo 'OK';
|
||||
Reference in New Issue
Block a user