-
Notifications
You must be signed in to change notification settings - Fork 5
/
payment.html
96 lines (95 loc) · 2.3 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
<!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 Gateway</title>
<!-- <link rel="stylesheet" href="./styles.css" /> -->
<style>
input {
margin-top: 3px;
padding: 15px;
font-size: 16px;
width: 100%;
border-radius: 3px;
border: 1px solid #dcdcdc;
}
label {
padding-bottom: 5px;
font-size: 13px;
}
.form-container {
display: grid;
grid-column-gap: 10px;
grid-template-columns: auto auto;
grid-template-rows: 90px 90px 90px;
grid-template-areas: "name name" "number number" "expiration security";
max-width: 400px;
padding: 20px;
color: #707070;
}
.field-container {
position: relative;
}
.field-container input {
-webkit-box-sizing: border-box;
box-sizing: border-box;
}
</style>
</head>
<body>
<h1>Please do not click refresh button!</h1>
<div class="form-container">
<div class="field-container">
<label for="name">Name</label>
<input id="name" maxlength="20" type="text" required />
</div>
<div class="field-container">
<label for="cardnumber">Card Number</label>
<input
id="cardnumber"
type="text"
pattern="[0-9]*"
inputmode="numeric"
required
/>
</div>
<div class="field-container">
<label for="expirationdate">Expiration (mm/yy)</label>
<input
id="expirationdate"
type="text"
pattern="[0-9]*"
inputmode="numeric"
required
/>
</div>
<div class="field-container">
<label for="securitycode">Security Code</label>
<input
id="securitycode"
type="text"
pattern="[0-9]*"
inputmode="numeric"
required
/>
</div>
<input type="button" value="Place Order" onclick="pay()" />
</div>
<script>
function pay() {
// console.log(`I am clicked`);
document.getElementById("name").value = "";
document.getElementById("cardnumber").value = "";
document.getElementById("expirationdate").value = "";
document.getElementById("securitycode").value = "";
setTimeout(() => {
alert(
`Your order is successfully placed. You can close this window.`
);
}, 3000);
}
</script>
</body>
</html>