Open Banking configure()

configure()

Configuration method for initializing the API. Please note that 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: 63


Usage

OpenBanking.configure(merchantId, merchantName, amount, orderId, transactionId, sessionId, wsVersion);


Example

var config = {
  merchantId: 'TESTMERCHANT',
  merchantName: 'TESTMERCHANTNAME',
  amount: 'AMOUNT76.38',
  orderId: 'ORDER1230',
  transactionId: 'Trans12345',
  sessionId: 'SESSION0002899787259G30902270H6',
  wsVersion: '',
};

var callbackFunction = function(response) {
  // Successful response sample
  //{ status: 'SUCCESS', explanation: 'Configured successfully!' };
  console.log(response);
};

OpenBanking.configure(config, callbackFunction);
  

Arguments

merchantId String REQUIRED

The unique identifier issued to you by your payment provider.

merchantName String REQUIRED

Merchant Name.

amount Float REQUIRED

Order Amount.

orderId Int REQUIRED

A unique identifier for this order to distinguish it from any other order you create.

transactionId String REQUIRED

Unique identifier for this transaction to distinguish it from any other transaction on the order.

sessionId String REQUIRED

Hosted Session ID for the current session.

wsVersion Int REQUIRED

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

callback Object

Callback function invoked upon completion of the OpenBanking.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

None