<?php
error_reporting(E_ALL);
ini_set('display_errors', 1); 
	require "models/rivermedia.php";
	$rivermedia = new RIVERMEDIA;
	$rivermedia->auth();
	$paymentValid = "N";
	$rivermedia->create_session();
	$paymentValid = $_SESSION['payment_valid'];
	if ($paymentValid !== "Y") {
		header('Location: pay');
	};
	$_SESSION['payment_valid'] = '';
	unset($_SESSION['payment_valid']);
?>
<!DOCTYPE html>
<html lang="en">
<head>
<?php require_once('includes/head.php'); ?>
</head>
<body>
<!-- Navigation -->
<nav class="navbar navbar-inverse navbar-fixed-top" role="navigation">
<?php require_once('includes/nav.php'); ?>
</nav>
<!-- Page Content -->
<div class="container"> 
  <!-- Section -->
  <div class="row">
    <div class="col-lg-12">
      <h1 class="page-header"><i class="fa fa-credit-card" aria-hidden="true"></i> <i class="fa fa-check-circle" aria-hidden="true"></i>  Transaction successful </h1>
      <h4 class="text-center">Click <a href="view_invoice">here</a> to download your invoice.<br />A copy has also been mailed to you.</h4>
      <br />
    </div>
  </div>
  <!-- /.row --> 
  
  <div class="row">
    <div class="col-xs-12 col-sm-12 col-md-12 col-lg-12">
     &nbsp;
    </div>
  </div>
  <div class="row">
    &nbsp;
  </div>
  <br />
  <div class="row">
    <div id="checkout_well" class="well">
        <div class="row">
            <div class="col-md-12" style="text-align:center;">
                <p>
                  <span><img src="public/media/img/mc.png" alt="MasterCard" /></span>
                  <span><img src="public/media/img/visa.png" alt="Visa" /></span>
                  <span><img src="public/media/img/ae.png" alt="American Express" /></span>
                  <span><img src="public/media/img/dc.png" alt="Diners Club" /></span>
                  <span><img src="public/media/img/jcb.png" alt="JCB" /></span>
                </p>
            </div>
        </div>
    </div> 
  </div>
  <a href="#" onClick="window.open('http://www.vcs.co.za',',')"><img src="public/media/img/VCSLogoSites.png" alt="Click to Browse"></a>
  <hr>
  <!-- Footer -->
  <footer>
<?php include_once('includes/footer.php'); ?>
  </footer>
</div>
<!-- /.container --> 
<?php include_once('includes/javascript.php'); ?>
<script>
    $(document).ready(function() {
        function disableBack() {
			window.history.forward()
		}
        window.onload = disableBack();
        window.onpageshow = function(evt) {
			if (evt.persisted) disableBack() }
    });
</script>
<?php include_once('includes/modals.php'); ?>
<?php 
$arrUrl = explode("/", $_SERVER['REQUEST_URI']);
$pageName = array_pop($arrUrl);
?>
<div id="page_name" class="hidden"><?php echo $pageName; ?></div> 
<?php include_once('includes/mask.php'); ?>
</body>
</html>
