-
Notifications
You must be signed in to change notification settings - Fork 2
/
Copy pathpayment.html
119 lines (114 loc) · 3.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
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
<!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>
#pay{
width: 450px;
margin: auto;
padding: 40px;
box-shadow: rgba(100, 100, 111, 0.2) 0px 7px 29px 0px;
background-color: antiquewhite;
margin-top: 100px;
}
#cv{
display: flex;
justify-content: space-between;
}
#cv>input{
width: 150px;
height: 20px;
font-size: 20px;
}
input{
border: none;
border-bottom: 1px solid black;
font-style: italic;
padding: 0px 5px;
}
#num>input,#name>input{
width: 100%;
height: 20px;
font-size: 25px;
}
#name>input{
margin: 20px 0px;
}
button{
text-align: center;
width: 100%;
margin-top: 20px;
padding: 5px 30px;
background-color: aqua;
color: #ffff;
border: 1px solid aqua;
cursor: pointer;
}
input:focus{
outline: none;
}
span{
font-style: italic;
}
#head{
text-align: center;
margin-top: -20px;
}
h1{
color: blueviolet;
text-align: center;
}
</style>
</head>
<body>
<h1>PAYMENT </h1>
<div id="pay">
<div id="head">
<h3>GEARBEST<br><span>we happy to serving our service</span></h3>
</div>
<div id="num">
<input type="number" placeholder="Enter your card number" id="myNum">
</div>
<div id="name">
<input type="text" placeholder="Enter your name" id="myname">
</div>
<div id="cv">
<input type="text" placeholder="Expiary date" id="date" required>
<input type="number" placeholder="Enter your cvv" id="cvv" required>
</div>
<div>
<button id="btn">Pay</button>
</div>
</div>
</body>
</html>
<script>
document.querySelector("#btn").addEventListener("click",collectpayment);
// <<<<<<< HEAD
let mydata=JSON.parse(localStorage.getItem("paymentData"))||[];
function collectpayment(){
let obj={
name:"Ankur Kumar Chauhan",
number:"1212454578783636",
expdate:"05/2025",
cvv:"456"}
console.log(obj.number);
let otp=[1,2,3,4];
if(document.getElementById("myname").value==obj.name || document.getElementById("myNum").value==obj.number || document.getElementById("date").value==obj.expdate || document.getElementById("cvv")==obj.cvv){
window.location.href="enterotp.html"
}else{
alert("credential does not match");
}
function collectpayment(){
window.location.href="enterotp.html";
}
// >>>>>>> 9678b37ca3eafe2b14c880f9a3a8ab1c8c98a1c6
document.getElementById("myNum").value="";
document.getElementById("myname").value="";
document.getElementById("date").value="";
document.getElementById("cvv").value="";
}
</script>