braintree-web/data-collector

Members

(static) VERSION :string

The current version of the SDK, i.e. 3.11.1.

Source:

Methods

(static) create(options, callbackopt) → {Promise|void}

Creates a DataCollector instance. Requires advanced fraud protection to be enabled in the Braintree gateway. Contact our support team to configure your Kount ID.

Parameters:
Name Type Attributes Description
options object

Creation options:

Properties
Name Type Attributes Description
client Client

A Client instance.

kount boolean <optional>

If true, Kount fraud data collection is enabled.

paypal boolean <optional>

If true, PayPal fraud data collection is enabled.

callback callback <optional>

The second argument, data, is the DataCollector instance.

Source:
Example
var createClient = require('braintree-web/client').create;
var createDataCollector = require('braintree-web/data-collector').create;

createClient({
  authorization: CLIENT_AUTHORIZATION
}, function (clientErr, clientInstance) {
  if (err) {
    // handle client error
    return;
  }
  createDataCollector({
    client: clientInstance,
    kount: true
  }, function (dataCollectorErr, dataCollectorInstance) {
    if (dataCollectorErr) {
      // handle data collector error
      return;
    }
    // data collector is set up
  });
});