-
Notifications
You must be signed in to change notification settings - Fork 2
/
checkout.html
198 lines (175 loc) · 5.85 KB
/
checkout.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
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
<!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://www.tatacliq.com/favicon.ico" type="png">
<title>Checkout</title>
<style>
*{
margin: 0;
padding: 0;
box-sizing: border-box;
font-family: 'Poppins', sans-serif;
border-radius: 13px;
}
body{
width: 100%;
height: 100vh;
display: flex;
justify-content: center;
align-items: center;
}
.container{
width: 750px;
height: 500px;
border: 1px solid;
background-color: white;
display: flex;
flex-direction: column;
padding: 40px;
justify-content:space-around;
box-shadow: inset 0 -3em 3em rgba(0,0,0,0.1),
0.3em 0.3em 1em rgba(0,0,0,0.25);
}
.container h1{
text-align: center;
color: #00a699;
background-color: #ECEFF1;
}
.first-row{
display: flex;
}
.owner{
width: 100%;
margin-right: 40px;
}
.input-field{
border: 1px solid #999;
}
.input-field input{
width: 100%;
border:none;
outline: none;
padding: 10px;
}
.selection{
display: flex;
justify-content: space-between;
align-items: center;
}
.selection select{
padding: 10px 20px;
}
button{
background-color: #00a699;
color: white;
text-align: center;
text-transform: uppercase;
text-decoration: none;
padding: 10px;
font-size: 18px;
transition: 0.5s;
width: 50%;
margin-left: 150px;
}
button:hover{
background-color: dodgerblue;
}
.cards img{
width: 100px;
margin: 1px;
padding: 2px;
height: 50px;
}
</style>
</head>
<body>
<div id="all">
<div class="container">
<h1>Checkout</h1>
<div class="first-row">
<div class="owner">
<h3>Card Holder's Name</h3>
<div class="input-field">
<input type="text" placeholder="Enter Your Name Here">
</div>
</div>
<div class="cvv">
<h3>CVV</h3>
<div class="input-field">
<input type="password" placeholder="Enter Number">
</div>
</div>
</div>
<div class="second-row">
<div class="card-number">
<h3>Card Number</h3>
<div class="input-field">
<input type="text" placeholder="Enter Your Card Number Here">
</div>
</div>
</div>
<div class="third-row">
<h3>Valid Upto</h3>
<div class="selection">
<div class="date">
<select name="months" id="months">
<option value="Jan">Jan</option>
<option value="Feb">Feb</option>
<option value="Mar">Mar</option>
<option value="Apr">Apr</option>
<option value="May">May</option>
<option value="Jun">Jun</option>
<option value="Jul">Jul</option>
<option value="Aug">Aug</option>
<option value="Sep">Sep</option>
<option value="Oct">Oct</option>
<option value="Nov">Nov</option>
<option value="Dec">Dec</option>
</select>
<select name="years" id="years">
<option value="2025">2025</option>
<option value="2024">2024</option>
<option value="2023">2023</option>
<option value="2022">2022</option>
<option value="2021">2021</option>
<option value="2020">2020</option>
<option value="2019">2019</option>
<option value="2018">2018</option>
<option value="2017">2017</option>
<option value="2016">2016</option>
<option value="2015">2015</option>
</select>
</div>
<div class="cards">
<img src="https://utils.imimg.com/payments/pwim_files/pwim_modes_v5.png" style="width: 80%;height: auto;max-width: 100%;margin-bottom: 20px;">
</div>
</div>
</div>
<button onclick="payment()">Pay Now</button>
</div>
</div>
</body>
</html>
<script>
function payment() {
let parent = document.getElementById("all");
parent.innerHTML = null;
setTimeout(function(el) {
let h1 = document.createElement("h1");
h1.setAttribute("class", "thank");
let h3 = document.createElement("h3");
h3.setAttribute("class", "msg");
let h3s = document.createElement("h3");
h3.setAttribute("class", "msg");
h1.textContent = "Your Order Placed Successfully";
h3.textContent = "Thank You For Purchasing From Us";
h3s.textContent =
"Your Order Id is: " + Math.floor(100000 + Math.random() * 900000);
parent.append(h1, h3, h3s);
localStorage.removeItem("cart");
}, 2000);
}
</script>