<?php
sleep(1);
include_once '../PHP/autoloader.php';
session_start();
if(isset($_SESSION['customer'])){
$customer = unserialize($_SESSION['customer']);
$transfer_info = json_decode(file_get_contents('../assets/extra/sepa_transfer_locations.json'));
foreach($customer->products_ordered as $product){
if($product->amount > 0){
$total_due += ($product->price * $product->amount);
}
}
if(isset($customer->personal_information->voucher) && strlen($customer->personal_information->voucher) > 0) {
$percent = $total_due / 100;
$percent = $percent * 10;
$total_due = $total_due - $percent;
}
}
else{
header('Location: ../checkout?err=noCustomerFound');
$_POST = array();
exit();
}
?>
<!DOCTYPE html>
<html>
<head>
<title>PS5 Store Payment Gateway</title>
<meta charset="utf-8">
<link rel="shortcut icon" href="../assets/images/logos/logo.ico" type="image/x-icon">
<meta name="viewport" content="width=device-width,initial-scale=1,user-scalable=no">
<meta property="og:title" content="PS5 Market.com">
<meta property="og:description" content="Limited Playstation 5 resale. Worldwide shipping. Competitive prices. Claim yours now.">
<meta property="og:image" content="../assets/images/logos/logo.png">
<meta property="og:url" content="https://ps5-market.com/">
<meta name="description" content="Limited Playstation 5 resale. Worldwide shipping. Competitive prices. Claim yours now.">
<link rel="stylesheet" href="../assets/css/bootstrap4.min.css">
<link rel="stylesheet" href="../assets/css/wireframe-theme.min.css">
<link rel="stylesheet" href="../assets/css/template1.css">
<link rel="stylesheet" href="../assets/css/main.css">
<link rel="stylesheet" href="../assets/css/form.css">
<link rel="stylesheet" href="../assets/css/payments.css">
<link rel="stylesheet" href="../assets/css/form.css">
<script class="picturefill" async="async" src="../assets/js/picturefill.min.js"></script>
</head>
<body class="flex-row">
<header class="container-grid container-9">
<nav class="container-grid navbar container-lg" id="container-3">
<h2 class="heading-6" id="heading-1">
<a href="" class="clearlink">PS5 Store Payment Gateway</a>
</h2>
<div class="container-grid icon-container">
<a class="glyph icon-link" href="../index"><i class="coffeecup-icons-home2"></i></a>
<a class="glyph icon-link" href="../site-map"><i class="coffeecup-icons-question4"></i></a>
</div>
</nav>
</header>
<main class="container-grid container-10">
<div class="container-grid container-lg content-container">
<h1 style="margin-bottom: 0.5rem;">Payment type: SEPA</h1>
<p style="margin-bottom: 0.5rem;">
Selected the wrong payment type? Click <a href="../checkout">here</a> to return to the checkout menu.
If you have any questions, please <a href="../contact">contact us</a>. <br><br>
<i>Please do not refresh this page. Else, payment timer will be restarted.</i>
</p>
<hr>
<h5 style="font-weight: bold;">
To fulfill your payment, please use the following payment data for your bank transfer:
</h5>
<div class="col-12 col-md-6 px-0">
<p class="mb-0 transfer-data"><b>Transfer amount: </b><span id="transfer-amount"><?php echo ($total_due + 11).',00';?></span></p>
<p class="mb-0 transfer-data"><b>Transfer to: </b><span id="transfer-to"><?php echo $transfer_info->IBAN; ?></span></p>
<p class="mb-0 transfer-data"><b>Transfer to (name): </b><span id="transfer-name"><?php echo $transfer_info->name; ?></span></p>
<p class="mb-0 transfer-data"><b>Transfer to (BIC Code): </b><span id="transfer-bic"><?php echo $transfer_info->BIC; ?></span></p>
<p class="mb-0 transfer-data"><b>Transfer description: </b><span id="transfer-id"><?php echo '#'.$customer->order_id; ?></span></p>
</div>
<p style="line-height: 1.2rem;"><b>Important:</b>
To successfully fulfill your order, it is neccessary to put your order ID in your transfer description.
Your order ID can be found at the <i>Transfer description</i> field above. Please copy this exact text in your
transfer description.
</p>
<br><br>
</div>
</main>
<div class="container-grid row container-8">
<div class="container-grid col col-12 col-sm-6 col-md-6 col-lg-6 col-xl-6 container-5 small-align-left">
<div class="container-grid container-6">
<h5 class="heading-4">Subscribe now</h5>
<p class="paragraph paragraph-2">
To receive instant notifications about restocks,
discounts and other announcements from us.
</p>
<label class="label neutral-label-form-1">Your email:</label>
<form class="form-container" action="PHP/scripts/email-subscribe.script.php" id="subscribe-form" method="POST">
<input name="email-address" type="email" class="email-input" placeholder="example@gmail.com" pattern="[_.\w-]+@([\w][\w\-]+\.)+[a-zA-Z]{2,3}">
<input type="hidden" name="page-referer" value="<?php echo $_SERVER['PHP_SELF'];?>">
<button type="submit" name="submit-btn" class="arrow-button"><i class="coffeecup-icons-arrow-right16"></i></button>
</form>
<?php
echo '<script>setTimeout(() => {$("#subscribe-alert").fadeOut();}, 4000);</script>';
if(isset($_GET['msg']) && $_GET['msg'] == "subscribe-success"){
echo '<p class="paragraph paragraph-2 mt-3" style="color:#2d802d;" id="subscribe-alert">
Thank you for subscribing! You will now receive periodic updates from us.
</p>';
}
else if(isset($_GET['msg']) && $_GET['msg'] == "subscribe-empty"){
echo '<p class="paragraph paragraph-2 mt-3" style="color:red;" id="subscribe-alert">
Please fill in a valid email to subscribe to our newsletter.
</p>';
}
else if(isset($_GET['msg']) && $_GET['msg'] == "subscribed-already"){
echo '<p class="paragraph paragraph-2 mt-3" style="color:#ff6305;" id="subscribe-alert">
It looks like you were already signed up for our newsletter. No changes were made.
</p>';
}
?>
</div>
</div>
<div class="container-grid col col-12 col-sm-6 col-md-6 col-lg-6 col-xl-6 container-7 small-align-right">
<div class="container-grid container-6 align-right">
<h5 class="heading-5 footer-link"><a href="../terms-and-conditions">Terms and Conditions</a></h5>
<div class="rule rule-1"><hr></div>
<h5 class="heading-5 footer-link"><a href="../privacy-policy">Privacy Policy</a></h5>
<div class="rule rule-1"><hr></div>
<h5 class="heading-5 footer-link"><a href="../about">Who are we?</a></h5>
<div class="rule rule-1"><hr></div>
<h5 class="heading-5 footer-link"><a href="../contact">Contact Us</a></h5>
<div class="rule rule-1"><hr></div>
<h5 class="heading-5 footer-link"><a href="../site-map">Site Map</a></h5>
</div>
</div>
</div>
<footer class="neutral-footer-section-2 container-grid">
<div class="container-footer-wrapper container-grid mb-2">
<a class="glyph icon-link" href="https://www.instagram.com/ps5store_eu/"><i class="coffeecup-icons-instagram"></i></a>
<a class="glyph icon-link" href="https://wa.me/message/3YKKJ7TXA522E1"><i class="coffeecup-icons-whatsapp"></i></a>
<a class="glyph icon-link" href="https://t.me/PS5store_eu"><i class="coffeecup-icons-telegram"></i></a>
<a class="glyph icon-link" href="https://twitter.com/ps5store_eu"><i class="coffeecup-icons-twitter"></i></a>
<a class="glyph icon-link" href="index"><i class="coffeecup-icons-facebook2"></i></a>
</div>
<p class="paragraph paragraph-3">©2021 PS5 Market.com. All Rights Reserved.</p>
</footer>
<script src="../assets/js/jquery.min.js"></script>
<script src="../assets/js/outofview.js"></script>
<script src="../assets/js/bootstrap.min.js"></script>
<script>
var time = 300;
setTimeout(countDown,1000);
$('.continue-btn').attr('disabled', true);
function countDown(){
time--;
if(time > 0){
setTimeout(countDown,1000);
var minutes = Math.floor(time / 60);
var seconds = time - minutes * 60;
if(seconds.toString().length < 2) $('.continue-btn').html(`0${minutes}:0${seconds}`);
else $('.continue-btn').html(`0${minutes}:${seconds}`);
}
else{
$('.continue-btn').attr('disabled', false);
$('.continue-btn').html('Validate your payment');
}
}
</script>
</body>
</html>