-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathpayment.html
60 lines (43 loc) · 1.78 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
<!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>
<link rel="stylesheet" href="payment.css">
</head>
<body>
<div class="main">
<form >
<h2>Welcome To Payment Gateway </h2>
<input type="text" name="" id="user" placeholder="Card Holder Name"><br><br>
<input type="text" name="" id="card" placeholder="Card Number"><br><br>
<input type="text" name="" id="expiry" placeholder="MM/YYYY" size="7" minlength="7" maxlength="7"><br><br>
<input type="password" name="" id="cvv" placeholder="●●●" size="1" minlength="3" maxlength="3"><br><br>
<input type="submit" id="pay" value="Pay">
</form>
<span></span>
</div>
</body>
</html>
<script>
// document.getElementById("form").addEventListener("submit",paymentConf);
// function paymentConf(event){
// window.location.href = "paymentStatus.html"
// }
document.querySelector("form").addEventListener("submit", payment);
function payment(event) {
event.preventDefault();
var user = document.querySelector("#user").value;
var card = document.querySelector("#card").value;
var expiry = document.querySelector("#expiry").value;
var cvv = document.querySelector("#cvv").value;
if (user.length == 0 || card.length == 0 || expiry.length == 0 || cvv.length == 0) {
alert("Please Fill All The Filled")
}
else {
window.location.href = "paymentStatus.html";
}
}
</script>