-
Notifications
You must be signed in to change notification settings - Fork 0
/
paymentpage.html
154 lines (141 loc) · 4.64 KB
/
paymentpage.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
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
<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">
<title>Document</title>
</head>
<style>
#main_div{
width:30%;
margin:auto;
margin-top: 50px;
box-shadow: rgba(6, 24, 44, 0.4) 0px 0px 0px 2px, rgba(6, 24, 44, 0.65) 0px 4px 6px -1px, rgba(255, 255, 255, 0.08) 0px 1px 0px inset;
padding:20px;
border-radius: 10px;
}
form>div{
width:100%;
height: 40px;
}
#country{
width:100%;
height: 100%;
}
.bottom{
margin-bottom: 20px;
}
.names{
display: flex;
align-items: flex-end;
font-weight: bold;
font-family: -apple-system, BlinkMacSystemFont, 'Segoe UI', Roboto, Oxygen, Ubuntu, Cantarell, 'Open Sans', 'Helvetica Neue', sans-serif;
margin-bottom: 10px;
}
input{
width:98%;
height:88%;
font-size: 17px;
outline: none;
}
#state_div{
display: flex;
height: 60px;
justify-content: space-between;
}
#state_div>div{
width:45%
}
#submit{
width:80%;
color: white;
background-color: #EE4A1B;
font-size: 20px;
}
#submitdiv{
display: flex;
justify-content: center;
margin-top: 30px;
}
</style>
<body>
<center><img src="https://www.travelocity.com/_dms/interstitial/logo.svg?locale=en_US&siteid=80001" alt=""></center>
<div id="main_div" >
<!-- form start -->
<form>
<div class="names" >
<span>Name on Card</span>
</div>
<div class="bottom" >
<input type="text" required placeholder="Name on Card " id="name" >
</div>
<div class="names" >
<span>Card Number</span>
</div>
<div class="bottom" >
<input type="Number" required placeholder="Card Number" id="card_number" >
</div>
<div class="names" >
<span>Expiry</span>
</div>
<div class="bottom" >
<input type="date" required placeholder="Card Number" id="card_number" >
</div>
<div id="state_div" >
<div>
<div class="names" >
<span>Enter CVV</span>
</div>
<div class="city_div" >
<input type="number" required placeholder="3 digits on back" id="cvv" class="font" >
</div>
</div>
<div>
<div class="names" >
<span>ZIP Code</span>
</div>
<div class="state_div" >
<input type="number" required placeholder="enter your zip code" id="zip" class="font" >
</div>
</div>
</div>
<div id="submitdiv" >
<input onclick="done()" type="submit" id="submit" value="Complete your Purchase" >
</div>
</form>
</div>
</body>
</html>
<script>
function boxer(){
let a=document.getElementById("checkbox")
let text=document.getElementById("text");
if(a.checked===true){
text.style.display="block";
}
else{
text.style.display="none";
}
}
let key=JSON.parse(localStorage.getItem("details"))||[];
// console.log(key);
function dhokha(e){
let form=document.getElementById("form");
let email=form.email.value;
let password=form.input1.value;
console.log(email,password)
e.preventDefault();
for(let i=0;i<key.length;i++){
if(key[i].email===email){
if(key[i].password===password){
window.location.href="index.html";
}
}
}
}
function done(){
event.preventDefault(event);
alert("Payment completed! thanks for coming")
window.location.href="index.html"
}
</script>