-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy pathbpm_content.js
59 lines (50 loc) · 1.24 KB
/
bpm_content.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
51
52
53
54
55
56
57
58
59
console.log("BPM (MELLAT) PAYMENT GATEWAY ON SHAPARAK");
function getPANElement()
{
let PAN0Element = document.getElementById("cardnumber");
return PAN0Element;
}
function getCVVElement()
{
let CVVElement = document.getElementById("inputcvv2");
return CVVElement;
}
function getExpDateMonthElement()
{
let ExpDateMonthElement = document.getElementById("inputmonth");
return ExpDateMonthElement;
}
function getExpDateYearElement()
{
let ExpDateYearElement = document.getElementById("inputyear");
return ExpDateYearElement;
}
function fillFormWithCartInfo
(
{
cart
}
)
{
getPANElement().value = cart.pan0 + cart.pan1 + cart.pan2 + cart.pan3;
getCVVElement().value = cart.cvv;
getExpDateMonthElement().value = cart.expDateMonth;
getExpDateYearElement().value = cart.expDateYear;
}
chrome.runtime.onMessage.addListener(
function
(
message,
sender,
sendResponse
)
{
let cart = message;
fillFormWithCartInfo(
{
cart: cart
}
);
console.log(message);
}
);