-
Notifications
You must be signed in to change notification settings - Fork 2
/
payment.html
207 lines (206 loc) · 5.81 KB
/
payment.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
199
200
201
202
203
204
205
206
207
<!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" />
<title>Payment page</title>
<!-- stylesheet -->
<link rel="stylesheet" href="checkout.css" />
<!-- font awesome -->
<link
rel="stylesheet"
href="https://use.fontawesome.com/releases/v5.15.4/css/all.css"
integrity="sha384-DyZ88mC6Up2uqS4h/KRgHuoeGwBcD4Ng9SiP4dIRy0EXTlnuz47vAwmeGwVChigm"
crossorigin="anonymous"
/>
</head>
<style>
.before-payment {
width: 100%;
display: flex;
flex-direction: column;
gap: 30px;
}
.info {
width: 100%;
display: flex;
flex-direction: column;
gap: 10px;
border: 1px solid #31313150;
padding: 15px 10px;
box-sizing: border-box;
border-radius: 15px;
}
.contact-info,
.address-info {
display: flex;
align-items: center;
padding: 5px 0;
box-sizing: border-box;
border-bottom: 1px solid #31313150;
padding-bottom: 10px;
}
.contact-info > div > a,
.address-info > div > a {
text-decoration: none;
color: #181811;
font-weight: 500;
}
.contact,
.address {
display: flex;
align-items: center;
width: 90%;
justify-content: flex-start;
gap: 20px;
}
.ship-method {
display: flex;
flex-direction: column;
gap: 20px;
}
.ship-method > h1 {
font-size: 30px;
font-weight: 400;
}
.contact > input,
.address > input {
width: 25px;
height: 25px;
}
.mini-container {
margin: 30px 0;
display: flex;
flex-direction: column;
gap: 30px;
}
.heading {
padding: 20px 0;
box-sizing: border-box;
}
.heading > h3 {
font-size: 25px;
font-weight: 400;
}
.heading > p {
font-size: 13px;
font-weight: 500;
color: gray;
}
.box {
padding: 20px 20px;
border: 1px solid #31313150;
border-radius: 15px;
display: flex;
flex-direction: column;
justify-content: space-between;
}
.box > div {
display: flex;
justify-content: flex-start;
gap: 30px;
padding: 10px;
box-sizing: border-box;
align-items: center;
}
.box > div > input {
width: 25px;
height: 25px;
}
.box > div > p {
font-size: 16px;
font-weight: 500;
color: #202020;
}
.box > div:nth-child(1) {
border-bottom: 1px solid #31313150;
}
.same > img {
width: 40%;
}
</style>
<body>
<div class="container"></div>
</body>
</html>
<script type="module">
import { appenditems, checkoutpage } from "../components/script.js";
let cart = JSON.parse(localStorage.getItem("cartitems"));
let container = document.querySelector(".container");
container.innerHTML = checkoutpage("Complete Order");
let maindiv = document.querySelector(".showcart");
appenditems(cart, maindiv);
document.querySelector(".return").addEventListener("click", () => {
window.location.href = "cart.html";
});
let data = JSON.parse(localStorage.getItem("orderinfo"));
console.log(data);
let template = document.querySelector(".verifybox");
template.innerHTML = `<div class="before-payment">
<div class="info">
<div class="contact-info">
<div class="contact">
<p>Contact</p>
<p>${data.email}</p>
</div>
<div><a href="checkout.html">Change</a></div>
</div>
<div class="address-info">
<div class="address">
<p>Ship to</p>
<p>${data.address}</p>
</div>
<div><a href="checkout.html">Change</a></div>
</div>
<div class="address-info">
<div class="address">
<p>Method</p>
<p>Prepaid-Net banking, UPI .Free</p>
</div>
<div><a href="verification.html">Change</a></div>
</div>
</div>
<div class="mini-container">
<div class="payment">
<div class="heading">
<h3>Payment</h3>
<p>All transactions are secure and encrypted.</p>
</div>
<div class="box">
<div class="same">
<input type="radio" name="address" value="shipping" id="" />
<img src="https://cdn.shopify.com/s/files/applications/e273f27d4c4fa65fc8e2af05e552f04e.png?height=24&1637057371" alt="" />
<img src="https://d33v4339jhl8k0.cloudfront.net/docs/assets/591c8a010428634b4a33375c/images/5c41352f042863543ccbf50a/file-cd0KY0dC6M.jpg" alt="" />
</div>
<div class="different">
<input type="radio" name="address" value="billing" id="" />
<p>Cash on Delivery</p>
</div>
</div>
</div>
<div class="billing-address">
<div class="heading">
<h3>Billing address</h3>
<p>Select the address that matches your card or payment method.</p>
</div>
<div class="box">
<div class="same">
<input type="radio" name="address" value="shipping" id="" />
<p>Same as shipping address</p>
</div>
<div class="different">
<input type="radio" name="address" value="billing" id="" />
<p>Use a different billing address</p>
</div>
</div>
</div>
</div>
</div>`;
document.querySelector(".return").addEventListener("click", () => {
window.location.href = "verification.html";
});
document.querySelector(".btndiv > button").addEventListener("click", () => {
window.location.href = "product.html";
});
</script>