System: Windows NT WINDOWS18 10.0 build 17763 (Windows Server 2016) AMD64 | User: IWPD_3544(appclien)
Path: D:\Inetpub\vhosts\appclients.in\fruits-vegitables.nmvm.org\payment
[Back to List]
<?php
include('../admin/config.php');
include('Crypto.php');
?>
<?php
//error_reporting(0);
$workingKey='091104C7413B63C5F18442361DA4A68A'; //Working Key should be provided here.
$encResponse=$_POST["encResp"]; //This is the response sent by the CCAvenue Server
$rcvdString=decrypt($encResponse,$workingKey); //Crypto Decryption used as per the specified working key.
$order_status="";
$decryptValues=explode('&', $rcvdString);
$dataSize=sizeof($decryptValues);
echo "<center>";
for($i = 0; $i < $dataSize; $i++)
{
$information=explode('=',$decryptValues[$i]);
if($i==3) $order_status=$information[1];
}
//print_r($dataSize);
//echo $trans_id;
$orderNoIs= $_REQUEST['orderNo'];
include('../admin/config.php');
mysqli_query($con,"UPDATE `cart` SET transID='$orderNoIs',paysts='Success' WHERE code_id='$orderNoIs'");
//get reg_id
$get_customer_info = mysqli_fetch_array(mysqli_query($con,"select * from `cart` where code_id='$orderNoIs'"));
$message = "Your order has been completed successfully:- ".$get_customer_info['code_id'];
//for customer
$from = "support@annratnam.co.in";
$headers = "From:" . $from . "\r\n";
$headers .= "Content-type: text/html; charset=UTF-8" . "\r\n";
mail($get_customer_info['bll_email'],"Order details on annratnam.co.in",$message,$headers);
$message1 = "A New order has been created successfully:- ".$get_customer_info['code_id'];
//for admin
$from = $get_customer_info['bll_email'];
$headers1 = "From:" . $from . "\r\n";
$headers1 .= "Content-type: text/html; charset=UTF-8" . "\r\n";
mail("support@annratnam.co.in","A new order from annratnam.co.in",$message1,$headers1);
echo "<script>alert('Your order is done successfully!')</script>";
echo "<script>window.location='https://annratnam.co.in/thank-you.php'</script>";
if($order_status==="Success")
{
$trans_id=0;
if($order_status==="Aborted")
{
echo "<br>Thank you for shopping with us.We will keep you posted regarding the status of your order through e-mail";
header("refresh:30;url=/");
}
else if($order_status==="Failure")
{
echo "<br>Sorry,the transaction has been declined.";
header("refresh:30;url=/");
}
else
{
echo "<br>Security Error. Illegal access detected";
header("refresh:30;url=/");
}
echo "<br><br>";
echo "<table cellspacing=4 cellpadding=4>";
for($i = 0; $i < $dataSize; $i++)
{
$information=explode('=',$decryptValues[$i]);
echo '<tr><td>'.$information[0].'</td><td>'.urldecode($information[1]).'</td></tr>';
}
echo "</table><br>";
}
echo "</center>";
?>