From 538af86407a373bb203c13b17d0c8ec78fcbd6ae Mon Sep 17 00:00:00 2001 From: Lizandro Guarnizo <77708265+lizandrogd@users.noreply.github.com> Date: Fri, 3 Jul 2026 11:11:54 -0500 Subject: [PATCH] =?UTF-8?q?fix(wa):=20enviar=20solo=20el=20token=20como=20?= =?UTF-8?q?par=C3=A1metro=20del=20bot=C3=B3n=20URL,=20no=20la=20URL=20comp?= =?UTF-8?q?leta?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Co-Authored-By: Claude Sonnet 4.6 --- debug_turno_wa.php | 14 ++++++-------- modules/turnero/api/create_turno.php | 4 ++-- 2 files changed, 8 insertions(+), 10 deletions(-) diff --git a/debug_turno_wa.php b/debug_turno_wa.php index 5fab5f5..76feb72 100644 --- a/debug_turno_wa.php +++ b/debug_turno_wa.php @@ -216,14 +216,12 @@ if (isset($_GET['test_cel'])) { $rawComps = [ ['type' => 'body', 'parameters' => [['type' => 'text', 'text' => 'A001']]] ]; - if ($testLink) { - $rawComps[] = [ - 'type' => 'button', - 'sub_type' => 'url', - 'index' => '0', - 'parameters' => [['type' => 'text', 'text' => $testLink]], - ]; - } + $rawComps[] = [ + 'type' => 'button', + 'sub_type' => 'url', + 'index' => '0', + 'parameters' => [['type' => 'text', 'text' => 'TEST123']], + ]; $wa->sendTemplateMessage($testCel, $testTpl, $testLang, [], [], $rawComps); echo "✅ Mensaje enviado a {$testCel}\n"; } catch (\Throwable $e) { diff --git a/modules/turnero/api/create_turno.php b/modules/turnero/api/create_turno.php index fd67ad9..10aa46d 100644 --- a/modules/turnero/api/create_turno.php +++ b/modules/turnero/api/create_turno.php @@ -185,12 +185,12 @@ try { $rawComps = [ ['type' => 'body', 'parameters' => [['type' => 'text', 'text' => $codigo]]] ]; - if ($enlaceConsentimiento) { + if ($conToken) { $rawComps[] = [ 'type' => 'button', 'sub_type' => 'url', 'index' => '0', - 'parameters' => [['type' => 'text', 'text' => $enlaceConsentimiento]], + 'parameters' => [['type' => 'text', 'text' => $conToken]], ]; } $wa->sendTemplateMessage($cel, $waTemplate, $waLang, [], [], $rawComps);