-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathpayment.html
90 lines (90 loc) · 2.52 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
<!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>paymentPage</title>
<style>* {
margin: 0;
padding: 0;
font-family: sans-serif;
}.container {
min-height: 100vh;
background-color: #222F3F
;
display: flex;
justify-content: center;
align-items: center
}.card { width: 30%;
background-color: white;
border-radius: 10px;
padding: 20px 15px
}form {
display: grid;
grid-template-columns: auto;
grid-template-rows: repeat(8,1fr);
gap: 8px;
font-weight: 530;
}
h3{
margin: auto;
text-align: center;
margin-bottom: 20px;
}
form>input { margin-top: -7px;
margin-bottom: 9px;
border-radius: 6px;
border: rgb(47, 2, 89) solid 3px ;
}
#submit {
margin-top: 20px;
border-radius: 6px;
font-size: large;
font-weight: bold;
background-color: rgb(49, 6, 90);
color: white;
}
</style>
</head>
<body>
<div class="container">
<div class="card">
<div class="top">
<h3>Enter Card Details</h3>
<hr>
</div> <form id="form">
<label for="">Card Number</label>
<input type="text" id="cardNumber" placeholder="0000 0000 0000 0000 :credit_card: "
minlength="16" maxlength="16" size="16">
<label for="">Expiry date</label>
<input type="date" id="expdate" placeholder="mm/yyyy" >
<label for="">CVV</label>
<input type="number" id= 'cvv' placeholder="000"
minlength="3" maxlength="3" size="3">
<label for="">Card Holder Name</label>
<input type="text" placeholder="Enter cardholder's full name" >
<hr>
<input id="submit" type="submit">
</form> </div>
</div>
</body>
</html>
<script>
let form = document.querySelector('form')
form.addEventListener('submit', mypay);
function mypay(event)
{ event.preventDefault();
let cardnumber = form.cardNumber.value
let expdate = form.expdate.value
let cvv = form.cvv.value
if(cardnumber=='1234567812345678'&&expdate=='2025-11-11'&&cvv==123)
{
alert('an OTP has been sent to your number')
window.location.href = "otp.html";
}
else{
alert('Wrong card credentials')
}
}
</script>