ThreeDSecure

ThreeDSecure

new ThreeDSecure(config)

Wrapper class for Braintree ThreeDSecure authentication flow

Parameters:
Name Type Description
config

The default authentication configuration

Version:
  • 1.0
Since:
  • 1.0
Author:
License:
Source:
See:

Extends

Members

allow3DSPaymentsOny :boolean

Set to true if integration accepts 3DS cards only

Type:
  • boolean
Since:
  • 1.0
Default Value:
  • false
Source:

bt_threeDSecure :Object

The instance to the Braintree ThreeDSecure object

Type:
  • Object
Since:
  • 1.0
Source:

frame3ds :Object

The 3DS authentication wrapper frame HTML elements as provided via the constructor's configuration

Type:
  • Object
Properties:
Name Type Description
bankFrame Object

The inner jQuery object that represents the 3DS bank frame body (eg. a DIV)

modal Object

The outer jQuery object that represents the 3DS bank modal frame (eg. a DIV)

hidden string

The CSS class name used to hide the 3DS bank frame

closeBtn Object

The jQuery object that represents the 3DS bank frame close button

Since:
  • 1.0
Source:

ignore3DSIfAVS :boolean

Overrides the ThreeDSecure#allow3DSPaymentsOny option: if non-3DS card but merchant has AVS rules then accept the payment. Hopefully it will be validated by the gateway.

Type:
  • boolean
Since:
  • 1.0
Default Value:
  • false
Source:

inputs :Object

The form inputs (here we need only access to amount field)

Type:
  • Object
Properties:
Name Type Description
amount string

The jQuery selector for the amount HTML element

Since:
  • 1.0
Source:

modules :Object

The external modules that this instance may uses as specified by constructor argument

Type:
  • Object
Since:
  • 1.0
Inherited From:
Default Value:
  • {}
Source:

(abstract) noop :function

An dummy no-operation callback function

Type:
  • function
Since:
  • 1.0
Inherited From:
Source:

onFailLiabilityShift :callback

Callback to notify when 3DS liability cannot be shifted to bank

Type:
  • callback
Since:
  • 1.0
Default Value:
Source:

onReady :callback

Callback to notify after the 3DS instance is created|ready

Type:
  • callback
Since:
  • 1.0
Default Value:
Source:

onUseAVSLiabilityShiftFailed :callback

Callback to notify when the AVS is tried due to 3DS liability shift failure

Type:
  • callback
Since:
  • 1.0
Default Value:
Source:

onUserClose :callback

Callback to notify when the user closes the 3DS popup

Type:
  • callback
Since:
  • 1.0
Default Value:
Source:

(constant) UNDEF :string

The "undefined" constant to be used while checking if the type of an object is undefined.

Type:
  • string
Since:
  • 1.0
Inherited From:
Default Value:
  • undefined
Source:
Example
if (myInstance.UNDEF !== typeof myVar) {...}

Methods

execModuleFn(name, fn, argsopt, thisArgopt)

Execute a given function within a helper external module

Parameters:
Name Type Attributes Description
name string

The module name which defines the called function

fn string

The called function name within the module given by name

args string | Array.<string> <optional>

The function argument or an array of arguments that are passed to the called function

thisArg object <optional>

The context in which the function is executed

Since:
  • 1.0
Inherited From:
Source:
Example
myInstance.execModuleFn('utils', 'parseError', err)

init()

Class initialization prototype. Normally the children classes call the init method as the last statement of the class constructor.

Since:
  • 1.0
Overrides:
Source:

is_available() → {boolean}

Check whether the 3DS is available

Since:
  • 1.0
Source:
See:
Returns:

Returns true if 3DS authentication is available, false otherwise

Type
boolean

removeFrame(error, paymentMethod)

The Remove the 3DS popup from our modal frame

Parameters:
Name Type Description
error Object

The Braintree error object passed to the function when called

paymentMethod string

The payment method passed that called this function

Since:
  • 1.0
Source:

verifyCard(data)

Launches the 3DS authentication popup

Parameters:
Name Type Description
data Object

An object that contains the paymentMethodInfo and the callback used while calling the Braintree's verifyCard method

Since:
  • 1.0
Source:
See:
Example
myInstance.verifyCard({ paymentMethodInfo: { nonce: "5wh9memdzg", type: "CreditCard" }, onSuccess:
         function(nonce) {}, onError: function() {}, onBypass3DS: function(response) {} });