-
Notifications
You must be signed in to change notification settings - Fork 3
/
payment.html
555 lines (455 loc) · 11.8 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
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
531
532
533
534
535
536
537
538
539
540
541
542
543
544
545
546
547
548
549
550
551
552
553
554
555
<!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</title>
<style>
body {
font-family: FavoritFreshly, Helvetica Neue, Helvetica, Arial, sans-serif;
font-weight: 500;
color: #303030;
background-color: #fffdf7;
}
/* nav bar start here */
#type {
width: 240px;
height: 25px;
margin-top: 0%;
/* border: 1px dashed red; */
display: flex;
margin: auto;
margin-bottom: 10px;
}
#type>div {
/* border: 1px solid black; */
width: 120px;
height: 100%;
margin: auto;
}
#consum {
width: 52%;
}
#busi {
width: 90%;
}
#navpar {
width: 100%;
/* background-color: rgb(255, 255, 255); */
/* position: fixed; */
/* top: 0px; */
/* border: 1px solid red; */
background-color: #fffdf7;
z-index: 1;
}
#navbar {
height: 50px;
/* border: dashed black 1px; */
width: 75%;
margin: auto;
display: flex;
justify-content: space-between;
margin-bottom: 15px;
}
#navbar>div {
height: 45%;
/* border: 1px solid red; */
margin-top: 15px;
font-family: Favoritfreshly, sans-serif;
font-weight: 700;
}
#logofornav {
width: 100px;
margin-left: 10px;
}
#navitem {
display: flex;
width: auto;
}
#navitem>div {
/* border:1px solid green; */
margin: 0px 20px;
font-size: 14px;
}
#navitem>div:hover {
color: rgb(49, 103, 255);
}
#logsign {
height: 55%;
display: flex;
margin-top: 0px;
justify-content: center;
}
#logsign>div {
margin-right: 5px;
}
#logsign>button {
height: 30px;
background-color: rgb(49, 103, 255);
color: rgb(255, 255, 255);
margin: 0px 5px;
border: 0px;
height: auto;
}
/* nav bar ends here */
#container {
height: 1250px;
width: 650px;
box-shadow: rgba(149, 157, 165, 0.2) 0px 8px 24px;
/* margin-left: 210px; */
margin-top: -10px;
background-color: #ffffff;
margin:auto;
}
p {
font-size: 15px;
}
h4 {
margin-top: 30px;
font-size: 25px;
/* margin-left: 210px; */
margin-left:615px;
}
h6 {
font-size: 15px;
}
#head {
display: flex;
justify-content: space-around;
}
h5 {
font-size: 20px;
margin-left: -50px;
}
a {
font-size: 17px;
color: #3167ff;
margin-top: 36px;
margin-left: 100px;
margin-right: -20px;
}
#head2 {
display: flex;
justify-content: space-around;
line-height: 0px;
margin-top: -20px;
}
#first {
font-size: 15px;
margin-left: -110px;
}
#last {
font-size: 15px;
margin-left: -112px;
}
#name1 {
margin-left: -110px;
margin-top: -5px;
}
#name2 {
margin-left: -110px;
margin-top: -5px;
}
#full {
font-size: 15px;
margin-left: 50px
}
#name3 {
margin-top: -25px;
margin-left: 50px;
}
#ad1 {
margin-top: -25px;
margin-left: 50px;
}
#ad2 {
margin-top: -25px;
margin-left: 50px;
}
#location {
display: flex;
justify-content: space-around;
margin-top: -25px;
}
#city {
margin-left: -27px;
}
#town {
margin-left: -26px;
margin-top: -25px;
}
#state {
margin-top: -25px;
}
#pin {
margin-top: -25px;
}
#h6 {
margin-left: 50px;
margin-top: 15px;
}
#contact {
margin-left: 50px;
margin-top: -25px;
}
#request {
margin-left: 48px;
}
#email {
margin-left: 48px;
margin-top: -25px;
}
hr {
width: 87%;
margin-top: 40px;
color: #717171;
}
#pay {
margin-left: 45px;
}
ul {
margin-top: -20px;
line-height: 30px;
}
li {
cursor: pointer;
margin-left: 22px;
}
#credit {
margin-left: 39px;
margin-top: 20px;
}
#num {
margin-left: 39px;
height: 30px;
width: 400px;
margin-top: -30px;
}
::placeholder {
font-size: 16px;
}
#bank {
display: flex;
justify-content: space-around;
margin-left: -10px;
}
#date {
margin-left: 0px;
}
#expiry {
margin-left: 0px;
height: 30px;
width: 250px;
margin-top: -40px;
}
#cvc {
height: 30px;
width: 200px;
margin-top: -50px;
}
#show {
display: flex;
justify-content: space-between;
}
#total {
margin-left: 40px;
font-size: 18px;
}
#cal {
margin-right: 50px;
font-size: 18px;
}
#submit {
height: 50px;
width: 570px;
text-align: center;
background-color: #3167ff;
color: white;
font-weight: bold;
font-size: 20px;
margin-left: 40px;
border: 0px;
margin-top: -20px;
}
#italia {
color: #717171;
font-style: italic;
font-size: 90%;
font-weight: 300;
text-align: center;
margin-top: 20px;
}
#submit:hover {
background-color: #1e4ed1;
transform: translate(2px,-2px);
}
#Pay{
margin-left: 50px;
}
#Credit{
margin-left: 50px;
margin-top: 10px;
}
#deliveyD
{
margin-top: -5px;
margin-left: 50px;
}
</style>
</head>
<body>
<!-- navbar start -->
<!-- type of website bar -->
<div id="navpar">
<div id="type">
<div id="consumersite"> <img id="consum" onclick="window.location.href='index.html'"
src="https://assets-global.website-files.com/5d03b4e130118314af624b20/5fc4feea074f5b86a6c62285_freshly-logo-R.svg"
alt=" Freshly logo"></div>
<div id="businesssite"> <img id="busi"
src="https://assets-global.website-files.com/5d03b4e130118314af624b20/5f7b2e54745410836cfa3955_bizlogo_main-07.svg"
alt="Business"> </div>
</div>
<!-- type of website bar ends -->
<div id="navbar">
<div> <img id="logofornav" onclick="window.location.href='index.html'"
src="https://assets-global.website-files.com/5d03b4e130118314af624b20/5fc4feea074f5b86a6c62285_freshly-logo-R.svg"
alt=" Freshly logo"> </div>
<div id="navitem">
<div onclick="window.location.href='plans and menu.html'">Plans & Menu</div>
<div onclick="window.location.href='how_it_works.html'">How it Works</div>
<div onclick="window.location.href='Gifts.html.html'">Gifts</div>
<div>Refer a friend</div>
<div onclick="window.location.href='help.html'">Help</div>
</div>
<!-- login and signup button -->
<div id="logsign">
<div onclick="window.location.href='login.html'">Login</div>
<button onclick="window.location.href='signUp.html'">Sign Up</button>
</div>
</div>
</div>
<!-- nav bar ends -->
<h4>Confirm Your Order Details</h4>
<div id="container">
<div id="head">
<h5>Delivery Address</h5>
<a href="">Change</a>
</div>
<div id="head2">
<div>
<h6 id="first">First Name</h6>
<p id="name1">Pratik</p>
</div>
<div>
<h6 id="last">Last Name</h6>
<p id="name2">Paul</p>
</div>
</div>
<h6 id="full">Delivery date</h6>
<p id="deliveyD">DD/MM/YY</p>
<h6 id="full">Full Name For Delivery Address</h6>
<p id="name3">Pratik Paul</p>
<h6 id="full">Address Line 1</h6>
<p id="ad1">GuruSankalp</p>
<h6 id="full">Address Line 2</h6>
<p id="ad2">C wing</p>
<div id="location">
<div>
<h6 id="city">City</h6>
<p id="town">Kalamboli</p>
</div>
<div>
<h6>State</h6>
<p id="state">Maharashtra</p>
</div>
<div>
<h6>Pin Code</h6>
<p id="pin">410218</p>
</div>
</div>
<h6 id="h6">Phone</h6>
<p id="contact">8828375460</p>
<h6 id="request">Email(we require your email to send you receipts and order updates)</h6>
<p id="email">paulpratik6@gmail.com</p>
<hr>
<h5 id="pay">Payment Info</h5>
<input type="radio" id="Pay" name="select payment" value="PayPal">
<label for="PayPal">PayPal</label><br>
<input type="radio" id="Credit" name="select payment" value="Credit Card">
<label for="Credit Card">Credit Card</label><br>
<hr>
<h6 id="credit">Credit Card Number</h6>
<input type="text" id="num" placeholder=" 1234 1234 1234 1234 ">
<div id="bank">
<div>
<h6 id="date">Expiry Date</h6>
<input type="text" id="expiry" placeholder=" MM/YY">
</div>
<div>
<h6>CVV</h6>
<input type="text" id="cvc" placeholder=" CVV">
</div>
</div>
<div id="show">
<h6 id="total">Total</h6>
<h6 id="cal">$450</h6>
</div>
<input value="Submit Order" type="submit" id="submit" />
<p id="italia">You can skip and cancel anytime*</p>
</div>
</body>
</html>
<script>
var bankDetails = [{ card: 1000200030004000, expiry: 1121, cvc: 123 },
{ card: 5000600070008000, expiry: 0822, cvc: 456 },
];
localStorage.setItem("data", JSON.stringify(bankDetails));
var details = JSON.parse(localStorage.getItem("data"));
document.querySelector("#submit").addEventListener("click", formSubmit);
function formSubmit(event) {
event.preventDefault();
var card = document.querySelector("#num").value;
var expiry = document.querySelector("#expiry").value;
var cvc = document.querySelector("#cvc").value;
var flag = false;
for (var i = 0; i < details.length; i++) {
if (details[i].card == card && details[i].expiry == expiry && details[i].cvc == cvc) {
flag = true;
}
}
if(card.length!=16){
alert("Invalid Card Number");
}
else if(expiry.length<3){
alert("Invalid Expiry Date");
}
else if(cvc.length!=3){
alert("Invalid CVV Number");
}
else if (flag == false) {
alert("Invalid Information!")
}
else {
alert("Your Order is Placed Successfully!");
window.location.href='index.html';
}
}
arr2 = JSON.parse(localStorage.getItem("chkdata"))
arr2.map(function(elem){
document.querySelector("#name1").textContent = elem.fname;
document.querySelector("#name2").textContent = elem.lname;
document.querySelector("#name3").textContent = elem.fulname
document.querySelector("#ad1").textContent = elem.adres1
document.querySelector("#ad2").textContent = elem.adres2
document.querySelector("#town").textContent = elem.selstate
document.querySelector("#state").textContent = elem.pin
document.querySelector("#pin").textContent = elem.city
document.querySelector("#contact").textConten = elem.phonenum
document.querySelector("#email").textContent = elem.emeil
document.querySelector("#cal").textContent = elem.total
});
var dDate = JSON.parse(localStorage.getItem("dDate"));
console.log(dDate);
document.getElementById("deliveyD").textContent = dDate;
</script>