<?php
$bol = explode(' / ',$_POST["Card_Expiry"]); $ay=$bol[0]; $yil=$bol[1];
$clientId = $rsb["n1"];  					//Banka tarafindan verilen isyeri numarasi
$amount = sprice($_POST["Total"]);         //Islem tutari
if($_POST["oid"]==""){
	$oid="SID_".rand(1000,9999)."";
}else{
	$oid = $_POST["oid"];      				//Siparis Numarasi
}
$okUrl = "".$_POST['aurl']."/deppo/tools/vpos/est/response.php?burl=".$_POST["burl"]."".$rID."";    //Islem basariliysa dönülecek isyeri sayfasi  (3D isleminin ve ödeme isleminin sonucu)
$failUrl = "".$_POST['aurl']."/deppo/tools/vpos/est/response.php?burl=".$_POST["burl"]."".$rID."";  //Islem basarizsa dönülecek isyeri sayfasi  (3D isleminin ve ödeme isleminin sonucu)
$rnd = microtime();    //Tarih veya her seferinde degisen bir deger güvenlik amaçli
if($_POST["Installment"]=="1"){
	$taksit="";
}else{
	$taksit = $_POST["Installment"];      				//
}
$storekey = $rsb["n5"];  //isyeri anahtari
$orgClientId  =  $clientId;
$orgAmount = $amount;
$orgOkUrl =  $okUrl;
$orgFailUrl = $failUrl;
$orgTransactionType = "Auth";
$orgInstallment = $taksit;
$orgRnd =  microtime();
$orgCallbackUrl = "".$_POST['aurl']."/deppo/tools/vpos/est/callback.php";
?>
<body onload="document.frm1.submit();">
	<center>
		<form method="post" name="frm1" action="<?php echo $_POST['aurl']?>/deppo/tools/vpos/est/request.php" style="display:none">
		<input type="text" name="pan" size="20" value="<?php echo str_replace(' ', '', $_POST["Card_Number"]);?>"/><br>
		<input type="text" name="cv2" size="4" value="<?php echo $_POST["Card_Cvv"];?>"/><br>
		<input type="text" name="Ecom_Payment_Card_ExpDate_Year" value="<?php echo substr($yil,-2);?>"/><br>
		<input type="text" name="Ecom_Payment_Card_ExpDate_Month" value="<?php echo $ay;?>"/><br>
		<select name="cardType"><br>
		<option value="100">Visa</option>
		<option value="200">MasterCard</option>
		</select>
		<input type="hidden" name="clientid" value="<?php echo $orgClientId ?>"> 
		<input type="hidden" name="amount" value="<?php echo $orgAmount ?>">
		<input type="hidden" name="okurl" value="<?php echo $orgOkUrl ?>">
		<input type="hidden" name="failUrl" value="<?php echo $orgFailUrl ?>">
		<input type="hidden" name="TranType" value="<?php echo $orgTransactionType ?>">
		<input type="hidden" name="Instalment" value="<?php echo $orgInstallment ?>">
		<input type="hidden" name="callbackUrl" value="<?php echo $orgCallbackUrl ?>">
		<input type="hidden" name="refreshtime" value="0" />
		<?php if($_POST["Currency"]=="TRY"){?>
		<input type="text" name="currency" value="949"><br>
		<?php }elseif($_POST["Currency"]=="USD"){?>
		<input type="text" name="currency" value="840"><br>
		<?php }elseif($_POST["Currency"]=="EUR"){?>
		<input type="text" name="currency" value="978"><br>
		<?php }elseif($_POST["Currency"]=="GBP"){?>
		<input type="text" name="currency" value="826"><br>
		<?php }?>
		<input type="hidden" name="rnd" value="<?php echo $orgRnd ?>">
		<input type="hidden" name="storetype" value="<?php if($rsb["t4"]=="" or $rsb["t4"]=="3D_PAY_HOSTING"){echo "3D_PAY_HOSTING";}else{echo $rsb["t4"];}?>">
		<input type="hidden" name="hashAlgorithm" value="ver3">
		<input type="hidden" name="lang" value="<?php if($module["pos_lang"]=="" or $module["pos_lang"]=="tr"){echo "tr";}else{echo $module["pos_lang"];}?>">
		<input type="hidden" name="BillToName" value="name">
		<input type="hidden" name="BillToCompany" value="billToCompany">
</form>