HEX
Server: Apache/2.4.58 (Ubuntu)
System: Linux Bradford-Sitios 6.14.0-1017-azure #17~24.04.1-Ubuntu SMP Mon Dec 1 20:10:50 UTC 2025 x86_64
User: www-data (33)
PHP: 7.4.33
Disabled: pcntl_alarm,pcntl_fork,pcntl_waitpid,pcntl_wait,pcntl_wifexited,pcntl_wifstopped,pcntl_wifsignaled,pcntl_wifcontinued,pcntl_wexitstatus,pcntl_wtermsig,pcntl_wstopsig,pcntl_signal,pcntl_signal_get_handler,pcntl_signal_dispatch,pcntl_get_last_error,pcntl_strerror,pcntl_sigprocmask,pcntl_sigwaitinfo,pcntl_sigtimedwait,pcntl_exec,pcntl_getpriority,pcntl_setpriority,pcntl_async_signals,pcntl_unshare,
Upload Files
File: /var/www/middleware-citas/resources/views/pago-fallido.blade.php
<!DOCTYPE html>
<html lang="es">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Pago Fallido</title>
    <link rel="shortcut icon" href="{{ asset(URL_LOGO_FAVICON) }}">
    <style>
        * { margin: 0; padding: 0; box-sizing: border-box; }

        body {
            min-height: 100vh;
            background: linear-gradient(135deg, #1a0a0a, #2d1117, #3b1a23);
            font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
            display: flex;
            justify-content: center;
            align-items: center;
            padding: 2rem 1rem;
        }

        .card {
            background: #fff;
            border-radius: 16px;
            max-width: 500px;
            width: 100%;
            padding: 2.5rem 2rem;
            box-shadow: 0 20px 60px rgba(0,0,0,0.3);
            animation: slideUp 0.6s ease-out;
        }

        .icon-circle {
            width: 72px;
            height: 72px;
            border-radius: 50%;
            background: #ef4444;
            display: flex;
            align-items: center;
            justify-content: center;
            margin: 0 auto 1.2rem;
            animation: popIn 0.5s ease-out 0.3s both;
        }

        .icon-circle svg {
            width: 32px;
            height: 32px;
            stroke: #fff;
            stroke-width: 3;
            fill: none;
            stroke-linecap: round;
            stroke-dasharray: 30;
            stroke-dashoffset: 30;
            animation: drawX 0.4s ease-out 0.6s forwards;
        }

        h1 {
            text-align: center;
            color: #ef4444;
            font-size: 1.5rem;
            margin-bottom: 0.3rem;
        }

        .subtitle {
            text-align: center;
            color: #6b7280;
            font-size: 0.9rem;
            margin-bottom: 2rem;
        }

        .error-box {
            background: #fef2f2;
            border: 1px solid #fecaca;
            border-radius: 10px;
            padding: 1.2rem 1.5rem;
            margin-bottom: 1.5rem;
        }

        .error-box .error-label {
            font-size: 0.7rem;
            font-weight: 700;
            text-transform: uppercase;
            letter-spacing: 1px;
            color: #b91c1c;
            margin-bottom: 0.5rem;
        }

        .error-box .error-code {
            font-family: 'Courier New', monospace;
            font-size: 0.85rem;
            color: #991b1b;
            background: #fee2e2;
            padding: 0.4rem 0.7rem;
            border-radius: 6px;
            display: inline-block;
            margin-bottom: 0.5rem;
        }

        .error-box .error-message {
            font-size: 0.88rem;
            color: #7f1d1d;
            line-height: 1.5;
        }

        .info-row {
            display: flex;
            justify-content: space-between;
            padding: 0.35rem 0;
            font-size: 0.88rem;
        }

        .info-row .label { color: #6b7280; }
        .info-row .value { color: #1f2937; font-weight: 600; }

        .actions {
            display: flex;
            gap: 0.8rem;
            margin-top: 2rem;
        }

        .btn {
            flex: 1;
            display: inline-block;
            padding: 0.75rem 1.2rem;
            border-radius: 10px;
            font-size: 0.9rem;
            font-weight: 600;
            text-align: center;
            text-decoration: none;
            cursor: pointer;
            border: none;
            transition: transform 0.15s, box-shadow 0.15s;
        }

        .btn:hover {
            transform: translateY(-1px);
            box-shadow: 0 4px 12px rgba(0,0,0,0.15);
        }

        .btn-primary {
            background: #003A8F;
            color: #fff;
        }

        .btn-secondary {
            background: #f3f4f6;
            color: #374151;
        }

        .footer {
            text-align: center;
            margin-top: 1.5rem;
            font-size: 0.8rem;
            color: #9ca3af;
        }

        .waiting-box {
            background: #fffbeb;
            border: 1px solid #fde68a;
            border-radius: 10px;
            padding: 1.2rem 1.5rem;
            text-align: center;
            margin-bottom: 1.5rem;
        }

        .waiting-box p {
            color: #92400e;
            font-size: 0.9rem;
        }

        @keyframes slideUp {
            from { opacity: 0; transform: translateY(30px); }
            to { opacity: 1; transform: translateY(0); }
        }

        @keyframes popIn {
            from { opacity: 0; transform: scale(0.5); }
            to { opacity: 1; transform: scale(1); }
        }

        @keyframes drawX {
            to { stroke-dashoffset: 0; }
        }
    </style>
</head>
<body>
    <div class="card">
        <div class="icon-circle">
            <svg viewBox="0 0 24 24">
                <line x1="6" y1="6" x2="18" y2="18"/>
                <line x1="18" y1="6" x2="6" y2="18"/>
            </svg>
        </div>

        @if($payment && $payment->status === 'FAILED')
            <h1>Pago no procesado</h1>
            <p class="subtitle">No se pudo completar la transaccion. Su cita no ha sido confirmada.</p>

            <div class="error-box">
                <div class="error-label">Detalle del error</div>
                @if($payment->response_code)
                    <div class="error-code">{{ $payment->response_code }}</div>
                @endif
                <div class="error-message">{{ $payment->response_message ?? 'Pago rechazado por la pasarela de pago.' }}</div>
            </div>

            @if($appointment)
            <div class="info-row">
                <span class="label">Codigo cita</span>
                <span class="value">{{ $appointment->code }}</span>
            </div>
            <div class="info-row">
                <span class="label">Nombre</span>
                <span class="value">{{ $appointment->form_data['name'] ?? '-' }}</span>
            </div>
            @endif
            <div class="info-row">
                <span class="label">Monto</span>
                <span class="value">${{ number_format($appointmentValue, 0, ',', '.') }} CLP</span>
            </div>
            <div class="info-row">
                <span class="label">Fecha del intento</span>
                <span class="value">{{ $payment->created_at->format('d/m/Y H:i') }}</span>
            </div>

            <div class="actions">
                <a href="{{ rtrim($odooSiteUrl, '/') . '/postulacion/' . ($appointment->postulacion_id ?? '') . '/postulacion' }}" class="btn btn-primary">Volver a postulacion</a>
            </div>

            <p class="footer">Si el problema persiste, contacte a soporte con el codigo {{ $appointment->code ?? '' }}</p>
        @else
            <h1>Procesando resultado</h1>
            <div class="waiting-box">
                <p>Estamos esperando la respuesta de la pasarela de pago. Esta pagina se actualizara automaticamente.</p>
            </div>
            @if($appointment)
            <div class="info-row">
                <span class="label">Codigo</span>
                <span class="value">{{ $appointment->code }}</span>
            </div>
            @endif
            <script nonce="{{ app('csp_nonce') }}">
                setTimeout(function() { location.reload(); }, 5000);
            </script>
        @endif
    </div>
</body>
</html>