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.
Usage Copied to clipboard
Risk.configure(configuration, callback);
Example Copied to clipboard
Risk.configure({ merchantId: "TESTMERCHANT", sessionId: "SESSION0002899787259G30902270H6", apiVersion: 56, riskProvider: "NUDETECT" }, function(response) { // Handle Risk.configure() response */ console.log(response.message) // Configuration message: 'Risk SDK is configured successfully.' console.log(response.status) // Configuration status: 'SUCCESS' or 'ERROR' } );
Arguments Copied to clipboard
Configuration values.
Merchant Id.
Identifier of the payment session.
The Web Services API version that you submitted the request in. If not provided, default version is 56.
Name of the risk provider. If not provided, SDK will make a PaymentOptionsInquiry call to determine supported risk provider.
Callback function invoked upon completion of the Risk.configure() method. Once the configuration is completed the callback will be invoked with response object as an argument. Object will have message and status properties which will indicate whether configuration was successful or failed due to an error.
Return Value Copied to clipboard
None