Updating payment status with PSR (in Gateway)
Only read this topic if you are using Gateway as the communication layer for Electronic Signature.
This topic explains how to configure Gateway in FEX to retrieve Payment Status Report (PSR) data for EBICS payments and then use the PSR to update the payment status displayed in Electronic Signature.
About PSR
The Payment Status Report (PSR) is a file generated by the EBICS Server after every EBICS transaction (payment file sent). The PSR file contains the final status of a transaction at the bank side.
3 types of Payment Status Reports are supported along with their corresponding parsers:
- Payment Transfer Status Parser (PSRv2)
- Payment Transfer Status Parser (HAC/PSRv3)
- Payment Transfer Status Parser (PTK)
By default, Electronic Signature is configured to support Payment Status Report PSRv2 with the file format FDL.camt.002.001.02.ara. Therefore, to use the other payment status report types
along with their parsers, you need to configure them.
PSR type availability
- Fetch with PTK is only available for order types with 3 characters.
- Fetch with PSR v2 is only available for order type + file format, for example: FUL.xxxx.yyyy.
- Fetch with PSR v3 supports both order type and order type + file format.
About PSR integration in Electronic Signature
PSR integration in Electronic Signature enables business users to view the up-to-date status of the payments they have sent as found in the PSR.
To achieve this, the following actions are performed:
- Gateway fetches PSR files from the EBICS Server at regular intervals using a Decision Rule.
- The fetched files are placed in a monitoring directory configured in Electronic Signature.
- Electronic Signature parses the retrieved files. A parser must be configured according to the PSR file format used (In the Admin tab file format section).
- Electronic Signature updates the payment status displayed in the UI, based on the unique EBICS order id generated in the transaction.
View detailed description of PSR parsing and status update
- After a PSR is fetched, it is stored in the directory configured in Gateway
- Electronic Signature monitors this directory
- Electronic Signature parses the file retrieved and extracts the PSR(s). A file may contain several PSRs.
- Corresponding PSR entries are created in the database (HostID, CustomerID, OrderType, OrderId, Date, Result)
- Electronic Signature selects the corresponding entry in the PSR which has been stored in the database
- The payment status is updated based on what is stored in the PSR
Updated payment status
- If the server has accepted the payment then the payment status will be updated to ACCEPTED.
- If the server has rejected the payment, due to a wrong signature or compression error or any asynchronous error, then the payment status will be updated to REFUSED. You can see the reason the payment was rejected in the audit part. Note that if the text is longer than 255 characters it will be truncated to fit 255 characters. To view the full text, refer to the payment status report file received.
- If an error occurred during the transaction from Gateway to EBICS Server the payment status will be updated to IN ERROR. To view the full text, refer to the payment status report file generated in the <ES_INSTALLATION_DIR>/psr/<DONE_DIRECTORY> directory.
Configuring PSR integration with Gateway
Fetching a PSR file
In Gateway Navigator, create a Decision Rule that points to the script:
- Windows: EbicsPsrFetchClientWithParam_GTW.bat real <orderType> <BANK> <CUSTOMER> <USER> <path_to_PSR_Dir>
- UNIX: EbicsPsrFetchClientWithParam_GTW.sh real <orderType> <BANK> <CUSTOMER> <USER> <path_to_the_monitoring_Dir>
These scripts are located in the directory <FullPathName>/mft/Fetch
Where:
- <OrderType> is the full EBICS OrderType of the PSR (example: FDL.camt.002.001.02.ara)
- <BANK> is the name of the EBICS Bank
- <CUSTOMER> is the name of the EBICS customer
- <USER> is the name of the EBICS user
- <path_to_PSR_Dir> is the path to the monitoring directory of Electronic Signature. This must be the same value as the psr.monitoring.directory property defined in the Electronic Signature configuration file: <FullPathName>/conf/configuration.properties.
You need to create one Decision Rule for each Bank/Customer you have defined.
The <USER> corresponds to a transport user. It can be omitted in the fetch XML file, in which case the default user for the BANK/CUSTOMER will be used. If the Bank has defined the PSR handler as user-based then the transport user used for sending payments must be specified. If no transport user has been explicitly defined, then the first signer is used as a transport user and this user must be specified in the fetch XML file.
PSR fetch scheduling
PSR files need to be fetched regularly in order to update the payment status in Electronic Signature.
For example, you might want to fetch a PSR every 60 seconds. To do this, schedule the previously-created Decision Rules in a schedule-type Rule Table in the Event Management/Scheduling menu of the Gateway GUI.
Limitation for Bank and Customer names
When using Electronic Signature with Gateway, do not use the hash character '#' in Bank or Customer names. The PSR parser interprets the hash as a separator.
Related topics
Configuring Gateway for Electronic Signature