updateSession()
Sends a request to store the input from the hosted field into the session.
Usage
PaymentSession.updateSession(updateSessionCallback)
Example
PaymentSession.updateSession(function (updateSessionResponse) { // handle response });
JSON Example for Session Update Response
// status can be one of the following: ok, fields_in_error, system_error, request_timeout // An error response (fields_in_error) { "status": "fields_in_error", "session": { "id": "SESSION000218450948092491657986" }, "errors": { "cardNumber": "invalid", "securityCode": "invalid" }, version: "36" } // An error response (system_error) { "status": "system_error", "session": { "id": "SESSION000218450948092491657986" }, "errors": { "message": "System error message." }, "version": "36" } // An error response (request_timeout) { "status" : "request_timeout", "session": { "id": "SESSION000218450948092491657986" }, "errors": { "message": "Request timeout error message." }, "version": "36" } // An ok response { "status":"ok", "merchant": "TESTMERCHANT", "session": { "id": "SESSION000218450948092491657986" "updateStatus":"SUCCESS", "version":"e3f144ce02" }, "sourceOfFunds": { "provided": { "card": { "brand": "MASTERCARD", "expiry": { "month": "1", "year": "39" }, "fundingMethod": "DEBIT", "nameOnCard": "John Smith", "number": "512345xxxxxx8769", "scheme": "MASTERCARD" } }, "type": "CARD" }, "version": "36" }
Arguments
The function to handle the response from PaymentSession.updateSession( ) call. Defined as updateSessionCallback = function(updateSessionResponse).
The overall status of the PaymentSession.updateSession( ) request. Possible values are:
ok
fields_in_error
system_error
request_timeout
The version of the API used to retrieve the session details.
The errors object returned if the PaymentSession.updateSession( ) request failed to update the session successfully.
Indicates the name of the field that failed validation, returned only if the response status is fields_in_error.
Cause of the error. Possible values are:
missing
invalid
Example
// An error response (fields_in_error) "errors": { "cardNumber": "invalid", "securityCode": "invalid" },
The error message returned if the response status is system_error or request_timeout.
Example
// An error response (request_timeout) "errors": { "message": "Request timeout error message." }, // An error response (system_error) "errors": { "message": "System error message." },
Information on 3DSecure fields.
The Electronic Commerce Indicator returned by the card issuer in the authentication response message.
A collection of parameters required to build the HTML form that is redirected to the ACS.
1. Simple: submit the form generated by the gateway. In this case, only the htmlBodyContent parameter is required.
2. Customized: for those merchants who wish to customise the submission. In this case, the acsURL and paReq parameters will be required to formulate the submission.
Note: This field will only be returned in the event of a successful directory server lookup.
Indicates the option (Simple or Customized) used to generate the page that redirects the cardholder to the card Issuer's Access Control Server (ACS) for authentication.
CUSTOMIZED
A strategy to indicate that the user wishes to customize the responseSIMPLE
A simple interaction model where the response is complete and no user intervention is required.The URL to which you want to redirect the payer after completing the payer authentication process.
The details required by the system to generate the HTML page as specified in the Simple option.
The encoding required for the HTML returned in the response, through htmlBodyContent parameter.
ASCII
ISO_8859_1
Latin1UTF_8
Background color of the page, encoded in HEX, rendered in the cardholder's browser while the browser is waiting for the authentication to commence.
Text on the button that the cardholder can use to redirect the browser to the card Issuer's Access Control Server (ACS) if JavaScript is disabled for their browser.
Title of the page rendered in the cardholder's browser while the browser is waiting for the authentication to commence.
Indicates if the cardholder verification was successful.
The PARes message is the response received from the card Issuer's Access Control Server (ACS) after the cardholder has completed the authentication process.
AUTHENTICATION_ATTEMPTED
Authentication was attempted but the card issuer did not perform the authentication.AUTHENTICATION_NOT_AVAILABLE
An internal error occurred and Authentication is not currently available.AUTHENTICATION_SUCCESSFUL
The cardholder was successfully authenticated.The base64 encoded value generated by the card issuer.
This field corresponds to the Cardholder Authentication Verification Value (CAVV) for Visa, the Accountholder Authentication Value (AAV) for MasterCard and JCB, or the American Express Verification Value (AEVV) for American Express.
Indicates if the cardholder is enrolled for 3-D Secure authentication.
ENROLLED
The card is enrolled for 3DS authentication.ENROLLMENT_STATUS_UNDETERMINED
The Issuer's ACS was unable to process the request to check enrollment or the card is ineligible.NOT_ENROLLED
The card is not enrolled for 3DS authentication.An optional field that the merchant may supply in the Transaction Request as a description of the transaction.
A unique transaction identifier generated by the Payment Gateway on behalf of the merchant to identify the 3DS transaction.
A unique identifier supplied by the merchant for the authentication.
Authorisation response fields for a standalone capture request.
Indicates the card level result returned by the issuer.
CSC Incorrect Indicator.
Indicates if the card used is a commercial card.
Indicates the type of commercial card as returned by the card issuer.
Indicates the code of the financial network that was used to process the transaction with the issuer.
The date for the Authorization as returned by the financial network.
Indicates the market or the industry associated with the payment.
The ACI (Authorization Characteristics Indicator) returned by the issuer.
The unique identifier for the transaction returned by the issuer.
The validation code returned by the issuer.
Details of the payer's billing address.
The payer's billing address.
The city portion of the address.
The name of the company associated with this address.
The 3 letter ISO standard alpha country code of the address.
The post code or zip code of the address.
The state or province of the address.
The first line of the address.
The second line of the address (if provided).
Information about any constraints that apply to this transaction.
A transient identifier for the request, that can be used to match the response to the request.
Information associated with the customer's source of transaction.
The email address of the customer.
The payer's first name.
The payer's last or surname.
The contact person's mobile phone or cell phone number.
The phone number of the person to whom the order is being billed.
Information associated with the device's source of transaction.
The telephone number captured by ANI (Automatic Number Identification) when the customer calls to place the order.
The 2 digit ANI information identifier provided by the telephone company to indicate the call type, for example, cellular (61-63), toll free (24,25), etc.
The User-Agent header of the browser the customer used to place the order.
Information collected about a remote computing device for the purpose of providing a unique identifier for the device.
The name of the server to which the customer is connected.
The IP address of the computer used by the customer, in nnn.nnn.nnn.nnn format.
A language identifier or IETF language tag to control the language of the payment interaction with the payer (e.g. en_US, es, fr-CA).
See Dynamic Currency Conversion for more detail.
If, when integrating with the gateway, you are using a solution (e.g. a shopping cart or e-commerce solution) provided, supported or certified by your payment service provider, enter the solution ID issued by your payment service provider here.
Session Information
The identifier of the session
A summary of the outcome of the last attempt to modify the session.
FAILURE
The last attempt to place data into the session was unsuccessful. The session may contain invalid data. A request operation using this session will be rejected by the payment gateway.NO_UPDATE
No attempt has been made to place data into the session. A request operation using this session will be rejected by the payment gateway.SUCCESS
The last attempt to update the session was successful. You may submit a request operation using this session.Use this field to implement optimistic locking of the session content.
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.
See Making Business Decisions Based on Session Content.
Information on the shipping address including the contact details of the addressee.
The address to which the goods contained in this order are being shipped.
The city portion of the address.
The name of the company associated with this address.
The 3 letter ISO standard alpha country code of the address.
The post code or zip code of the address.
The state or province of the address.
The first line of the address.
The second line of the address (if provided).
Details of the contact person at the address the goods will be shipped to.
The contact person's email address.
The first name of the person to whom the order is being shipped.
The last name or surname of the person to whom the order is being shipped.
The contact person's mobile phone or cell phone number.
The phone number of the person to whom the order is being shipped.
The shipping method code to indicate the time frame and the priority of the order.
ELECTRONIC
Electronic delivery.GROUND
Ground (4 or more days).OVERNIGHT
Overnight (next day).PRIORITY
Priority (2-3 days).SAME_DAY
Same day.Information about this transaction.
Additional information to be passed to acquirer.
Additional information requested by the acquirer which cannot be passed using other available data fields.
Transaction Amount.
Value generated by the issuing bank in response to a proposal to transfer funds.
The currency which should be used for acquirer card verification.
Indicates the frequency of the transaction offered to the payer.
INSTALLMENT
Indicates an installment transaction where the payer authorizes you to deduct multiple payments over an agreed period of time for a single purchase.RECURRING
Indicates a recurring transaction where the payer authorizes you to automatically debit their accounts for bill or invoice payments.SINGLE
Indicates a single transaction where a single payment is used to complete the order.Unique identifier for this transaction to distinguish it from any other transactions on the order.
Information about the items the payer purchases with the order.
The brand of the item.
The category of the item.
Description for the item with information such as size, color, etc.
A short name describing the item.
The quantity of the item.
The SKU (Stock Keeping Unit) or the item identifier for this item.
The cost price for the item.
The tax amount for the item.
Your note about this transaction.
Indicates that a transaction requires approval to proceed with the order.
REQUESTED
RequestedAn optional identifier for this transaction.
Indicates the source through which you received the transaction.
CARD_PRESENT
Transaction where the card is presented to the merchant.INTERNET
Transaction conducted over the Internet.MOTO
Transaction received by mail or telephone.The identifier for the transaction you wish to refund.
If you do not provide a target transaction ID the gateway will try to identify a transaction. If no transaction can be found or more than one transaction is identified, the request is rejected.
Allows you to provide a breakdown of the types of taxes and amount per type of tax included in transaction.taxAmount.
Provide the amount for this type of tax.
Provide the name for the type of tax for transaction.taxAmount.
The amount of tax included in this transaction, if different to the default value.
The source through which the order has been received.
CARD_PRESENT
Transaction where the card is presented to the merchant.INTERNET
Transaction conducted over the Internet.MOTO
Transaction received by mail or telephone.The person who initiated this transaction.
The strategy used to verify the payment instrument details before they are stored.
ACQUIRER
The gateway performs a Web Services API Verify request. Depending on the payment type, you may need to provide additional details to enable the submission of a Verify request.BASIC
The gateway verifies the syntax and supported ranges of the payment instrument details provided, .e.g for a card it validates the card number format and checks if the card number falls within a valid BIN range.NONE
The gateway does not perform any validation or verification of the payment instrument details provided.Return Value
None