forked from authnettest622/authnettest622.github.io
-
Notifications
You must be signed in to change notification settings - Fork 0
/
merchantPagev1.html
77 lines (70 loc) · 3.14 KB
/
merchantPagev1.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
<!DOCTYPE html>
<html>
<head>
<title>Test Accept JS</title>
<meta charset="utf-8" />
<meta name="viewport" content="width=device-width, initial-scale=1">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/css/bootstrap.min.css">
<script src="https://ajax.googleapis.com/ajax/libs/jquery/1.11.1/jquery.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/3.2.0/js/bootstrap.min.js"></script>
<script src="https://jstest.authorize.net/v1/Accept.js"></script>
<!-- Google Tag Manager -->
<script>(function(w,d,s,l,i){w[l]=w[l]||[];w[l].push({'gtm.start':
new Date().getTime(),event:'gtm.js'});var f=d.getElementsByTagName(s)[0],
j=d.createElement(s),dl=l!='dataLayer'?'&l='+l:'';j.async=true;j.src=
'https://www.googletagmanager.com/gtm.js?id='+i+dl;f.parentNode.insertBefore(j,f);
})(window,document,'script','dataLayer','GTM-NN44B8R');</script>
<!-- End Google Tag Manager -->
</head>
<body>
<!-- Google Tag Manager (noscript) -->
<noscript><iframe src="https://www.googletagmanager.com/ns.html?id=GTM-NN44B8R"
height="0" width="0" style="display:none;visibility:hidden"></iframe></noscript>
<!-- End Google Tag Manager (noscript) -->
<button type="submit" id="pay" class="btn btn-primary btn-lg btn-block" onclick="testEncrypt(event)">Pay</button>
<script type="text/javascript">
function testEncrypt(event) {
var options = {} , authData = {} , cardData = {};
cardData.cardNumber = '4111111111111111';//document.getElementById('cardNumber').value;
cardData.month = '11';//document.getElementById('MM').value;
cardData.year = '21';//document.getElementById('YY').value;
/*if ( document.getElementById('Zip').value != undefined)
{
cardData.zip = document.getElementById('Zip').value;
}
if (document.getElementById('cardCode').value != undefined)
{
cardData.cardCode = document.getElementById('cardCode').value;
}
if ( document.getElementById('fullName').value != undefined)
{
cardData.fullName = document.getElementById('fullName').value;
}*/
options.cardData = cardData;
/*if((document.getElementById('isFingerPrint').checked)) {
authData.fingerprint = buildFingerPrint();
}
authData.apiLoginID = document.getElementById('loginID').value;
if((document.getElementById('isClientKey').checked)){
authData.clientKey = document.getElementById('clientKey').value;
}*/
authData.apiLoginID='6D3e4qL9';
authData.clientKey='76DjAcVjyU93pzH6SzCDx8x4V6GqaqrFrkX8Ua65Rfnzz9b8Z46AP8wKSkQbqMxn';
options.authData = authData ;
options.clientId = "accept-js-v2";
var response = Accept.dispatchData(options, callbackMerchant);
}
function callbackMerchant(response) {
if (response.messages.resultCode === 'Error') {
//closeModal();
// populateErrorMessage(response);
} else {
document.getElementById('blob').value ='---'+response.opaqueData.dataDescriptor+ '\n'+'----'+response.opaqueData.dataValue;
console.log(document.getElementById('blob').value);
// createTransact(response.opaqueData.dataValue);
}
}
</script>
</body>
</html>