What is?
To successfully implement Device Fingerprinting, an invisible 1-pixel image file and two scripts need to be placed in the <body> tag your checkout page (the page prior to directing the customer to Secure Acceptance) at the top of the main body. This ensures a 3-5 second window in which the code segments can complete the data collection necessary to create a fingerprint for the device making the order.
Below are the code segments for implementing Device Fingerprinting:
PNG Image
<p style="background:url(https://h.online-metrix.net/fp/clear.png?org_id=<org ID>&session_id=<x_login><session ID>&m=1)"></p> <img src="https://h.online-metrix.net/fp/clear.png?org_id=<org ID>&session_ id=<x_login><session ID>&m=2" alt="">
Flash Code
<object type="application/x-shockwave-flash" data="https://h.online-metrix.net/fp/ fp.swf?org_id=<org ID>&session_id=<x_login><session ID>" width="1" height="1" id="thm_fp"> <param name="movie" value="https://h.online-metrix.net/fp/fp.swf?org_id=<org ID>&session_id=<x_login><session ID>" /> <div></div> </object>
JavaScript Code
<script src="https://h.online-metrix.net/fp/check.js?org_id=<org ID>&session_ id=<x_login><session ID>" type="text/javascript"> </script>
The following attributes need to be placed within the italic bold sections of the above code segments:
<org ID>:
Test Ord ID: |
1snn5n9w |
||||
Live Ord ID: |
k8vif92e |
<x_login>: Merchants unique CyberSource merchant ID
< Session ID>: is a string variable (letters and numbers only) that must be unique for each merchant ID. Merchants can use any string that they are already generating, such as an order number or Web session ID. However, do not use the same uppercase and lowercase letters to indicate different session IDs.
Sample of how generate the fingerprint code in PHP:
$testMode = true;
$sessionID = uniqid(); //this value must be passed to the device_fingerprint_id variable of qpaypro
$orgID = $testMode ? '1snn5n9w' : 'k8vif92e';
$mechantID = 'visanetgt_qpay'; //this is just an example from sandbox environment
<!-- DEVICE FINGERPRINT CODE -->
<script src="https://h.online-metrix.net/fp/tags.js?org_id=<?php echo $orgID ?>&session_id=<?php echo $mechantID?><?php echo $sessionID ?>" type="application/javascript"></script>
<noscript>
<iframe style="width: 100px; height: 100px; border: 0; position: absolute; top: -5000px;"
src="https://h.online-metrix.net/fp/tags?org_id=<?php echo $orgID ?>&session_id=<?php echo $mechantID?><?php echo $sessionID ?>" >
</iframe>
</noscript>
<!-- END DEVICE FINGERPRINT CODE -->
Then you have to associate the $sessionID to the device_fingerprint_id variable to send to the API of QPayPro.