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
Configuration details required to open an SRC window, with following required and optional parameters.
Order amount.
Order currency.
NONE
FULL
POSTAL_COUNTRY
Shipping preference with one of the following values: true or false. If not provided, the default value is set to false.
true
false
The email address of the customer.
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).
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.
Callback function triggered when a card is added and selected for either a new or existing user.
Callback function triggered due to an error encountered during the loading of SRC window.
Callback function triggered when flow is canceled or SRC window is closed.
Return Value Copied to clipboard
None