-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpaymentdone.php
More file actions
28 lines (28 loc) · 1010 Bytes
/
Copy pathpaymentdone.php
File metadata and controls
28 lines (28 loc) · 1010 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
<?php
include('./dbConnection.php');
session_start();
if(!isset($_SESSION['stuLogEmail'])) {
echo "<script> location.href='loginorsignup.php'; </script>";
} else {
date_default_timezone_set('Asia/Kolkata');
$date = date('d-m-y h:i:s');
if(isset($_POST['ORDER_ID']) && isset($_POST['TXN_AMOUNT'])){
$order_id = $_POST['ORDER_ID'];
$stu_email = $_SESSION['stuLogEmail'];
$course_id = $_SESSION['course_id'];
$status = "Success";
$respmsg = "Done";
$amount = $_POST['TXN_AMOUNT'];
$date = $date;
$sql = "INSERT INTO courseorder(order_id, stu_email, course_id, status, respmsg, amount, order_date) VALUES ('$order_id', '$stu_email', '$course_id', '$status', '$respmsg', '$amount', '$date')";
if($conn->query($sql) == TRUE){
echo "Redirecting to My Profile....";
echo "<script> setTimeout(() => {
window.location.href = './Student/myCourse.php';
}, 1500); </script>";
};
} else {
echo "<b>Transaction status is failure</b>" . "<br/>";
}
}
?>