up
This commit is contained in:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user