-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathpayment.php
More file actions
127 lines (107 loc) · 3.46 KB
/
Copy pathpayment.php
File metadata and controls
127 lines (107 loc) · 3.46 KB
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
<?php include 'assets/php/config.php';
if (isset($_POST['payment'])) {
$fullname = $_POST['fullname'];
$Address = $_POST['Address'];
$phone = $_POST['phone'];
$userid = $_POST['userid'];
$total = $_POST['total'];
$txid = 'ANON' . generateRandomToken(8) . 'TXID';
$run_payment = mysqli_query($con, "INSERT INTO `payments`(`user_id`, `phone`, `address`, `name`, `total`, `txid`, `status`) VALUES ('$userid','$phone','$Address','$fullname','$total','$txid','done')");
$delete_cart = mysqli_query($con, "DELETE FROM `cart` WHERE `UserID`='$userid'");
if (!$run_payment) {
header("location: cart.php");
exit;
}
}else{
header("location: cart.php");
exit;
}
?>
<!DOCTYPE html>
<html lang="en">
<head>
<title>Anon - eCommerce Website</title>
<?php include 'assets/php/header.php' ?>
<style>
#card {
position: relative;
width: 520px;
display: block;
margin: auto;
text-align: center;
padding: 30px;
}
#upper-side {
padding: 2em;
background-color: #8BC34A;
display: block;
color: #fff;
border-top-right-radius: 8px;
border-top-left-radius: 8px;
}
#status {
font-weight: lighter;
text-transform: uppercase;
letter-spacing: 2px;
font-size: 1em;
margin-top: -.2em;
margin-bottom: 0;
}
#lower-side {
padding: 2em 2em 5em 2em;
background: #fff;
display: block;
border-bottom-right-radius: 8px;
border-bottom-left-radius: 8px;
border: 1px solid #484646a9;
}
#message {
margin-top: -.5em;
color: #757575;
letter-spacing: 1px;
}
#contBtn {
position: relative;
top: 1.5em;
text-decoration: none;
background: #8bc34a;
color: #fff;
margin: auto;
padding: .8em 3em;
-webkit-box-shadow: 0px 15px 30px rgba(50, 50, 50, 0.21);
-moz-box-shadow: 0px 15px 30px rgba(50, 50, 50, 0.21);
box-shadow: 0px 15px 30px rgba(50, 50, 50, 0.21);
border-radius: 25px;
-webkit-transition: all .4s ease;
-moz-transition: all .4s ease;
-o-transition: all .4s ease;
transition: all .4s ease;
}
#contBtn:hover {
-webkit-box-shadow: 0px 15px 30px rgba(60, 60, 60, 0.40);
-moz-box-shadow: 0px 15px 30px rgba(60, 60, 60, 0.40);
box-shadow: 0px 15px 30px rgba(60, 60, 60, 0.40);
-webkit-transition: all .4s ease;
-moz-transition: all .4s ease;
-o-transition: all .4s ease;
transition: all .4s ease;
}
</style>
</head>
<body>
<div class="overlay" data-overlay></div>
<?php include 'assets/php/navbar.php' ?>
<div class="payment-container">
<div id='card'>
<div id='upper-side'>
<h3 id='status'>Payment Done </h3>
</div>
<div id='lower-side'>
<p id='message'> Congratulations, Your order is places successful</p>
<a href="profile.php?orderdetails=enctype" id="contBtn">Check Order</a>
</div>
</div>
</div>
<?php include 'assets/php/footer.php' ?>
</body>
</html>