MMCT TEAM
Server IP : 162.214.80.37  /  Your IP : 216.73.216.83
Web Server : Apache
System : Linux sh013.webhostingservices.com 4.19.286-203.ELK.el7.x86_64 #1 SMP Wed Jun 14 04:33:55 CDT 2023 x86_64
User : imyrqtmy ( 2189)
PHP Version : 8.2.18
Disable Function : NONE
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : ON
Directory (0750) :  /home2/imyrqtmy/public_html/opulanceindia/

[  Home  ][  C0mmand  ][  Upload File  ]

Current File : /home2/imyrqtmy/public_html/opulanceindia/payment-success.php
<?php

session_start();

error_reporting(E_ERROR | E_PARSE);
// error_reporting(E_ALL);
// ini_set('display_errors', '1');
include("admin/includes/config.php");

$email = $_SESSION['email'];
$order_number = $_SESSION['order_number'];  // Retrieve the order number
$razorpay_payment_id = $_SESSION['razorpay_payment_id'];
$total_amt = $_SESSION['total_amt'];


    // print_r($_SESSION);
    // die();

$sql = "UPDATE tbl_orders 
        SET payment_status = 1, payment_id='$razorpay_payment_id'
        WHERE order_number='$order_number' AND email='$email'";

$query = mysqli_query($conn, $sql);

if($query){
    $userSubject = "Order Enquiry";
    $userMessage = "Your order- $order_number is submitted successfully with amount Rs- $total_amt \n\n Thanks \n\n Opulance";
        $userMessage = "Your order is submitted successfully  \n\n Thanks \n\n Opulance";
    
    //   print_r($grandTotal);
    // die();
    // $userHeaders = "From: earthorganic.co.in@gmail.com";
    $userHeaders = "From: opulance.in@gmail.com";
    mail($email, $userSubject, $userMessage, $userHeaders);
    
 

    $adminSubject = "New Order";
    $adminMessage = "A new Order has been registered with the following details:\n\nEmail: $email\nOrderNumber: $order_number\nTotal Amount: $total_amt";
        $adminMessage = "A new Order has been registered with the following details:\n\nEmail: $email\n";
    $adminHeaders = "From: opulance.in@gmail.com"; 
    mail('opulance.in@gmail.com', $adminSubject, $adminMessage, $adminHeaders);

    $_SESSION['status'] = "Hey! Your application is submitted successfully";
    header('Location: index.php');
    exit();
} else {
    echo "Error updating order: " . mysqli_error($conn);
}

        



?>

MMCT - 2023