kohjhjhصثقصثقصثقgdfgdg
Ele57885fddfgdfgfghgقفغفغفقhfg555434536
/
home
/
u402332945
/
domains
/
simmar.co.in
/
public_html
/
Upload FileeE
HOME
<?php include('Crypto.php')?> <?php session_start(); $uid = $_SESSION["uid"]; include 'db.php'; if(!isset($_SESSION['uid'])){ // header('Location:index.php'); } error_reporting(0); $workingKey='DE285C488318FB53AA98B21A265ACC59'; //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==0) $order_id=$information[1]; if($i==2) $bank_ref_no=$information[1]; if($i==3) $order_status=$information[1]; } if($order_status==="Success") { $dateawnt = date("dmY"); $message="".$dateawnt. "SNM".$order_id. ""; $up=$db->query("UPDATE `cust` SET `approve`='Order Confirmed',`status`='Success' WHERE order_id='".$order_id."'"); $up=$db->query("UPDATE `customer_order` SET `approve`='Order Confirmed',`status`='Success' WHERE tr_id='".$order_id."'"); $retw=mysqli_query($db,"select * from customer_order WHERE tr_id='".$order_id."'"); while($row=mysqli_fetch_array($retw)) { $pid=$row['pid']; $price=$row['p_price']; $qtys=$row['p_qty']; $total=$row['total']; $totalawnt=$row['totalawnt']; if($totalawnt=="Productview"){ $orderItemSqlawnt = "SELECT id,stock FROM p15 WHERE id='$pid'"; $orderItemResultawnt = $db->query($orderItemSqlawnt); $orderResultawnt = $db->query($orderItemSqlawnt); $orderDataawnt = $orderResultawnt->fetch_array(); $awnt = $orderDataawnt[1]-$qtys; $insert = $db->query("update p15 set stock='$awnt' where id='$pid'"); if($awnt<=0){ mysqli_query($db,"delete from p293 where nameprdt='$pid'"); } else { } } else { $orderItemSqlawnt = "SELECT id,stock FROM p293 WHERE id='$pid'"; $orderItemResultawnt = $db->query($orderItemSqlawnt); $orderResultawnt = $db->query($orderItemSqlawnt); $orderDataawnt = $orderResultawnt->fetch_array(); $awnt = $orderDataawnt[1]-$qtys; $insert = $db->query("update p293 set stock='$awnt' where id='$pid'"); } } $orderItemSqlawntwtnt = "SELECT id,uid,email,phonenumr FROM cust WHERE order_id='".$order_id."'"; $orderItemResultawntwtnt = $db->query($orderItemSqlawntwtnt); $orderResultawntwtnt = $db->query($orderItemSqlawntwtnt); $orderDataawntwtnt = $orderResultawntwtnt->fetch_array(); $uid = $orderDataawntwtnt[1]; $email = $orderDataawntwtnt[2]; $phonenumr = $orderDataawntwtnt[3]; include_once("sendsms.php"); $url = 'http://pay4sms.in'; $token = '7a8229c7b71ff7141fbffa79810962fe'; $credit = '2'; $sender = 'SIMMAO'; //$message = "Dear Customer your OTP is '".$rndno."' for your login at Fox Three Technologies."; $message = "Simmar confirming your order. We've received your order on www.simmar.co.in & We are excited to fulfill it! Order No: ".$order_id.". For updates on your order status, please visit www.simmar.co.in or reach out to our customer support team at +91 97872 14222."; $number =$phonenumr; $sendsms = new sendsms($url,$token); $message_id = $sendsms->sendmessage($credit,$sender,$message,$number); $dlr_status = $sendsms->checkdlr($message_id); $available_credit = $sendsms->availablecredit($credit); $sql3="DELETE FROM cart WHERE user_id='$uid'"; $run_query3=mysqli_query($db,$sql3); //echo "<br>Thank you for shopping with us. Your credit card has been charged and your transaction is successful. We will be shipping your order to you soon."; echo "<script>document.location='return.php?cid=$order_id&cid1=$phonenumr'</script>"; } else 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"; $up=$db->query("UPDATE `cust` SET `status`='Aborted' WHERE order_id='".$order_id."'"); $up=$db->query("UPDATE `customer_order` SET `status`='Aborted' WHERE tr_id='".$order_id."'"); echo "<script>document.location='aborted.php'</script>"; } else if($order_status==="Failure") { echo "<br>Thank you for shopping with us.However,the transaction has been declined."; $up=$db->query("UPDATE `cust` SET `status`='Failure' WHERE order_id='".$order_id."'"); $up=$db->query("UPDATE `customer_order` SET `status`='Failure' WHERE tr_id='".$order_id."'"); echo "<script>document.location='failure.php'</script>"; } else if($order_status==="Invalid") { echo "<br>Thank you for shopping with us.However,the transaction has been Invalid."; $up=$db->query("UPDATE `cust` SET `status`='Invalid' WHERE order_id='".$order_id."'"); $up=$db->query("UPDATE `customer_order` SET `status`='Invalid' WHERE tr_id='".$order_id."'"); echo "<script>document.location='invalid.php'</script>"; } else if($order_status==="Timeout") { echo "<br>Thank you for shopping with us.However,the transaction has been Timeout."; $up=$db->query("UPDATE `cust` SET `status`='Timeout' WHERE order_id='".$order_id."'"); $up=$db->query("UPDATE `customer_order` SET `status`='Timeout' WHERE tr_id='".$order_id."'"); echo "<script>document.location='timeout.php'</script>"; } else { echo "<br>Security Error. Illegal access detected"; $up=$db->query("UPDATE `cust` SET `status`='Security Error' WHERE order_id='".$order_id."'"); $up=$db->query("UPDATE `customer_order` SET `status`='Security Error' WHERE tr_id='".$order_id."'"); echo "<script>document.location='returnorder.php'</script>"; } 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>'.$information[1].'</td></tr>'; } echo "</table><br>"; echo "</center>"; ?>