Configuring the Adyen Terminal
| Configuration files |
|
Static Terminal Activation
To enable the terminal, proceed as follows:
- Enable the terminal in the configuration file hal.properties:
DeviceEntryTypes.Terminal_Adyen.id=Terminal_Adyen DeviceEntryTypes.Terminal_Adyen.enabled=true DeviceEntryTypes.Terminal_Adyen.active=true - Set the Adyen terminal as the default terminal:
DeviceMappingEntryTypes.DefaultTerminal.id=DefaultTerminal DeviceMappingEntryTypes.DefaultTerminal.deviceCategory=TERMINAL DeviceMappingEntryTypes.DefaultTerminal.mappedTo=Terminal_Adyen - Set the customer-specific parameters in the file terminal.properties:
terminal.Terminal_Adyen.address= terminal.Terminal_Adyen.environment= terminal.Terminal_Adyen.merchant= terminal.Terminal_Adyen.user= terminal.Terminal_Adyen.password= terminal.Terminal_Adyen.integratorName= terminal.Terminal_Adyen.posId= terminal.Terminal_Adyen.posName= terminal.Terminal_Adyen.pedName=
Option to Request Terminals Dynamically
It is possible to initialize Adyen terminals dynamically by calling Adyen Cloud. The Adyen Cloud backend returns a list of currently working terminals in the store. The Adyen terminals are requested from the Adyen Cloud during OmniPOS / Flow Service startup and then every 3 minutes.
To activate this feature, the following settings must be configured.
- Configure the AdyenCloudTerminals device in the configuration file hal.properties:
DeviceEntryTypes.AdyenCloudTerminals.id=AdyenCloudTerminals DeviceEntryTypes.AdyenCloudTerminals.deviceCategory=TERMINAL DeviceEntryTypes.AdyenCloudTerminals.description=Adyen online terminals DeviceEntryTypes.AdyenCloudTerminals.descriptionKey=device.entry.adyen.cloud.terminals DeviceEntryTypes.AdyenCloudTerminals.enabled=true DeviceEntryTypes.AdyenCloudTerminals.active=true DeviceEntryTypes.AdyenCloudTerminals.producesOtherDevices=true DeviceEntryTypes.AdyenCloudTerminals.className=com.gk_software.pos.hal.device.terminal.AdyenCloudTerminalsThis is a placeholder device and will not be displayed in the list of available terminals. To ensure this, the producesOtherDevices parameter must be set to true.
- Set customer-specific parameters in hal.properties:
AdyenCloudTerminalsConfigs.Default.url= AdyenCloudTerminalsConfigs.Default.merchantId= AdyenCloudTerminalsConfigs.Default.storeId= AdyenCloudTerminalsConfigs.Default.xApiKey= AdyenCloudTerminalsConfigs.Default.uniqueTerminalId= AdyenCloudTerminalsConfigs.Default.readTimeout=5000 AdyenCloudTerminalsConfigs.Default.connectTimeout=1500Parameter Mandatory Description url Yes URL to query devices which are currently online in this store. merchantId Yes Merchant identifier in the Adyen backend storeId No ID of the store in the Adyen backend xApiKey Yes API key provided by Adyen See: https://docs.adyen.com/development-resources/api-credentials
uniqueTerminalId No It is possible to activate just a dedicated device. If you want to use only one device, set the device identifier of the device to this setting. See: https://docs.adyen.com/point-of-sale/terminal-api#request-message-header Field POIID
readTimeout Yes The read timeout value in milliseconds for the connection to the Adyen backend. If a value < 0 is configured, the default value will be used.
connectTimeout Yes The connect timeout value in milliseconds for the connection to the Adyen backend. If a value < 0 is configured, the default value will be used.
- If you want to use one of the populated terminals as the default terminal for OmniPOS, you can use the device ID for the default terminal in hal.properties.
DeviceMappingEntryTypes.DefaultTerminal.id=DefaultTerminal DeviceMappingEntryTypes.DefaultTerminal.mappedTo=V400cPlus-401513760 <--- here DeviceMappingEntryTypes.DefaultTerminal.deviceCategory=TERMINAL
Configuration AdyenWS
| Key | Default value (in ms) | Description |
|---|---|---|
| terminal.AdyenWS.connectTimeout | 5000 | If the terminal cannot be connected, the connection attempt is interrupted after this timeout is reached. |
| terminal.AdyenWS.readTimeout | 15000 | The connection is closed to the terminal if the response does not come within this timeout. A timeout of zero is interpreted as an infinite timeout. Note that the request can also be cancelled by the terminal after certain timeout is reached there. If we are reaching this timeout and the tx is still in progress, we start to poll the current status of the transaction. |
| terminal.AdyenWS.listenerTimeout | 60000 | Not used anymore, just here for compatibility for old terminal implementations. |
| terminal.AdyenWS.lostConnectionToDeviceMaxReconnectTimeout | 120000 | If we are loosing the terminal connection during a payment, we try to get a connection back to the terminal during this time. If we cannot get the terminal connection back, we try to abort the current payment. If this is also not possible, the backoffice cancellation flags are set for a later recovery processing. |
| terminal.AdyenWS.statusPollingInterval | 2000 | During the polling of the status for the current running tx, this setting defines the interval between 2 status requests. |
| terminal.AdyenWS.globalTransactionTimeout | 2135000 | Defines the maximum available time to execute a payment tx. If this timeout is reached, an abort request for the currently running payment is send to the terminal. |
| terminal.AdyenWS.statusRetryCount | 3 | During the polling of the status it can happen that the status request cannot be sent (i.e.: Connection issues, api not responding, ... ). If this is not possible, we try to send the single status request
n
times. If the retries are all failing, an exception is thrown and we start to get the connection back to the terminal. |
| terminal.AdyenWS.statusRetryTimeout | 2000 | Defines how long we wait between 2 status requests if we cannot send a single tx status request, see the settings above. |
| terminal.AdyenWS.abortRetryCount | 20 | During a problem situation, we try to abort the current running payment tx. In this case, it can also happen that we cannot send the abort request. This parameter defines how often we try to send the abort request. |
| terminal.AdyenWS.abortRetryTimeout | 2000 | Defines how long we wait between 2 abort requests, see the settings above. |