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: 100
Usage Copied to clipboard
SRCi.configure(merchantId, merchantName, merchantUrl, sessionId, configuration, callback);
Example Copied to clipboard
SRCi.configure( "TESTMERCHANT", "Merchant Name", "https://www.mysite.com", "SESSION0002899787259G30902270H6", { wsVersion: 100, paymentOptions: [response from Payment Options Inquiry], }, function(response) { // Handle SRCi.configure() response } );
Arguments Copied to clipboard
Merchant's ID
Merchant's name
Merchant's URL
Hosted Session ID for the current session.
Configuration JSON object that supports data elements; for example, the REST API version or the response from a Payment Options Inquiry (JSON). Note that if you provide the paymentOptions value that includes the Payment Options Inquiry response, you will not have to make an additional WS API PAYMENT_OPTIONS_INQUIRY request.
If you do not include the paymentOptions value in the configuration argument, you must make an additional server side WS API PAYMENT_OPTIONS_INQUIRY request for available payment processing options.
var config = { wsVersion: 100, paymentOptions: [response from Payment Options Inquiry] };
Callback function invoked upon completion of the SRCi.configure() method.
Return Value Copied to clipboard
None