The recovery is an integration principle for semi-integrated terminals to recover a response when certain situations occur during a transaction. After the transaction completes, these situations prevent PayFacto from providing a return code immediately. The most common situations requiring recovery are communication problems between the PayFacto applications and the terminal. The return code to monitor is the PR return code. PayFacto invokes the PR return code for any situation that does not immediately obtain a return code.
There are two distinct recovery transactions performed in this process;
When a transaction generates a PR error code, the PayFacto servers automatically initiate a recovery that is sent to the terminal.
If the terminal is not connected in ECR mode, the PayFacto servers will continue sending the recovery to the terminal to obtain the transaction result every 30 seconds until the terminal reconnects to ECR mode. This has two possible results:
After the PayFacto servers receive the result of the recovery, the merchant's application can initiate and process a new transaction. Unfortunately, there is no easy way to know if the PayFacto servers have been able to communicate with the terminal and retreive the transaction result.
From the moment the terminal reconnecs to ECR mode, it can take up to 30 seconds before the PayFacto servers are able to perform the recovery with the terminal.
If the merchant receives an error 3668 or 3667 on their transactions, they need to:
In order to start the recovery process as soon as possible when the merchant application receives the PR return code, it is necessary to:
Check the return code printed on the transaction receipt
Make sure the terminal is securely connected to the set (if integrated with a serial cable)
Ensure that the terminal can communicate with PayFacto (that there is no network failure)
Make sure that the terminal's power cable is securely connected and locked

IMPORTANT
The transaction receipt is always right. In the event of a discrepancy between the transaction receipt return code and the merchant API, the transaction receipt code prevails. PayFacto uses the PR return code to inform the merchant that they must pay close attention to the transaction receipt.
The merchant must ensure that the pinpad is properly and securely connected at all times to allow recovery and batch closure as quickly as possible.