Skip to content
Nicholas Fletcher edited this page Jan 28, 2019 · 8 revisions

What is the simulator?

The simulator provides a simulation of the production environment. Requests should be sent to this simulator in the exact same way as you'd to EWS or production environment. The simulator validates the request format and approves it if, it matches the EWS API requirements. The simulator is developed in Spring boot and the jar has a self contained Apache Tomcat v8.

The simulator only supports EWS requests of latest API v4.3.0. It does not maintain any state, but has logic built in to provide predictive results on most of the responses.

Common Features

Below are the features that are common to all requests:

  • Soap header validation The soap header validation is turned on by default. This validates the soap header on all requests sent to the simulator. It can be turned off by passing -Dvalidate-header=false argument while starting the simulator
  • correlation_id Same value is present in the response, if present in the request, else a random value is placed.
  • merchant-ref-id Optional field that is responded back on the response.

Error codes and delay will be derived from PAN, token, regId, SecurityCode, or account number as available in the request.

To simulate delay based on this value, start the simulator using the argument -Ddelay=-1 and use the first three digits of the selected request parameter to simulate [0-9]00ms delay in responses. E.g. if first three digits of the selected request parameter are 009, it will simulate 900ms delay. To simulate an error based on this value, provide a PAN, token, or regId with the last three but one digits of your value equal to your desired error code, so long as it has a length greater than three.

Error Codes

The errors are returned as a SOAP Fault that is defined in the WSDL.

To simulate the error response, consider the below mapping of three digit codes to the error response.

Error Code Error Description
101 SERVICE_NOT_IMPLEMENTED UNDER CONSTRUCTION: The service you requested is not implemented.
102 UNKNOWN_ERROR an unspecified error occurred.
103 INTERNAL_ERROR Internal error.
104 INVALID_REQUEST Invalid request (syntax error).
105 DETOKENIZATION_PAN_INVALID The De-tokenized PAN is invalid (legacy).
106 DECRYPTION_TOKEN_FAILED Decryption or De-tokenization failed.
107 TOKEN_OR_REG_ID_GENERATION_FAILED Token or registration ID generation failed.
108 SERVICE_TIMED_OUT A back-end service/server timed out unexpectedly. EWS currently waits up to 2 seconds until timing out a back-end service/server.
109 TOKEN_ALREADY_EXISTS The Token already exists in the token vault
110 PAN_ALREADY_EXISTS The PAN already exists in the token vault

Supported operations

The simulator supports the following operations

Echo

  1. Echo - To test response based on the request.

PAN Operations

  1. Registration – takes a PAN or DPAN and returns a Registration ID (also known as a Low-Value Token or LVT) and a Token. The Registration ID is a special type of token that is only valid for 24 hours. If registering a DPAN, then a cryptogram is required.
  2. Tokenize – takes a Primary Account Number (PAN) and returns an encrypted Token that can be used by the merchant in place of the PAN.
  3. BatchTokenize – takes a list of cards and returns the corresponding list of tokens. Cards will be tokenized if they haven’t been already. Currently limited to tokenizing up to 500 cards at a time.
  4. TokenInquiry – takes a list of cards and returns the corresponding list of tokens. Cards will NOT be tokenized if they haven’t been already. Currently limited to inquiring up to 200 cards at a time.
  5. TokenRegistration – takes a Token and returns a Registration ID. The Registration ID is a special type of token that is only valid for 24 hours.
  6. Decrypt – takes an encrypted PAN, Track 1, or Track 2 and decrypts it. Currently only supports Verifone and Voltage decryption. NOT currently available in Production.
  7. Detokenize – takes a token and returns the clear PAN (and CardSecurityCode if the CVV2 was requested and if it is available).
  8. BatchDetokenize – takes a list of tokens and returns the corresponding list of cards. Currently limited to detokenizing up to 500 tokens at a time.
  9. Deregistration – takes a Registration ID and returns the corresponding token. Also returns the corresponding PAN or DPAN and ExiprationDate. Can return the CardSercurityCode, but it must be specifically requested (CardSecurityCode is purged from the database after it is returned). If the token is related to a DPAN, then Cryptogram will also be returned.
  10. OrderRegistration – takes a Card Security Code and returns a corresponding Low Value Token (aka OrderLVT). The OrderLVT is a special type of token that is only valid for 24 hours.
  11. OrderDeregistration – Takes a token and OrderLVT and returns the corresponding PAN and Card Security Code (aka CVV).

ECheck Operations

  1. ECheckTokenize – takes in a checking or savings account and returns an encrypted token.
  2. ECheckDetokenize – takes in a token and returns the clear checking or saving account, including the account type, routing/ABA number and account number.
Clone this wiki locally