<?php 
	require "models/rivermedia.php";
	$rivermedia = new RIVERMEDIA;
	$fields = $rivermedia->vcs_gateway();
	$orderAttempt = $rivermedia->get_vcs_attempt_no();
	$arrOrderAttempt = explode('__', $orderAttempt);
	$vcsAttemptNo = $arrOrderAttempt[1];
?>
<!DOCTYPE html>
<html lang="en">
<head>
<?php include_once('includes/head.php'); ?>
<script src="public/scripts/js/jquery.js"></script> 
<script type="text/javascript">
  $(document).ready(function() {
	  $('#vcs_form').submit();
  });
</script>
</head>
<body>
<div style="font-family:Verdana, Geneva, sans-serif; font-size:24px; text-align:center;">Redirecting...</div>
<form id="vcs_form" action="https://www.vcs.co.za/vvonline/vcspay.aspx" method="POST">
  <input type="hidden" name="P1" value="<?php echo $fields[0]; ?>" />
  <input type="hidden" name="P2" value="<?php echo $fields[1]; ?>" />
  <input type="hidden" name="P3" value="<?php echo $fields[2]; ?>" />
  <input type="hidden" name="P4" value="<?php echo $fields[3]; ?>" />
  <input type="hidden" name="P5" value="<?php echo $fields[4]; ?>" />
  <input type="hidden" name="P10" value="<?php echo $fields[5]; ?>" />
  <input type="hidden" name="CardholderEmail" value="<?php echo $fields[6]; ?>" />
  
</form>
</body>
</html>