ok

Mini Shell

Direktori : /proc/self/root/proc/thread-self/root/proc/self/root/home2/selectio/www/a-pay/
Upload File :
Current File : //proc/self/root/proc/thread-self/root/proc/self/root/home2/selectio/www/a-pay/paymentsuccess-1.php

<?php 
include"../config/config.php";
if(isset($_POST)){
    if($_POST['code']=='PAYMENT_SUCCESS'){
        
    
    
    $encryptionKey = 'DRAWING';
    $decodedUrl = base64_decode(urldecode($_GET['code']));
    $iv = substr($decodedUrl, 0, 16);
    $encryptedUrl = substr($decodedUrl, 16);
    $decryptedUrl = openssl_decrypt($encryptedUrl, 'aes-256-cbc', $encryptionKey, 0, $iv);
    
    
    
    
        $statement = $pdo->prepare("SELECT * FROM `orders` WHERE id='".$decryptedUrl."'");
		$statement->execute();
		$query = $statement->fetchAll(PDO::FETCH_ASSOC);
		$totalData = $statement->rowCount();
            
        if($totalData>0){
            
            
            $tickets = $pdo->prepare("SELECT * FROM `order_items` WHERE order_id='".$decryptedUrl."'");
    		$tickets->execute();
    		$tickets_query = $tickets->fetchAll(PDO::FETCH_ASSOC);
    		$tickets_totalData = $tickets->rowCount();
            
            if($tickets_totalData>0){
                $order_id = $tickets_query[0]['order_id'];
                $product_id = $tickets_query[0]['product_id'];
                $total_amount = $tickets_query[0]['total_amt'];
            }
            
            
            
            
            
            $customer_id = $query[0]['customer_id'];
            $order_date = $query[0]['order_date'];
            $finnal_total_amount = $query[0]['total_amt'];
            $customer_name = $query[0]['name'];
            $customer_city = $query[0]['city'];
            $customer_address = $query[0]['address'];
            $customer_mobile = $query[0]['mobile'];
            
            
            
            // Query Sections Here 
  

		
    // Query Sections Here 
        
    // Official Values Here 
    $pro_order_date =$customer_address;
    $pro_order_date = date("d-m-Y", strtotime($order_date));
    $customer_mobile_number = "91".$customer_mobile;
             
        }else{
            
        }
    
    
    
 
    
    
    // Update Query Here 
    $statement = $pdo->prepare("UPDATE `orders` SET status=1,transactin_id=?,pament_status_type=?,last_payment_amount=? WHERE id=?");
    $result = $statement->execute(array($_POST['transactionId'],'Completed',$finnal_total_amount,$decryptedUrl));
    
    if($result){
        $statement = $pdo->prepare("UPDATE `order_items` SET status=1 WHERE order_id=?");
        $result = $statement->execute(array($decryptedUrl));
    }
        
        $payment_status = "Payment Success";
        $booking_status = "Order Placed Completed";
           
    
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        
        echo 'Payment Received Successfully...<br>';
        echo 'Booking id:'.$_POST['transactionId'].'<br>';
        echo 'transactionId id:'.$_POST['merchantId'].'<br>';
        echo 'providerReferenceId:'.$_POST['providerReferenceId'].'<br>';
      /*  echo 'param1:'.$_POST['param1'].'<br>';*/
        
    }else{
        echo 'Payment Received Failed<br>';
    }
    
   // print_r($_POST);
}

?>

Zerion Mini Shell 1.0