-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathverify_purchase.php
More file actions
146 lines (128 loc) · 4.2 KB
/
verify_purchase.php
File metadata and controls
146 lines (128 loc) · 4.2 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
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
<?php
require_once('includes/load.php');
$page_title = 'Verify Purchase Request';
// Check if there's a pending verification
if(!isset($_SESSION['purchase_otp']) || !isset($_SESSION['temp_purchase_request'])) {
redirect('customer_view.php', false);
}
$request_data = $_SESSION['temp_purchase_request'];
?>
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title><?php echo $page_title; ?></title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/css/bootstrap.min.css"/>
<link rel="stylesheet" href="libs/css/main.css" />
<style>
body {
background-color: #1e1e1e;
color: #fff;
font-family: 'Segoe UI', Tahoma, Geneva, Verdana, sans-serif;
}
.verification-container {
max-width: 500px;
margin: 50px auto;
background-color: #2c2c2c;
padding: 30px;
border-radius: 5px;
box-shadow: 0 4px 6px rgba(0, 0, 0, 0.1);
}
.verification-header {
text-align: center;
margin-bottom: 30px;
}
.verification-header h3 {
margin-top: 0;
color: #3498db;
}
.form-control {
background-color: #3c3c3c;
border: 1px solid #555;
color: #fff;
height: 40px;
box-shadow: none;
}
.form-control:focus {
background-color: #3c3c3c;
border-color: #3498db;
color: #fff;
box-shadow: 0 0 0 2px rgba(52, 152, 219, 0.2);
}
.btn-primary {
background-color: #3498db;
border-color: #2980b9;
}
.btn-primary:hover {
background-color: #2980b9;
}
.order-summary {
background-color: #3c3c3c;
padding: 15px;
border-radius: 5px;
margin-bottom: 20px;
}
.order-summary h4 {
margin-top: 0;
color: #3498db;
}
.order-detail {
margin-bottom: 5px;
}
.order-detail strong {
color: #ddd;
}
</style>
</head>
<body>
<div class="container">
<div class="verification-container">
<div class="verification-header">
<h3><i class="glyphicon glyphicon-lock"></i> Verify Your Purchase</h3>
<p>We've sent a verification code to your email address. Please enter it below to complete your purchase request.</p>
</div>
<?php if(isset($_SESSION['error'])): ?>
<div class="alert alert-danger alert-dismissible">
<button type="button" class="close" data-dismiss="alert">×</button>
<?php
echo $_SESSION['error'];
unset($_SESSION['error']);
?>
</div>
<?php endif; ?>
<div class="order-summary">
<h4>Order Summary</h4>
<div class="order-detail">
<strong>Product:</strong> <?php echo $request_data['product_name']; ?>
</div>
<div class="order-detail">
<strong>Warehouse:</strong> <?php echo $request_data['warehouse_name']; ?>
</div>
<div class="order-detail">
<strong>Quantity:</strong> <?php echo $request_data['quantity']; ?>
</div>
<div class="order-detail">
<strong>Customer:</strong> <?php echo $request_data['customer_name']; ?>
</div>
<div class="order-detail">
<strong>Email:</strong> <?php echo $request_data['email']; ?>
</div>
</div>
<form method="post" action="process_customer_request.php">
<div class="form-group">
<label for="otp">Verification Code</label>
<input type="text" class="form-control" id="otp" name="otp" placeholder="Enter the 6-digit code" required>
</div>
<input type="hidden" name="verify_otp" value="1">
<button type="submit" class="btn btn-primary btn-block">Verify & Complete Purchase</button>
</form>
<div class="text-center" style="margin-top: 20px;">
<p>Didn't receive the code? <a href="resend_otp.php">Resend Code</a></p>
<p><a href="customer_view.php">Cancel and return to products</a></p>
</div>
</div>
</div>
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.2/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.3.4/js/bootstrap.min.js"></script>
</body>
</html>