Radial Integration | 2016

Payments, Tax & Fraud > Fraud Management Processing > JavaScript Collector

JavaScript Collector

A customer's browser can capture environmental data that is useful for fraud analysis. The Radial risk team provides a script that can collect this data with a simple function call. The output of this function is a string representation of the data that should be sent in the RiskAssessmentRequest JSCData element.

Steps for using the script are as follows:

  1. Add the JavaScript Collector source file somewhere on your server.
  2. Include the source file in the header of the final "submit order" page.
    <script language="JavaScript"
       style="behavior:url(#default#clientcaps)"
       id="clientCapsRef"
       src="user-prefs.js">
    </script>
  3. Add a hidden field, named "userPrefs", to the final form on the "submit order" page.
    <form action="#" method="POST"
       onsubmit="return onSubmitForm();" >
       <input type="hidden" name="userPrefs" id="userPrefs"/>
       <input type="submit" name="submit" value="Submit" />
    </form>
  4. Call the "collect" method on form submission.
    function onSubmitForm() {
       fortyone.collect('userPrefs');
       return true;
    }
  5. Retrieve the string data in "userPrefs" on the server side and pass to the system that is responsible for sending the RiskAssessmentRequest.

An valid string result in userPrefs looks something like this:

TF1;013;5;6;8513;6%2C0%2C2600%2C0;6%2C0%2C2800%2C1106;6%2C0%2C3%2C531;6%
2C0%2C1%2C223;10%2C0%2C0%2C3646;5%2C5000%2C3130%2C0;6%2C0%2C1%2C223;5%2C0%2
C2918%2C1900;6%2C0%2C2799%2C99;5%2C0%2C3805%2C0;6%2C0%2C2800%2 C1106;4%2C74
%2C9273%2C0;10%2C1106;4%2C71%2C1968%2C1;5%2C0%2C3810%2C0;M ozilla;Microsoft %20
Internet%20Explorer;4.0%20%28compatible%3B%20MSIE%206.0%3B%20 Windows%20NT%205.1
%3B%20%7B1A4C98A0-46D1-CEB1-3917- 16D857BFF787%7D%3B%20.NET%20CLR%201.0.3705
%29;%3BSP1%3B;en- us;true;x86;true;Win32;en-us;Mozilla/4.0%20%28compatible%3B%20MSIE%206.0
%3B%20Windows%20NT%205.1%3B% 20%7B1A4C98A0-46D1-CEB1-3917- 16D857BFF787%7D
%3B%20.NET%20CLR%201.0.3705%29;en-us;windows-1252;orders- 3.net;96;96;true;0;true;true; 

 

Copyright © 2017 Radial. All rights reserved.