Rupay configure()

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: 83

Default userLanguage in the absence of a user provided configuration: en-US


Usage Copied to clipboard

Rupay.configure(rupayConfig)


Example Copied to clipboard

Rupay.configure({
    merchantId: "TESTMERCHANT",
    sessionId: "SESSION0002899787259G30902270H6",
    containerId: "ABC",
    callback: function() {
        if (Rupay.isConfigured())
            console.log("Done with configure");
    },
    configuration: {
        userLanguage: "en-US",
        wsVersion: 83
    }
});
  

Arguments Copied to clipboard

rupayConfig Copied to clipboard Object REQUIRED

Configuration values.

merchantId Copied to clipboard String REQUIRED

Merchant Id.

sessionId Copied to clipboard String REQUIRED

Hosted Session Id created for this session.

containerId Copied to clipboard String

The <div> id in your html where the API will inject a hidden iframe.

callback Copied to clipboard Function REQUIRED

A function that will be invoked once the API has been initialized.

configuration Copied to clipboard JSON REQUIRED

JSON value supporting data elements like userLanguage, REST API version (wsVersion).

userLanguage Copied to clipboard String

A language identifier or IETF language tag to control the language of the payment page displayed to the payer. For example, 'en_US', es, 'fr-CA'. By default, the language is 'en_US'.

wsVersion Copied to clipboard Number REQUIRED

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


Return Value Copied to clipboard

None