feat(telegram): quitar opción 'Hablar con asesor'
- Eliminar botón del menú principal, pago confirmado, pago no confirmado - callback 'agent' redirige al menú principal en vez de transferToAgent - asesor.solicitar del intent también redirige al menú - Limpiar textos 'contacta a un asesor' en mensajes de error Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Sonnet 4.6
parent
20d15a640c
commit
4a58b800dc
@@ -154,7 +154,7 @@ class TelegramBotService
|
||||
'creds' => $this->showCredentials($chatId),
|
||||
'history' => $this->showHistory($chatId),
|
||||
'profile' => $this->showProfile($chatId),
|
||||
'agent' => $this->transferToAgent($chatId),
|
||||
'agent' => $this->showMainMenu($chatId),
|
||||
'pay_apply' => $this->applyPayment($chatId, (int) ($parts[1] ?? 0), $parts[2] ?? null),
|
||||
default => $this->showMainMenu($chatId),
|
||||
};
|
||||
@@ -171,7 +171,7 @@ class TelegramBotService
|
||||
}
|
||||
|
||||
if (ChatConfig::get('validacion_foto_habilitada', '0') !== '1') {
|
||||
$this->send($chatId, "El análisis de comprobantes no está habilitado. Contacta a un asesor.");
|
||||
$this->send($chatId, "El análisis de comprobantes no está habilitado.");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -232,9 +232,8 @@ class TelegramBotService
|
||||
[['text' => '🔙 Menú principal', 'callback_data' => 'menu']],
|
||||
];
|
||||
} elseif ($resultado['estado'] === 'ya_usado') {
|
||||
$texto .= "\nEstado: *⛔ Comprobante ya utilizado*\nEste pago ya fue registrado.";
|
||||
$texto .= "\nEstado: *⛔ Comprobante ya utilizado*\nEste pago ya fue registrado anteriormente.";
|
||||
$buttons = [
|
||||
[['text' => '🧑 Hablar con asesor', 'callback_data' => 'agent']],
|
||||
[['text' => '🔙 Menú principal', 'callback_data' => 'menu']],
|
||||
];
|
||||
} else {
|
||||
@@ -243,13 +242,12 @@ class TelegramBotService
|
||||
'error_imap' => '📧 Error al leer correos IMAP',
|
||||
'sin_correos' => '📧 Sin correos recientes en bandeja',
|
||||
'sin_coincidencia' => '📧 Ningún correo coincide con este monto/fecha',
|
||||
'error_sistema' => '⚙️ Error interno — un asesor revisará manualmente',
|
||||
default => '📧 No se pudo verificar',
|
||||
'error_sistema' => '⚙️ Error interno, intenta de nuevo en unos minutos',
|
||||
default => '📧 No se pudo verificar automáticamente',
|
||||
};
|
||||
$texto .= "\nEstado: *⚠️ No confirmado*\n_{$motivo}_\n\nUn asesor revisará tu pago.";
|
||||
$texto .= "\nEstado: *⚠️ No confirmado*\n_{$motivo}_";
|
||||
$buttons = [
|
||||
[['text' => '🧑 Hablar con asesor', 'callback_data' => 'agent']],
|
||||
[['text' => '🔙 Menú principal', 'callback_data' => 'menu']],
|
||||
[['text' => '🔙 Menú principal', 'callback_data' => 'menu']],
|
||||
];
|
||||
}
|
||||
|
||||
@@ -620,9 +618,6 @@ class TelegramBotService
|
||||
['text' => '📋 Historial', 'callback_data' => 'history'],
|
||||
['text' => '👤 Mi Perfil', 'callback_data' => 'profile'],
|
||||
],
|
||||
[
|
||||
['text' => '🧑 Hablar con asesor', 'callback_data' => 'agent'],
|
||||
],
|
||||
[
|
||||
['text' => '🚪 Cerrar sesión', 'callback_data' => 'logout_ask'],
|
||||
],
|
||||
@@ -830,7 +825,7 @@ class TelegramBotService
|
||||
$url = $this->createMPPreference($servicio, $valor, $ref);
|
||||
|
||||
if (! $url) {
|
||||
$this->send($chatId, "No se pudo generar el link de pago. Intenta de nuevo o contacta a un asesor.");
|
||||
$this->send($chatId, "No se pudo generar el link de pago. Intenta de nuevo.");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1026,7 +1021,7 @@ class TelegramBotService
|
||||
$url = $this->createMPPreference($promo->nombre ?? 'Promocion streaming', (int) $precio, $ref);
|
||||
|
||||
if (! $url) {
|
||||
$this->send($chatId, "No se pudo generar el link de pago. Intenta de nuevo o contacta a un asesor.");
|
||||
$this->send($chatId, "No se pudo generar el link de pago. Intenta de nuevo.");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1119,7 +1114,7 @@ class TelegramBotService
|
||||
$url = $this->createMPPreference('Recarga de saldo', $monto, $ref);
|
||||
|
||||
if (! $url) {
|
||||
$this->send($chatId, "No se pudo generar el link de recarga. Intenta de nuevo o contacta a un asesor.");
|
||||
$this->send($chatId, "No se pudo generar el link de recarga. Intenta de nuevo.");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1149,7 +1144,7 @@ class TelegramBotService
|
||||
$titular = ChatConfig::get('recarga_banco_titular', '');
|
||||
|
||||
if (! $llave) {
|
||||
$this->send($chatId, "El pago por Bre-B no está disponible. Usa MercadoPago o contacta a un asesor.");
|
||||
$this->send($chatId, "El pago por Bre-B no está disponible en este momento.");
|
||||
return;
|
||||
}
|
||||
|
||||
@@ -1326,7 +1321,7 @@ class TelegramBotService
|
||||
'credenciales.listar' => $this->showCredentials($chatId),
|
||||
'historial.ver' => $this->showHistory($chatId),
|
||||
'perfil.ver' => $this->showProfile($chatId),
|
||||
'asesor.solicitar' => $this->transferToAgent($chatId),
|
||||
'asesor.solicitar' => $this->showMainMenu($chatId),
|
||||
default => $this->showMainMenu($chatId),
|
||||
};
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user