0xV3NOMx
Linux ip-172-26-7-228 5.4.0-1103-aws #111~18.04.1-Ubuntu SMP Tue May 23 20:04:10 UTC 2023 x86_64



Your IP : 18.223.209.114


Current Path : /proc/thread-self/root/var/www/html/demo/rcub_pgcet1402/
Upload File :
Current File : //proc/thread-self/root/var/www/html/demo/rcub_pgcet1402/payment_gate_way_responce.php

<?php
	ini_set("display_errors","On");
	error_reporting(E_ALL ^ E_NOTICE);
	require_once("cconfig.php");
	$aobj_context=CConfig::CreateNewDbContext();
	 
			$ip=$_SERVER["REMOTE_ADDR"];
			 $app_no=trim($_REQUEST['vpc_OrderInfo']);
			 $frcnumber=trim($_REQUEST['vpc_ReceiptNo']);
			 $ftranno=trim($_REQUEST['vpc_TransactionNo']);
			 $fcardtype=trim($_REQUEST['vpc_Card']);
			 $fresponcecode=trim($_REQUEST["vpc_TxnResponseCode"]);
			 $vpc_Message=trim($_REQUEST["vpc_Message"]);
			 if($vpc_Message=="Approved")
			 $fapproved="T";
			 else
			 $fapproved="F";
			 if($fresponcecode==0)
			 $fpaystatus='Y';
			 else
			 $fpaystatus='N';
			 $fpaystatusdesc=getResponseDescription($fresponcecode);
			 

			 $get_data="select date_format(ifnull(fdob,'00/00/0000'),'%d/%m/%Y') as fdob from 
								student where app_no='{$app_no}'";
			$obj_get_data=$aobj_context->mobj_db->GetRow($get_data);
		 
			$fdob=$obj_get_data['fdob'];
			  
			$update="update student 
							set 
							frcnumber='{$frcnumber}',
							ftranno='{$ftranno}',
							fcardtype='{$fcardtype}',
							fresponcecode='{$fresponcecode}',
							fapproved='{$fapproved}',
							fpaystatusdesc='{$fpaystatusdesc}',
							fpaystatus='{$fpaystatus}',
							fpayipaddress='{$ip}',
							fpaydate=current_date()
							where app_no='{$app_no}'
							";
			$obj_get_data=$aobj_context->mobj_db->Execute($update);
			
			$is_error=0;
			$color="green;";
			 if(empty($app_no) || count($obj_get_data)==0)
			{
				$message="Invalid Application No";
				 $is_error=1;
				 $color="red;";
			}	
			else if($fresponcecode=='0')
			{
				$message=$fpaystatusdesc;
				$is_error=0;
			}else  
			{
				$message=$fpaystatusdesc." Please check after some time";
				$is_error=1;
				 $color="red;";
			}
			  
			 
?>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<?php require_once("links/js_files.php");?> 
<script type="text/javascript">
		$(function(){		  
		 $('#div_app_form_center').corner("5px").css("border","1px solid #4F3B3B");
		 $('#print_app_form').corner("5px");
		 $('.div_app_form_center_black').corner("5px");
		 $("#fdob").mask({mask: "##/##/####"}) ; 
			//GateWayResponce();
		
		});
</script>
</head>

<body  >
<div id='main_frame'>
	<div class='header_main_div'>
			<?php require_once("links/header.php");
			
			?> 
		 
			<div class='app_form_center'>
				<div id='div_app_form_center' class="messageboard-div">
					<div style="height:40px; padding:2px;" align='center' class="div_app_form_center_black"><a style='font-family:Trebuchet MS;word-spacing: 4px;line-height:33px;color:#FFFFFF;'>Payment GateWay Responce </a></div>	
					
					<?php
					
					$span=" <span style='font-size: 22px; font-weight: normal;  line-height: 40px;  margin-left: 10px; text-align: center;color:{$color}' id='gate_way_responce_span'>{$message}</span>";
					echo $span;
					if($is_error==0)
					{
					$str='<div style="float: left;   margin-top: 15px;" id="gate_way_div">
													<div style="float: left;margin-left: 12px;text-align: left;	width: 122px;">
														Application No. :</div>
													<div style="float: left; width: 220px; text-align: left;">
														<input type="text" style="height:20px;width:153px;border: 1px solid #353535;" onkeypress="return acceptNumbersOnlyForModule(event, false)" id="txtApplicationNo" maxlength="9" name="txtApplicationNo" value='.$app_no.'>
														 
													</div>
													<div style="clear:both;"/>
													<div style="float: left;margin-left: 12px;margin-top: 12px;text-align: left;	width: 122px;">
														Date Of Birth :</div>
													<div style="float: left; ;margin-top: 12px;width: 250px; text-align: left;">
														<input type="text" style="height:20px;width:153px;border: 1px solid #353535;"   id="fdob"  value='.$fdob.' maxlength="10" >&nbsp;(dd/mm/yyyy)
														 
													</div>
							</div>';
							
					
					 
					
					$str.='<div style="padding-top: 20px; margin-left: 103px; float: left;width: 300px;">
                                            <div id="print_app_for" style="background: none repeat scroll 0 0 #EECF02;
											float: left;
											height: 22px;
											margin-left: 25px;
											padding-left: 10px;
											width: 154px;box-shadow: 1px 1px 5px #888888;"><span style="cursor: pointer; line-height: 19px;" onclick="printApplicationFormFromUI();">Print Application Form </span>
                                                 
                                                
                                            </div>
                                            <div style="width: auto; height: auto; font-family: Arial; float: left; padding-top: 3px;
                                                padding-left: 10px;">
                                                <a style="color: #1D1C1C;
                                                    font-size: 12px;" href="index.php">Back to Home</a>
                                            </div>
						</div>';
						echo $str;		
					}
					?>			 
										
										
				</div>
			</div>
	</div>
	 
	<?php require_once("links/footer.php");?> 

</div>
 
</br>
</body>
</html>

<?php
function getResponseDescription($responseCode) {

    switch ($responseCode) {
        case "0" : $result = "Transaction Successful"; break;
        case "?" : $result = "Transaction status is unknown"; break;
        case "1" : $result = "Unknown Error"; break;
        case "2" : $result = "Bank Declined Transaction"; break;
        case "3" : $result = "No Reply from Bank"; break;
        case "4" : $result = "Expired Card"; break;
        case "5" : $result = "Insufficient funds"; break;
        case "6" : $result = "Error Communicating with Bank"; break;
        case "7" : $result = "Payment Server System Error"; break;
        case "8" : $result = "Transaction Type Not Supported"; break;
        case "9" : $result = "Bank declined transaction (Do not contact Bank)"; break;
        case "A" : $result = "Transaction Aborted"; break;
        case "C" : $result = "Transaction Cancelled"; break;
        case "D" : $result = "Deferred transaction has been received and is awaiting processing"; break;
        case "F" : $result = "3D Secure Authentication failed"; break;
        case "I" : $result = "Card Security Code verification failed"; break;
        case "L" : $result = "Shopping Transaction Locked (Please try the transaction again later)"; break;
        case "N" : $result = "Cardholder is not enrolled in Authentication scheme"; break;
        case "P" : $result = "Transaction has been received by the Payment Adaptor and is being processed"; break;
        case "R" : $result = "Transaction was not processed - Reached limit of retry attempts allowed"; break;
        case "S" : $result = "Duplicate SessionID (OrderInfo)"; break;
        case "T" : $result = "Address Verification Failed"; break;
        case "U" : $result = "Card Security Code Failed"; break;
        case "V" : $result = "Address Verification and Card Security Code Failed"; break;
        default  : $result = "Unable to be determined"; 
    }
    return $result;
}
?>