<?php 
$bol = explode(' / ',$_POST["Card_Expiry"]); $ay=$bol[0]; $yil=$bol[1];
$email = $fmail;
$tutar = $_POST["Total"];
if($_POST["Installment"]=="1"){
	$taksit="0";
}else{
	$taksit = $_POST["Installment"];
}
$order_id = rand(1000,999999);
?>
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.0 Transitional//EN" >
 <html>
     <head>
         <title>Finans VPos</title>
         <meta http-equiv="Content-Language" content="tr">
         <meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-9">
     </head>
     <body>
	<script src="//code.jquery.com/jquery-latest.js" type="text/javascript"></script>
	<script>
	jQuery(document).ready(function(){
		document.getElementById("form1").submit();
	});
	</script>
		<?php
		  $amount = $_POST["Total"];         										//Islem tutari
          $MbrId="5";																			//Kurum Kodu
          $MerchantID=$rsb["n1"];														//Language_MerchantID
          $MerchantPass=$rsb["n5"];													//Language_MerchantPass
          $UserCode=$rsb["n3"];															//Kullanici Kodu
          $UserPass=$rsb["n4"];															//Kullanici Sifre
          $SecureType="3DPay";															//Language_SecureType
          $TxnType="Auth";																	//Islem Tipi
          $InstallmentCount=$taksit;														//Taksit Sayisi
          $Currency="949";																	//Para Birimi
          $OkUrl="".$_POST['aurl']."/deppo/tools/vpos/finansbank/return.php?burl=".$_POST['burl']."";		//Language_OkUrl
          $FailUrl="".$_POST['aurl']."/deppo/tools/vpos/finansbank/return.php?burl=".$_POST['burl']."";	//Language_FailUrl
          $OrderId=$oid;                                                          				//Siparis Numarasi
          $OrgOrderId="";	                                                             		//Orijinal Islem Siparis Numarasi
          $PurchAmount=$amount;														//Tutar
          $Lang="TR";																			//Language_Lang
		$rnd = microtime(); 
		$hashstr = $MbrId . $OrderId . $PurchAmount . $OkUrl . $FailUrl . $TxnType . $InstallmentCount . $rnd . $MerchantPass;
		$hash = base64_encode(pack('H*',sha1($hashstr)));
		?>
		<!--<form name="form1" id="form1" method="post" action="https://vpostest.qnbfinansbank.com/Gateway/Default.aspx" style="">-->
		<form name="form1" id="form1" method="post" action="https://vpos.qnbfinansbank.com/Gateway/Default.aspx" style="display:none;">
		<input type="text" name="Pan" maxlength="19"    class="inputClass" value="<?php echo str_replace(' ','',$_POST["Card_Number"])?>" />
        <input type="text" name="Cvv2" maxlength="4"    class="inputClass" value="<?php echo $_POST["Card_Cvv"]?>" />
        <input type="text" name="Expiry" maxlength="4"    class="inputClass" value="<?php echo $ay?><?php echo substr($yil,-2);?>" />
        <input type='submit' value='Gonder' class='buttonClass' />
  
		<input type="hidden" name="MbrId" value="<?php  echo $MbrId ?>">
             <input type="hidden" name="MerchantID" value="<?php  echo $MerchantID ?>">
             <input type="hidden" name="UserCode" value="<?php  echo $UserCode ?>">
             <input type="hidden" name="UserPass" value="<?php  echo $UserPass ?>">
             <input type="hidden" name="SecureType" value="<?php  echo $SecureType ?>">
             <input type="hidden" name="TxnType" value="<?php  echo $TxnType ?>">
             <input type="hidden" name="InstallmentCount" value="<?php  echo $InstallmentCount ?>">
             <input type="hidden" name="Currency" value="<?php  echo $Currency ?>">
             <input type="hidden" name="OkUrl" value="<?php  echo $OkUrl ?>">
             <input type="hidden" name="FailUrl" value="<?php  echo $FailUrl ?>">
             <input type="hidden" name="OrderId" value="<?php  echo $OrderId ?>">
             <input type="hidden" name="OrgOrderId" value="<?php  echo $OrgOrderId ?>">
             <input type="hidden" name="PurchAmount" value="<?php  echo $PurchAmount ?>">
             <input type="hidden" name="Lang" value="<?php  echo $Lang ?>">
             <input type="hidden" name="Rnd" value="<?php echo $rnd?>">
             <input type="hidden" name="Hash" value="<?php echo $hash?>">
	</form>
</body>
</html>