Developer Guide
Agent Javascript
FraudLabs Pro agent javascript is a lightweight javascript providing merchants the capability to have in-depth analysis of an order transaction. For example, the device validation feature, which will not function without the embedded javascript.
You do not need to place the script in every single web pages, but only the page where the payment or ordering taking place.
Agent Javascript Code
Copy the below javascript code and paste it to the footer file or checkout page.
<script>
(function(){
function s() {
var e = document.createElement('script');
e.type = 'text/javascript';
e.async = true;
e.src = ('https:' === document.location.protocol ? 'https://' : 'http://') + 'cdn.fraudlabspro.com/s.js';
var s = document.getElementsByTagName('script')[0];
s.parentNode.insertBefore(e, s);
}
(window.attachEvent) ? window.attachEvent('onload', s) : window.addEventListener('load', s, false);
})();
</script>
The above javascript will automatically learn the device that your clients used to visit your website. If you integrated our service using REST API, you are required to supply the flp_checksum information during the order/screen API call for device validation. The flp_checksum can be retrieved from the client's cookie data under the cookie name flp_checksum.
If you were using the ready made module in an e-commerce platform, such as Magento, please visit the respective module page for the Agent Javascript installation instructions.