Skip to content
This repository has been archived by the owner on Mar 4, 2024. It is now read-only.

Commit

Permalink
JavaScript version 0_1_20
Browse files Browse the repository at this point in the history
-------

* Add `encryption.monitor( 'number', myCardField);` to allow fraud prevention data gathering for nodom implementations.

* Improve entropy setup for older browsers
  • Loading branch information
Arnoud ten Hoedt committed Jul 4, 2017
1 parent 891e810 commit 7282748
Show file tree
Hide file tree
Showing 6 changed files with 111 additions and 34 deletions.
11 changes: 11 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -132,6 +132,11 @@ Note that this kind of integration may not be suitable for you, if you want to p
// AJAX call or different handling of the post data
}
// Enable behavior tracking on number and CVC fields
// Initiate before user interacts with the refeenced fields.
cseInstance.monitor( 'number', document.getElementById('numberField') );
cseInstance.monitor( 'cvc', document.getElementById('numberField') );
})();
</script>
```
Expand Down Expand Up @@ -166,6 +171,12 @@ var cseInstance = adyenEncrypt.createEncryption(key, options);

# Version History

JavaScript version 0_1_20
-------

* Add `encryption.monitor( 'number', myCardField);` to allow fraud prevention data gathering for nodom implementations.

* Improve entropy setup for older browsers

JavaScript version 0_1_19
-------
Expand Down
16 changes: 15 additions & 1 deletion adyen.encrypt.nodom.html
Original file line number Diff line number Diff line change
Expand Up @@ -9,6 +9,7 @@
<body>

<div id="adyen-encrypted-form">
<input type="button" onclick="addCardNumberField()" value="Create / monitor card number field" />
<input type="button" onclick="encryptExample()" value="Encrypt" />
<input type="button" onclick="validateExample()" value="Validate" />
</div>
Expand All @@ -18,7 +19,7 @@
<!-- N.B. Make sure the library is *NOT* loaded in the "head" of the HTML document -->


<script type="text/javascript" src="js/adyen.encrypt.nodom.min.js?0_1_18"></script>
<script type="text/javascript" src="js/adyen.encrypt.nodom.min.js?0_1_20"></script>
<script type="text/javascript">

// the public key
Expand Down Expand Up @@ -76,6 +77,19 @@

return postData;
}

function addCardNumberField ( ) {
var field = addCardNumberField.__field;
if ( field ) {
return;
}
field = document.createElement('input');
field.type = 'text';
field.placeHolder = "XXXX-XXXX-XXXX-XXXX";
document.body.appendChild ( field );
addCardNumberField.__field = field;
cseInstance.monitor ( "number", field );
}

function encryptExample() {
var generationTime = new Date().toISOString(); // Note:
Expand Down
4 changes: 2 additions & 2 deletions adyen.encrypt.simple.html
Original file line number Diff line number Diff line change
Expand Up @@ -50,8 +50,8 @@

<!-- How to use the Adyen encryption client-side JS library -->
<!-- N.B. Make sure the library is *NOT* loaded in the "head" of the HTML document -->
<script type="text/javascript" src="js/adyen.encrypt.min.js?0_1_18"></script>
<!-- <script type="text/javascript" src="js/addOns/adyen.cardtype.min.js?0_1_18"></script>-->
<script type="text/javascript" src="js/adyen.encrypt.min.js?0_1_20"></script>
<!-- <script type="text/javascript" src="js/addOns/adyen.cardtype.min.js?0_1_20"></script>-->

<script type="text/javascript">

Expand Down
53 changes: 36 additions & 17 deletions js/adyen.encrypt.js

Large diffs are not rendered by default.

59 changes: 46 additions & 13 deletions js/adyen.encrypt.nodom.js

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "adyen-cse-js",
"version": "0.1.19",
"version": "0.1.20",
"description": "Adyen javascript client-side encryption library",
"main": "js/adyen.encrypt.nodom.js",
"repository": {
Expand Down

0 comments on commit 7282748

Please sign in to comment.