Usage
Checkout.configure(configuration);
Example
Checkout.configure({
session: {
id: '<your_session_id>'
}
});
Arguments
configuration
Object
COMPULSORY
The configuration object describes the merchant, customer, payment, and checkout appearance and behaviour.
Fields in the object can contain literal values or a function that returns the value. Functions will be invoked before showing the payment interface.
Validation problems with the configuration object will be delivered to the error callback.
session
Object
=
OPTIONAL
id
String
=
OPTIONAL
Identifier of the payment session containing values for any of the request fields to be used in this operation.
Values contained in the session will override values provided by the request.
Data consists of ASCII characters
version
String
=
OPTIONAL
Use this field to implement optimistic locking of the session content.
Do this if you make business decisions based on data from the session and wish to ensure that the same data is being used for the request operation.
To use optimistic locking, record session.version when you make your decisions, and then pass that value in session.version when you submit your request operation to the gateway.
If session.version provided by you does not match that stored against the session, the gateway will reject the operation with error.cause=INVALID_REQUEST.
See
Making Business Decisions Based on Session Content.
Data consists of ASCII characters
Return Value
None