Kreiranje customer.browser objekta
Možete koristiti client-side JavaScript da prikupite podatke neophodne za 3D Secure autentifikaciju.
var CustomerBrowser = {
scan: function (e) {
var n = window.navigator,
i = {};
if (n.plugins && n.plugins.length)
for (var a = 0; a < n.plugins.length; a++) {
var r = n.plugins[a].name;
if (-1 != r.indexOf("Java(TM)")) {
i.java = !0;
break
}
if (-1 != r.indexOf("Java ")) {
i.java = !0;
break
}
}
e({
javascript_enabled: !0,
java_enabled: !!i.java,
cookies_enabled: !!n.cookieEnabled,
language: n.language,
screen_color_depth: window.screen.colorDepth,
screen_height: window.screen.height,
screen_width: window.screen.width,
time_zone: new Date().getTimezoneOffset(),
user_agent: n.userAgent,
platform: n.platform
})
}
};
! function (e, n) {
"function" == typeof define && define.amd ? define(["CustomerBrowser"], n) : "object" == typeof module && module.exports ? module.exports = CustomerBrowser : e.returnExports = e.CustomerBrowser
}("undefined" != typeof self ? self : this, function (e) {
return e
});