-
Notifications
You must be signed in to change notification settings - Fork 4
Expand file tree
/
Copy pathpaynow.js
More file actions
22 lines (20 loc) · 853 Bytes
/
paynow.js
File metadata and controls
22 lines (20 loc) · 853 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
whvutil.autoLoad(function(context){
var cardnumberInput = document.getElementById("cardnumber");
var verificationInput = document.getElementById("cardverificationcode");
var expireMonthSelect = document.getElementById("expirymonth");
var expireYearSelect = document.getElementById("expiryyear");
var holderInput = document.getElementById("cardholder");
cardnumberInput.value = context.creditcardnumber;
verificationInput.value = context.creditcardcode;
var expireDate = new Date(context.creditcardexpire);
var m = expireDate.getMonth() + 1;
m = m < 10 ? '0' + m : m;
expireMonthSelect.value = m;
expireYearSelect.value = expireDate.getFullYear();
holderInput.value = context.cardholder;
chrome.storage.sync.set({
enableWhv: false
}, function(){
alert("Congratulations! You can click 'Pay now' to finish WHV application.");
});
});