This commit is contained in:
Lizandro Guarnizo
2026-06-18 09:35:17 -05:00
parent c58998599b
commit 8d577947a6
7 changed files with 87 additions and 12 deletions
+3 -3
View File
@@ -135,16 +135,16 @@ try {
if (!str_starts_with($cel, '+')) {
$cel = '+57' . ltrim($cel, '0');
}
$nombrePacWA = $pacienteNombre ?: 'Paciente';
require_once __DIR__ . '/../../../services/WhatsAppService.php';
try {
$wa = new WhatsAppService();
// Enviar solo el código, sin nombre/apellido
$wa->sendTemplateMessage(
$cel,
$waTemplate,
$waLang,
[
htmlspecialchars($nombrePacWA, ENT_QUOTES),
'Paciente',
$codigo,
'',
],
@@ -152,7 +152,7 @@ try {
);
} catch (\Throwable $eTmpl) {
try {
$mensajeTexto = "Hola {$nombrePacWA}, su turno *{$codigo}* ha sido registrado en {$codigo}. Preséntese al laboratorio.";
$mensajeTexto = "Su turno *{$codigo}* ha sido registrado. Preséntese al laboratorio.";
$wa->sendTextMessage($cel, $mensajeTexto);
} catch (\Throwable $eTxt) {
// Silenciar