Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
developer:api_specification:hpp_background_validation [2018/07/19 10:13]
127.0.0.1 external edit
developer:api_specification:hpp_background_validation [2022/07/15 15:23] (current)
Line 1: Line 1:
 +====== HPP Background Validation ======
 +
 +~~TOC~~
 +
 +\\
 +
 +===== About the Feature =====
 +
 +The Background validation is a method of double-checking the result of transactions using a server-side POST. It is useful for Hosted Payment Page transactions,​ as the result of the transaction can sometimes fail, leaving the site without a result for the transaction even though the transaction may have been authorized. ​
 +
 +This subfeature can be enable for each Terminal, when the Terminal is regitered by the Gateway Administrator,​ or by the Merchant, through the %SelfCare System in the Terminal Setup section. If it's enabled, then all transactions sent through the Hosted Payment Page will be validated. ​
 +
 +The **Validation URL**, used by the Background Validation POST request, should be set for the Terminal or sent in the Payment/ Pre-auth Request to the Payment Page.  The Payment Gateway is going to use this URL to send an HTTP POST request with the transaction processing result and will expect to receive an "​**OK**” in the HTTP response body (__2 characters only, no HTML__). Any other response or connection issue will be considered as not validated. The Payment Gateway will make further attempts to reach the Validation URL, until the maximum allowed time for validation has passed. If the maximum allowed time has passed and the transaction was not successfully validated, the transaction will be marked as expired and a notification e-mail will be sent to the merchant'​s e-mail address. ​
 +
 +====  Request Body Fields ====
 +
 +<​searchtable>​
 +^ **FIELD** ​        ^ **DESCRIPTION** ^
 +| TERMINALID ​        | Same as informed at the transaction'​s request. |
 +| UNIQUEREF ​         | Generated reference that should be stored for tracking and remote XML refunding. |
 +| AMOUNT ​            | Same as informed at the transaction'​s request. |
 +| ORDERID ​           | Same as informed at the transaction'​s request. |
 +| RESPONSECODE ​      | Same as the one generated for the transaction'​s response. |
 +| RESPONSETEXT ​      | Same as the one generated for the transaction'​s response. Might be populated with an error, in case there was an issue during processing. |
 +| APPROVALCODE ​      | Same as the one generated for the transaction'​s response. Might be empty, if the transaction was not approved. |
 +| DATETIME ​          | Same as the one generated for the transaction'​s response. Format: **YYYY-MM-DDTHH:​MM:​SS**. |
 +| AVSRESPONSE ​       | Same as the one generated for the transaction'​s response. |
 +| CVVRESPONSE ​       | Same as the one generated for the transaction'​s response. |
 +| HASH               | A HASH code formed by part of the request fields. The formation rule is given at the **ND001 - Hash Formation**,​ in the next section. ​ |
 +| CUSTOMFIELD ​       | Same as informed at the transaction'​s request. Returns all custom fields informed on request. |
 +</​searchtable>​
 +\\
 +\\
 +
 +==== Notes and Details About the Request ====
 +
 +**ND001 - Hash Formation**
 +
 +The gerenal rule to build HASH field is given at the **[[developer:​api_specification:​special_fields_and_parameters|Special Fields and Parameters]]** page, under the **[[developer:​api_specification:​special_fields_and_parameters#​the_hash_parameter|Special Fields and Parameters]]** section.
 +
 +For this specific feature, you should use the following formats:
 +
 +When using a Single Currency Terminal, the string to generate the HASH field is going to formed using:
 +<WRAP center box 100%>
 +TERMINALID:​ORDERID:​AMOUNT:​DATETIME:​RESPONSECODE:​RESPONSETEXT:​SECRET
 +</​WRAP>​
 +When using a Multi Currency Terminal, the string to generate the HASH field is going to formed using:
 +<WRAP center box 100%>
 +TERMINALID:​ORDERID:​CURRENCY:​AMOUNT:​DATETIME:​RESPONSECODE:​RESPONSETEXT:​SECRET
 +</​WRAP>​
 +
  
Except where otherwise noted, content on this wiki is licensed under the following license: CC Attribution-Share Alike 4.0 International