SRCi launchUI()

launchUI()

This method launches the SRCi flow.


Usage Copied to clipboard

SRCi.launchUI(config, payloadCallback, errorCallback, cancelCallback);


Example Copied to clipboard

var payloadCallback = function (correlationId, scheme) {
    console.log('Payload callback complete with correlation id %s and scheme %s', correlationId, scheme);
};

var errorCallback = function (error) {
    console.log('Error callback triggered with error ' + error);
};

var cancelCallback = function () {
    console.log('Cancel callback triggered');
};

SRCi.launchUI(
    {
        orderAmount: "100.00",
        orderCurrency: "USD"
    },
    payloadCallback,
    errorCallback,
    cancelCallback
);
  

Arguments Copied to clipboard

config Copied to clipboard Object REQUIRED

Configuration details required to open an SRC window, with following required and optional parameters.

orderAmount Copied to clipboard String REQUIRED

Order amount.

orderCurrency Copied to clipboard String REQUIRED

Order currency.

dpaBillingPreference Copied to clipboard Enumeration
Billing preference with one of the following values:
NONE
FULL
POSTAL_COUNTRY
collectShippingAddress Copied to clipboard Boolean

Shipping preference with one of the following values: true or false. If not provided, the default value is set to false.

JSON boolean values, JSON type Boolean
true
false
customerEmail Copied to clipboard String

The email address of the customer.

Ensures that the email address has a valid format.
interactionLocale Copied to clipboard String

A language identifier or IETF language tag to control the language of the payment interaction with the payer (e.g. en_US, es, fr-CA).

By default, the language is determined from the payer's browser. Supply a value for this field only if you wish to override the default behavior. If the language you specify is not supported by the gateway, the payment is displayed in the best matching language.
Data must be a language identifier or IETF language tag.
Min length:2
Max length:5
interactionCountry Copied to clipboard String

The ISO 3166 alpha-3 country code of the payer's country, to be used to present country-specific content to the payer during the interaction.

For a Secure Remote Commerce interaction, the payer's country is used to present country-specific content such as Terms and Conditions and you only need to provide it, if you wish to override the default payer country you have configured for Secure Remove Commerce interactions.
Data must consist of the characters A-Z, JSON type String
Min length:3
Max length:3
payloadCallback Copied to clipboard Function REQUIRED

Callback function triggered when a card is added and selected for either a new or existing user.

errorCallback Copied to clipboard Function REQUIRED

Callback function triggered due to an error encountered during the loading of SRC window.

cancelCallback Copied to clipboard Function REQUIRED

Callback function triggered when flow is canceled or SRC window is closed.


Return Value Copied to clipboard

None