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);