ThreeDS configure()

configure()

Configuration method for initializing the API. Please note this method should be called only once for the page load. After calling this method, API will provide configuration values as member variables.

Default wsVersion in the absence of a user provided configuration: 59

Default userLanguage in the absence of a user provided configuration: en-US


Usage

ThreeDS.configure(threedsConfig);


Example


ThreeDS.configure({
    merchantId: "TESTMERCHANT",
    sessionId: "SESSION0002899787259G30902270H6",
    containerId: "ABC",
    callback: function() {
        if (ThreeDS.isConfigured())
            console.log("Done with configure");
    },
    configuration: {
        userLanguage: "en-US",
        wsVersion: 59
    }
});
  

Arguments

threedsConfig Object REQUIRED

Configuration values.

merchantId String REQUIRED

Merchant Id.

sessionId String REQUIRED

Hosted Session Id created for this session.

containerId String

The <div> id in your html where the API will inject a hidden iframe.

callback Function REQUIRED

A function that will be invoked once the API has been initialized.

configuration JSON REQUIRED

JSON value supporting data elements like userLanguage, REST API version (wsVersion).

userLanguage String

A language identifier or IETF language tag to control the language of the payment page displayed to the payer. For example, 'en_US', es, 'fr-CA'. By default, the language is 'en_US'.

wsVersion Number REQUIRED

The Web Services API version that you submitted the request in.


Return Value

None