/
home
/
suroeste
/
public_html
/
payments.transportessuroeste.com
/
public
/
payment
/
/home/suroeste/public_html/payments.transportessuroeste.com/public/payment
mkdir
upload
Name
Size
Mode
Actions
checkout.php
7533
0644
edit
dl
rm
response.php
12701
0644
edit
dl
rm
retry.php
2911
0644
edit
dl
rm
Edit:
/home/suroeste/public_html/payments.transportessuroeste.com/public/payment/checkout.php
(7533B)
<?php /** * ============================================================================ * PÁGINA DE CHECKOUT - ePayco Smart Checkout v2 * ============================================================================ */ require_once __DIR__ . '/../../config/config.php'; use TransportesSuroeste\Services\PaymentService; use TransportesSuroeste\Services\LogService; $nonce = defined('CSP_NONCE') ? CSP_NONCE : base64_encode(random_bytes(16)); $sessionId = $_GET['session'] ?? $_GET['sessionId'] ?? null; $transactionUuid = $_GET['uuid'] ?? $_GET['transaction'] ?? null; if (empty($sessionId) || !preg_match('/^[a-f0-9]{24}$/', $sessionId)) { http_response_code(400); die('Error: Sesión de pago inválida'); } $transaction = null; if ($transactionUuid && preg_match('/^[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12}$/i', $transactionUuid)) { try { $paymentService = new PaymentService(); $transaction = $paymentService->getTransactionStatus($transactionUuid, 'uuid'); if ($transaction && $transaction['status'] !== 'pending') { $basePath = defined('BASE_PATH') ? BASE_PATH : ''; header('Location: ' . $basePath . '/payment/response?x_extra2=' . urlencode($transactionUuid)); exit; } } catch (Exception $e) {} } $testMode = EPAYCO_CONFIG['test_mode'] ? 'true' : 'false'; ?> <!DOCTYPE html> <html lang="es"> <head> <meta charset="UTF-8"> <meta name="viewport" content="width=device-width, initial-scale=1.0"> <title>Procesar Pago - Transportes Suroeste</title> <link rel="preconnect" href="https://fonts.googleapis.com"> <link rel="preconnect" href="https://fonts.gstatic.com" crossorigin> <link href="https://fonts.googleapis.com/css2?family=Inter:wght@400;500;600;700;800&display=swap" rel="stylesheet"> <link rel="stylesheet" href="<?php echo htmlspecialchars(defined('BASE_PATH') ? BASE_PATH : ''); ?>/assets/css/payment-response.css"> </head> <body> <div class="loading-overlay" id="loadingOverlay"> <div class="spinner"></div> <div class="loading-text">Abriendo pasarela de pago...</div> </div> <div class="container checkout-container"> <div class="header info"> <div class="status-icon">💳</div> <h1 class="status-title">Finalizar Pago</h1> <p class="status-description">Completa tu compra de forma segura</p> </div> <div class="content"> <div class="error-message" id="errorMessage"></div> <?php if ($transaction): ?> <div class="payment-info"> <div class="payment-row"> <span class="payment-label">Ticket</span> <span class="payment-value"><?php echo htmlspecialchars($transaction['ticket_reference']); ?></span> </div> <div class="payment-row"> <span class="payment-label">Referencia</span> <span class="payment-value ref-code"><?php echo htmlspecialchars($transaction['internal_reference']); ?></span> </div> <div class="payment-row"> <span class="payment-label">Total a pagar</span> <span class="payment-value payment-total"> $<?php echo number_format($transaction['amount'], 0, ',', '.'); ?> <small style="font-size: 14px; font-weight: 500; color: #6b7280;"><?php echo htmlspecialchars($transaction['currency']); ?></small> </span> </div> </div> <?php endif; ?> <button type="button" class="btn-pay" id="btnPay"> <svg xmlns="http://www.w3.org/2000/svg" width="20" height="20" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <rect x="3" y="11" width="18" height="11" rx="2" ry="2"></rect> <path d="M7 11V7a5 5 0 0 1 10 0v4"></path> </svg> Pagar Ahora </button> <div class="secure-badge"> <svg xmlns="http://www.w3.org/2000/svg" width="18" height="18" viewBox="0 0 24 24" fill="none" stroke="currentColor" stroke-width="2" stroke-linecap="round" stroke-linejoin="round"> <path d="M12 22s8-4 8-10V5l-8-3-8 3v7c0 6 8 10 8 10z"></path> <path d="m9 12 2 2 4-4"></path> </svg> Transacción segura · Cifrado SSL 256-bit </div> <div class="epayco-logo"> <img src="https://multimedia.epayco.co/epayco-landing/btns/epayco-logo-fondo-oscuro.png" alt="Procesado por ePayco"> </div> </div> <div class="footer"> <p class="footer-logo"><strong>Transportes Suroeste</strong> · Pasarela de Pagos</p> </div> </div> <script src="https://checkout.epayco.co/checkout-v2.js"></script> <script nonce="<?php echo htmlspecialchars($nonce); ?>"> (function() { var sessionId = '<?php echo htmlspecialchars($sessionId); ?>'; var testMode = <?php echo $testMode; ?>; var checkout = null; function init() { try { checkout = ePayco.checkout.configure({ sessionId: sessionId, type: "onpage", test: testMode }); document.getElementById('btnPay').addEventListener('click', openCheckout); } catch (error) { showError('Error al inicializar. Por favor, recarga la página.'); } } function openCheckout() { if (!checkout) { showError('Sistema de pago no disponible.'); return; } try { document.getElementById('loadingOverlay').classList.add('active'); document.getElementById('btnPay').disabled = true; checkout.open(); setTimeout(function() { document.getElementById('loadingOverlay').classList.remove('active'); document.getElementById('btnPay').disabled = false; }, 2500); } catch (error) { document.getElementById('loadingOverlay').classList.remove('active'); document.getElementById('btnPay').disabled = false; showError('Error al abrir la pasarela: ' + error.message); } } function showError(message) { var el = document.getElementById('errorMessage'); el.textContent = message; el.classList.add('show'); setTimeout(function() { el.classList.remove('show'); }, 8000); } if (document.readyState === 'loading') { document.addEventListener('DOMContentLoaded', init); } else { init(); } })(); </script> </body> </html>
Save
cmd:
run