From 507281e56e68a9250add075e40ca2d35ccba5410 Mon Sep 17 00:00:00 2001 From: Lizandro Date: Sat, 18 Jul 2026 17:14:26 +0000 Subject: [PATCH] fix(pago): detectar IMAP por host configurado, no por toggle correo_imap_enabled MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit El toggle puede no estar guardado como '1' en BD aunque el panel lo muestre activo. Verificar correo_imap_host es más confiable: si hay host → intentar IMAP. Co-Authored-By: Claude Sonnet 4.6 --- app/Services/PagoValidadorService.php | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/app/Services/PagoValidadorService.php b/app/Services/PagoValidadorService.php index d4c7846..a0959a6 100755 --- a/app/Services/PagoValidadorService.php +++ b/app/Services/PagoValidadorService.php @@ -11,8 +11,9 @@ class PagoValidadorService { public function validar(array $datosPago, ?int $usuarioId = null, ?string $nombreUsuario = null, string $canal = 'telegram'): array { - if (! WhatsappSystemConfig::get('correo_imap_enabled', '0')) { - Log::info('[PagoValidador] IMAP deshabilitado (correo_imap_enabled vacío o 0)'); + $host = WhatsappSystemConfig::get('correo_imap_host', ''); + if (! $host) { + Log::info('[PagoValidador] IMAP sin host configurado'); return ['estado' => 'no_encontrado', 'correo' => null, 'motivo' => 'correo_deshabilitado']; }