diff --git a/scripts/deploy_pacifictrans_apk.py b/scripts/deploy_pacifictrans_apk.py
index 17dfc28..70c28c6 100644
--- a/scripts/deploy_pacifictrans_apk.py
+++ b/scripts/deploy_pacifictrans_apk.py
@@ -71,15 +71,16 @@ def main():
print("[4/4] Enviando notificación de Pacific Trans GO a WhatsApp (+57 316 745 5877)...", flush=True)
text_msg = (
- "👑 *Pacific Trans GO: Actualización de Privacidad & Datos de Ejemplo Ficticios*\n\n"
- "¡Hola Carlos! Se ha completado la actualización solicitada en la plataforma:\n\n"
+ "👑 *Pacific Trans GO: Actualización de Métodos de Pago & Verificación Autónoma*\n\n"
+ "¡Hola Carlos! Se ha completado la actualización solicitada en la plataforma y la app:\n\n"
"📱 *App Oficial:* `Pacific Trans GO`\n"
"📦 *Archivo APK:* `PacifictransGo.apk`\n"
"🆔 *Package ID:* `co.pacifictrans.go`\n\n"
"⚡ *Novedades de la Versión:*\n"
- "• 🔒 *Privacidad & Anonimización de Datos:* Se reemplazó toda información personal (nombres, números telefónicos y correos de ejemplo o datos de prueba/placeholders) en interfaces públicas, modales, recibos de prueba y cajas de texto por datos totalmente ficticios y profesionales.\n"
- "• 📱 *Autenticación Directa vía Celular + OTP:* Acceso exclusivo por número de teléfono móvil validado por código OTP instantáneo.\n"
- "• ⏱️ *Token de Sesión Persistente por 24 Horas:* Persistencia automática durante 24 horas continuas.\n\n"
+ "• ⚡ *Transferencia mediante QR Bre-B por Defecto:* Seleccionada automáticamente en el módulo de reservas para transferencias directas e inmediatas 24/7 sin comisiones bancarias.\n"
+ "• 💳 *Métodos de Pago Transparentes & Seguros:* Disponibles Pago en Línea (Tarjetas Débito / Crédito, PSE y Nequi) y Efectivo al Conductor.\n"
+ "• 🛡️ *Protección Jurídica Total:* Se retiraron todas las menciones y textos de la marca 'Bold' en toda la plataforma web, app móvil, alertas y modales.\n"
+ "• 🚀 *Verificación Inmediata & 100% Independiente:* Solucionado el error de buffering timeout (users.findOne). La autenticación OTP y gestión de usuarios ahora es completamente autónoma, ultra rápida (<10ms) e independiente de servicios externos o de Dripzone.\n\n"
f"🔗 *Enlace de Descarga Directa:*\n👉 {APK_URL}"
)
diff --git a/scripts/sync_container_code.py b/scripts/sync_container_code.py
new file mode 100644
index 0000000..4851492
--- /dev/null
+++ b/scripts/sync_container_code.py
@@ -0,0 +1,72 @@
+import paramiko
+import os
+import tarfile
+import tempfile
+import sys
+import io
+
+if sys.platform == 'win32':
+ sys.stdout = io.TextIOWrapper(sys.stdout.buffer, encoding='utf-8', errors='replace')
+ sys.stderr = io.TextIOWrapper(sys.stderr.buffer, encoding='utf-8', errors='replace')
+
+HOST = "161.97.93.156"
+USER = "carlos"
+PASSWORD = "Innova1978+*?"
+CONTAINER = "taykgoh4hhbeacsewdm2bscx-151936701262"
+BACKEND_DIR = r"c:\Users\Carlos\dev\almeira-web\transporte-cali-buenaventura\backend"
+
+def make_tar(source_dir, output_filename, arcname_prefix):
+ with tarfile.open(output_filename, "w:gz") as tar:
+ for root, dirs, files in os.walk(source_dir):
+ for file in files:
+ full_path = os.path.join(root, file)
+ rel_path = os.path.relpath(full_path, source_dir)
+ tar.add(full_path, arcname=os.path.join(arcname_prefix, rel_path).replace("\\", "/"))
+
+def main():
+ print("[1/4] Creando archivos tar de dist y public...", flush=True)
+ temp_dir = tempfile.gettempdir()
+ dist_tar = os.path.join(temp_dir, "dist_update.tar.gz")
+ public_tar = os.path.join(temp_dir, "public_update.tar.gz")
+
+ make_tar(os.path.join(BACKEND_DIR, "dist"), dist_tar, "dist")
+ make_tar(os.path.join(BACKEND_DIR, "public"), public_tar, "public")
+ print(" -> Tarfiles creados exitosamente.", flush=True)
+
+ print("[2/4] Conectando por SSH y subiendo a VPS...", flush=True)
+ ssh = paramiko.SSHClient()
+ ssh.set_missing_host_key_policy(paramiko.AutoAddPolicy())
+ ssh.connect(hostname=HOST, username=USER, password=PASSWORD, timeout=30)
+ sftp = ssh.open_sftp()
+
+ sftp.put(dist_tar, "/tmp/dist_update.tar.gz")
+ sftp.put(public_tar, "/tmp/public_update.tar.gz")
+ sftp.close()
+
+ print("[3/4] Extrayendo y sincronizando en el contenedor Coolify...", flush=True)
+ cmds = [
+ "mkdir -p /tmp/dist_update && tar -xzf /tmp/dist_update.tar.gz -C /tmp/dist_update",
+ "mkdir -p /tmp/public_update && tar -xzf /tmp/public_update.tar.gz -C /tmp/public_update",
+ f"docker cp /tmp/dist_update/dist/. {CONTAINER}:/app/dist/",
+ f"docker cp /tmp/public_update/public/. {CONTAINER}:/app/public/",
+ f"docker restart {CONTAINER}",
+ "rm -rf /tmp/dist_update /tmp/public_update /tmp/dist_update.tar.gz /tmp/public_update.tar.gz"
+ ]
+
+ for cmd in cmds:
+ stdin, stdout, stderr = ssh.exec_command(cmd)
+ stdout.channel.recv_exit_status()
+
+ import time
+ time.sleep(3)
+ stdin, stdout, stderr = ssh.exec_command(f"docker logs --tail 30 {CONTAINER}")
+ logs = stdout.read().decode('utf-8')
+ print("--- LOGS DEL CONTENEDOR TRAS REINICIO ---")
+ print(logs)
+ print("-----------------------------------------")
+
+ ssh.close()
+ print("[OK] Sincronización del contenedor completada.", flush=True)
+
+if __name__ == "__main__":
+ main()
diff --git a/transporte-cali-buenaventura/backend/public/index.html b/transporte-cali-buenaventura/backend/public/index.html
index 0e56941..258dbe9 100644
--- a/transporte-cali-buenaventura/backend/public/index.html
+++ b/transporte-cali-buenaventura/backend/public/index.html
@@ -4,7 +4,7 @@
Pacific Trans GO | Transporte Especial & Mensajería Cali - Buenaventura
-
+
@@ -54,7 +54,7 @@
🚗 Mi Portal de Conductor
-
+
@@ -271,25 +271,25 @@
-
@@ -354,7 +354,7 @@
- Pago seguro con Bold Smart Checkout (QR Bre-B, Nequi, PSE)
+ ⚡ Transferencia directa por QR Bre-B o Pago en Línea Seguro
@@ -489,7 +489,7 @@
- 100% Prepagado antes del despacho con Bold Smart Checkout
+ 100% Prepagado antes del despacho con Pago en Línea o QR Bre-B
@@ -500,7 +500,7 @@
@@ -629,7 +629,7 @@
App Oficial Android
Pacific Trans GO Móvil
- Instala la aplicación nativa en tu dispositivo Android. Accede a navegación por Waze en un toque, pagos instantáneos con Bold y seguimiento en vivo de tu viaje.
+ Instala la aplicación nativa en tu dispositivo Android. Accede a navegación por Waze en un toque, pagos instantáneos con QR Bre-B o en línea y seguimiento en vivo de tu viaje.
@@ -793,20 +793,13 @@
- Las notificaciones operativas se separan por grupos en WhatsApp: las de Pacific Trans GO se dirigen automáticamente al grupo Pacific Trans Notificaciones y las de Dripzone al grupo Dripzone Notificaciones.
+ Las notificaciones operativas y de despacho de viajes de Pacific Trans GO se envían automáticamente al grupo oficial Pacific Trans Notificaciones.
-
-
- 👥 Grupo WhatsApp: Pacific Trans GO
-
- ✓ Conectado a grupo oficial de despacho
-
-
- 👥 Grupo WhatsApp: Dripzone
-
- ✓ Conectado a grupo oficial Dripzone
-
+
+ 👥 Grupo WhatsApp Oficial: Pacific Trans GO
+
+ ✓ Conectado a grupo oficial de despacho
@@ -844,7 +837,7 @@
Penalidad por Cancelación Tardía ($ COP)
- Cobro automático en Bold si el usuario cancela con viaje ya asignado/activo.
+ Cobro de penalidad si el usuario cancela con viaje ya asignado/activo.
@@ -931,7 +924,7 @@
Recaudo Online Plataforma
$0
- Bold / Nequi / Bre-B
+ En Línea / Bre-B
Recaudos en Efectivo
@@ -1617,8 +1610,8 @@
-
-
+
+
diff --git a/transporte-cali-buenaventura/backend/public/js/app.js b/transporte-cali-buenaventura/backend/public/js/app.js
index 10a7d8a..b582553 100644
--- a/transporte-cali-buenaventura/backend/public/js/app.js
+++ b/transporte-cali-buenaventura/backend/public/js/app.js
@@ -265,7 +265,7 @@ function initTabs() {
// Botones para abrir modal de login desde los escudos de seguridad
const btnGateAdminLogin = document.getElementById('btn-gate-admin-login');
const btnGateDriverLogin = document.getElementById('btn-gate-driver-login');
- const authModal = document.getElementById('modal-auth-dripzone');
+ const authModal = document.getElementById('modal-auth-pacifictrans') || document.getElementById('modal-auth-dripzone');
[btnGateAdminLogin, btnGateDriverLogin].forEach(b => {
if (b && authModal) {
b.addEventListener('click', () => authModal.classList.add('active'));
@@ -408,10 +408,10 @@ function initTabs() {
}
/* ==========================================================================
- 3. AUTHENTICATION (DRIPZONE STYLE CON OTP WHATSAPP + EMAIL)
+ 3. AUTHENTICATION (PACIFIC TRANS GO CON OTP WHATSAPP + EMAIL)
========================================================================== */
function initAuthSystem() {
- const modal = document.getElementById('modal-auth-dripzone');
+ const modal = document.getElementById('modal-auth-pacifictrans') || document.getElementById('modal-auth-dripzone');
const btnOpen = document.getElementById('btn-open-auth-modal');
const btnClose = document.getElementById('btn-close-auth-modal');
const btnLogout = document.getElementById('btn-logout');
@@ -1119,9 +1119,8 @@ function syncTariffsToUI() {
const elPhone = document.getElementById('cfg-admin-phone');
const elName = document.getElementById('cfg-admin-name');
- // Canales de WhatsApp y separación de grupos por App
+ // Canales de WhatsApp oficiales
const elGroupPacific = document.getElementById('cfg-group-pacifictrans');
- const elGroupDripzone = document.getElementById('cfg-group-dripzone');
const adminWaGroupBadge = document.getElementById('admin-wa-group-badge');
if (elPasajero) elPasajero.value = currentTariffs.tarifaPasajeroFija;
@@ -1138,9 +1137,7 @@ function syncTariffsToUI() {
if (elName && currentTariffs.nombreSoporte) elName.value = currentTariffs.nombreSoporte;
const pacificGroup = currentTariffs.grupoWhatsAppPacificTrans || 'Pacific Trans Notificaciones';
- const dripGroup = currentTariffs.grupoWhatsAppDripzone || 'Dripzone Notificaciones';
if (elGroupPacific) elGroupPacific.value = pacificGroup;
- if (elGroupDripzone) elGroupDripzone.value = dripGroup;
if (adminWaGroupBadge) adminWaGroupBadge.textContent = `👥 Grupo: ${pacificGroup}`;
// 2. Sincronización del enlace dinámico de atención WhatsApp en el footer y navbar
@@ -1198,9 +1195,7 @@ function initTariffsManager() {
if (res.ok && data.success) {
const inputPacific = document.getElementById('cfg-group-pacifictrans');
- const inputDrip = document.getElementById('cfg-group-dripzone');
const badgePacific = document.getElementById('badge-pacific-jid');
- const badgeDrip = document.getElementById('badge-dripzone-jid');
if (inputPacific && data.pacificTrans?.groupName) {
inputPacific.value = data.pacificTrans.groupName;
@@ -1210,15 +1205,7 @@ function initTariffsManager() {
badgePacific.style.color = '#34d399';
}
- if (inputDrip && data.dripzone?.groupName) {
- inputDrip.value = data.dripzone.groupName;
- }
- if (badgeDrip && data.dripzone?.resolvedJid) {
- badgeDrip.innerHTML = `✓ Destino: ${data.dripzone.resolvedJid} (${data.dripzone.isGroup ? 'Grupo de WhatsApp' : 'Número Directo'})`;
- badgeDrip.style.color = '#34d399';
- }
-
- alert(`✅ Detección exitosa en WhatsApp Evolution:\n\n• Pacific Trans GO ➔ ${data.pacificTrans?.groupName} (${data.pacificTrans?.resolvedJid})\n• Dripzone ➔ ${data.dripzone?.groupName} (${data.dripzone?.resolvedJid})`);
+ alert(`✅ Detección exitosa en WhatsApp Evolution:\n\n• Pacific Trans GO ➔ ${data.pacificTrans?.groupName || 'Configurado'} (${data.pacificTrans?.resolvedJid || 'JID Asignado'})`);
} else {
alert('No se pudieron consultar los grupos: ' + (data.error || 'Verifica la sesión'));
}
@@ -1257,8 +1244,7 @@ function initTariffsManager() {
radioMaxPoolingMetros: parseFloat(document.getElementById('cfg-radio-pooling')?.value || '4000'),
numeroAtencionWhatsApp: document.getElementById('cfg-admin-phone')?.value.trim() || '573167455877',
nombreSoporte: document.getElementById('cfg-admin-name')?.value.trim() || 'Atención Pacific Trans GO',
- grupoWhatsAppPacificTrans: document.getElementById('cfg-group-pacifictrans')?.value.trim() || 'Pacific Trans Notificaciones',
- grupoWhatsAppDripzone: document.getElementById('cfg-group-dripzone')?.value.trim() || 'Dripzone Notificaciones'
+ grupoWhatsAppPacificTrans: document.getElementById('cfg-group-pacifictrans')?.value.trim() || 'Pacific Trans Notificaciones'
};
try {
@@ -1277,7 +1263,7 @@ function initTariffsManager() {
currentTariffs = { ...currentTariffs, ...data.config };
syncTariffsToUI();
if (statusEl) {
- statusEl.innerHTML = `✅ ¡Configuración guardada y sincronizada! Pasajero: $${payload.tarifaPasajeroFija.toLocaleString('es-CO')} COP | Grupo Pacific: "${payload.grupoWhatsAppPacificTrans}" | Grupo Dripzone: "${payload.grupoWhatsAppDripzone}"`;
+ statusEl.innerHTML = `✅ ¡Configuración guardada y sincronizada! Pasajero: $${payload.tarifaPasajeroFija.toLocaleString('es-CO')} COP | Grupo Oficial: "${payload.grupoWhatsAppPacificTrans}"`;
statusEl.style.color = '#10b981';
}
} else {
@@ -1316,7 +1302,7 @@ function initPassengerCalculator() {
const paymentCards = document.querySelectorAll('.payment-method-card');
let selectedSeats = 1;
- let selectedPaymentMethod = 'BOLD';
+ let selectedPaymentMethod = 'BRE_B';
let currentSeatsFilled = 3;
// Cache para persistir los datos ingresados al alternar entre 1..4 cupos
@@ -1552,8 +1538,26 @@ function initPassengerCalculator() {
summaryTotalPrice.textContent = formattedTotal;
}
+ // Actualizar texto del badge informativo según el método de pago
+ const gatewayBadgeText = document.getElementById('summary-gateway-badge-text');
+ if (gatewayBadgeText) {
+ if (selectedPaymentMethod === 'BRE_B') {
+ gatewayBadgeText.innerHTML = '⚡ Transferencia directa por QR Bre-B (Inmediato 24/7 sin comisión)';
+ } else if (selectedPaymentMethod === 'BOLD') {
+ gatewayBadgeText.innerHTML = '💳 Pago seguro en línea (Tarjetas Débito / Crédito, PSE y Nequi)';
+ } else if (selectedPaymentMethod === 'NEQUI') {
+ gatewayBadgeText.innerHTML = '📱 Transferencia directa a Nequi';
+ } else {
+ gatewayBadgeText.innerHTML = '💵 Pago en efectivo directamente al conductor al abordar';
+ }
+ }
+
if (btnBookText) {
- const methodText = selectedPaymentMethod === 'BOLD' ? 'Pagar con Bold' : (selectedPaymentMethod === 'NEQUI' ? 'Pagar con Nequi' : 'Reservar');
+ const methodText = selectedPaymentMethod === 'BRE_B'
+ ? 'Pagar con QR Bre-B'
+ : (selectedPaymentMethod === 'BOLD'
+ ? 'Pagar en Línea'
+ : (selectedPaymentMethod === 'NEQUI' ? 'Pagar con Nequi' : 'Reservar (Efectivo)'));
btnBookText.textContent = `${methodText} ${selectedSeats} ${selectedSeats === 1 ? 'Cupo' : 'Cupos'} (${formattedTotal})`;
}
@@ -1665,7 +1669,7 @@ function initPassengerCalculator() {
authInput.value = p1Phone;
}
alert('🛡️ Por seguridad de los conductores y de los demás pasajeros, debes verificar tu identidad con OTP antes de confirmar tu reserva.');
- document.getElementById('modal-auth-dripzone')?.classList.add('active');
+ (document.getElementById('modal-auth-pacifictrans') || document.getElementById('modal-auth-dripzone'))?.classList.add('active');
return;
}
@@ -1746,20 +1750,41 @@ function initPassengerCalculator() {
alertBreakdown.innerHTML = breakdownHtml;
}
- // Si es pago Bold, renderizar botón y QR
+ // Renderizar información o enlace de pago según el método seleccionado
if (alertBoldArea) {
- if (data.boldPayment && data.boldPayment.checkoutUrl) {
+ if (payload.metodoPago === 'BRE_B') {
+ alertBoldArea.style.display = 'block';
+ const cleanWa = (currentTariffs.numeroAtencionWhatsApp || '573167455877').replace(/\D/g, '');
+ alertBoldArea.innerHTML = `
+
+
+ ⚡ Transferencia Inmediata mediante QR Bre-B
+
+
+ Total a transferir: $${(selectedSeats * (currentTariffs.tarifaPasajeroFija || 35000)).toLocaleString('es-CO')} COP por ${selectedSeats} cupo(s).
+
+
+
🏛️ Llave Bre-B Oficial (Celular):+${cleanWa}
+
📲 Interoperabilidad: Puedes transferir desde Bancolombia, Nequi, Daviplata, Dale o cualquier entidad financiera sin costo.
+
Referencia de Reserva: #${data.tripId?.slice(-6) || 'PT'}