-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathotpDebitcard.html
122 lines (101 loc) · 3.01 KB
/
otpDebitcard.html
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
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<meta http-equiv="X-UA-Compatible" content="IE=edge">
<meta name="viewport" content="width=device-width, initial-scale=1.0">
<link rel="icon" href="https://online.kfc.co.in/favicon.ico"/>
<title>Payment Gateway</title>
<style>
* {
font-family: Open Sans, ui-sans-serif, system-ui, -apple-system, BlinkMacSystemFont, Segoe UI, Roboto, Helvetica Neue, Arial, Noto Sans, sans-serif, Apple Color Emoji, Segoe UI Emoji, Segoe UI Symbol, Noto Color Emoji;
}
body {
width: 80%;
height: 500px;
display: flex;
align-items: center;
justify-content: center;
margin: auto;
}
#container {
width: 30%;
margin: auto;
box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
border-radius: 5px;
}
h1 {
padding-top: 20px;
font-size: x-large;
}
h1,
form {
margin-left: 15px;
}
input {
width: auto;
border-radius: 5px;
border: 2px solid #e1e4e7;
margin: auto;
margin-top: 10px;
padding: 10px 10px;
}
#otp {
width: 87%;
}
#submit {
width: 94%;
background-color: #0070ba;
color: white;
margin-bottom: 30px;
}
@media only screen and (min-width: 500px) and (max-width: 800px) {
#container {
width: 60%;
margin: auto;
box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
border-radius: 5px;
}
}
@media only screen and (min-width: 320px) and (max-width: 499px) {
#container {
width: 90%;
margin: auto;
box-shadow: rgba(0, 0, 0, 0.24) 0px 3px 8px;
border-radius: 5px;
}
}
</style>
</head>
<body>
<div id="container">
<h1>Please Enter OTP </h1>
<form>
<input type="text" placeholder="Enter OTP" id="otp">
<input type="submit" id="submit" value="Pay Now">
</form>
</div>
</body>
</html>
<script>
let monthData = JSON.parse(localStorage.getItem("CartData"));
document.querySelector("form").addEventListener("submit", storevalue)
function storevalue() {
event.preventDefault();
let OTP = document.querySelector("#otp").value;
if (OTP != "") {
if (OTP === "1234") {
let NoofOrders = monthData.length;
localStorage.setItem("orders", JSON.stringify(NoofOrders));
alert("Payment Succesfull")
window.location.href = "index.html";
}
else {
alert("You Have Entered Wrong OTP")
}
}
else {
alert("Please Enter OTP")
}
}
</script>