forked from kunalchandel4/teamDeskChampions
-
Notifications
You must be signed in to change notification settings - Fork 0
/
gateway.js
50 lines (35 loc) · 852 Bytes
/
gateway.js
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
let arr=[{
cardno:"123456789",
CVVnO:"234",
date:"3",
year:"15"
},
{
cardno:"222222222",
CVVnO:"123",
date:"3",
year:"15"
},
]
document.querySelector("#on").addEventListener("click",otp)
function otp(event){
// event.preventDefault()
let a=document.querySelector("#month").value
let b=document.querySelector("#cvvNo").value
let c=document.querySelector("#card").value
let d=document.querySelector("#year").value
// let d=document.querySelector("#name").value
let flag = "pakisthan" ;
for(let i=0 ; i<arr.length ; i++){
let el=arr[i] ;
if(el.cardno===c && el.CVVnO===b && el.date===a && el.year===d){
flag="indian" ;
}
}
if(flag==="indian"){
alert("PLS ENTER YOUR OTP")
window.location.href="otp.html"
}else{
alert("Error")
}
}