This shows you the differences between two versions of the page.
Both sides previous revision Previous revision | Next revision Both sides next revision | ||
developer:api_specification:xml_payment_features [2019/05/31 16:13] vinayh [Examples for the Response] |
developer:api_specification:xml_payment_features [2019/05/31 16:27] vinayh |
||
---|---|---|---|
Line 2312: | Line 2312: | ||
</WRAP> | </WRAP> | ||
\\ | \\ | ||
- | {/gateway} | + | ===== Transaction Retrieving ===== |
+ | This feature allows you to retrieve a transaction already processed. You need to know the existing transaction before sending your request. | ||
+ | |||
+ | * **Main Request body Tag**: <GET_TRANSACTION_DETAILS> | ||
+ | * **Main Response body Tag**: <GET_TRANSACTION_DETAILS_RESPONSE> | ||
+ | |||
+ | ==== Request Body Fields ==== | ||
+ | |||
+ | <searchtable> | ||
+ | ^ **FIELD** ^ **REQUIRED** ^ **DESCRIPTION** ^ | ||
+ | | TERMINALID | Y | A Terminal ID provided by %CompanyName. NB - Please contact %CompanyName to be issued with a test terminal ID. | | ||
+ | | UNIQUEREF | Y | Refers the UNIQUEREF generate for the original transaction response. | | ||
+ | | DATETIME | Y | Request date and time. Format: DD-MM-YYYY:HH:MM:SS:SSS. | | ||
+ | | HASH | Y | A HASH code formed by part of the request fields. The formation rule is given at the **ND001 - Hash Formation**, in the next section. | | ||
+ | </searchtable> | ||
+ | \\ | ||
+ | |||
+ | ==== Notes and Details About the Request ==== | ||
+ | |||
+ | **ND001 - Hash Formation** | ||
+ | |||
+ | The general rule to build the HASH field is given on 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: | ||
+ | |||
+ | <WRAP center box 100%> | ||
+ | TERMINALID:UNIQUEREF:DATETIME:SECRET | ||
+ | </WRAP> | ||
+ | |||
+ | \\ | ||
+ | |||
+ | **ND002 - Data Encoding for Requests** | ||
+ | |||
+ | All data sent to us should be correctly encoded using **UTF-8** as the character encoding. | ||
+ | |||
+ | \\ | ||
+ | ==== Examples for a Request ==== | ||
+ | |||
+ | * **Scenario**: Simple request, minimum data. | ||
+ | * **Terminal**: 6491002. | ||
+ | * **Terminal Secret**: x4n35c32RT. | ||
+ | | ||
+ | <code xml> | ||
+ | <?xml version="1.0" encoding="UTF-8"?> | ||
+ | <GET_TRANSACTION_DETAILS> | ||
+ | <TERMINALID>6491002</TERMINALID> | ||
+ | <UNIQUEREF>GCNQAWUUVZ</UNIQUEREF> | ||
+ | <DATETIME>06-03-2018:17:41:08:273</DATETIME> | ||
+ | <HASH>73e340cfb2b7424252d1ced917e4f74704aaa66a9600039f4800434cefe87d721c342d2b915c6e2aeea88b34e749ba97665f7d9e50b1144ca0f0745361fc4896</HASH> | ||
+ | </GET_TRANSACTION_DETAILS> | ||
+ | </code> | ||
+ | |||
+ | \\ | ||
+ | ==== Response Body Fields ==== | ||
+ | |||
+ | <searchtable> | ||
+ | ^ **FIELD** ^ **DESCRIPTION** ^ | ||
+ | | TERMINALID | Terminal to which the transaction was submitted. | | ||
+ | | UNIQUEREF | Transaction's unique referenced. Same as provided at the request. | | ||
+ | | ORDERID | Transaction's order id, provided when the transaction was submitted. | | ||
+ | | TRANSACTION_STATUS | Current status of the transaction. | | ||
+ | | TRANSACTION_DATE | Date time of the transaction's processing. | | ||
+ | | OPERATOR | An identifier for who executed this transaction. | | ||
+ | | TRANSACTION_TYPE | Indicates if the transaction is a **SALE**, a **REFUND**, a **PREAUTH** or a pre-auth **COMPLETION**. | | ||
+ | | CURRENCY | Transaction's currency. | | ||
+ | | AUTHORIZEDAMOUNT | Amount authorized for the transaction. | | ||
+ | | ADDITIONAL_DETAILS | Additional details on the transaction, like the result information, custom fields, batch, among other. | | ||
+ | | BATCH_NUMBER | Subfield of ADDITIONAL_DETAILS. Indicates the batch number of the transaction, if not in open batch anymore. | | ||
+ | | BULK_NUMBER | Subfield of ADDITIONAL_DETAILS. Indicates the number of the bulk in which the transaction was send (only if the transaction was part of a bulk). | | ||
+ | | PROCESSINGTERMINAL | Subfield of ADDITIONAL_DETAILS. Indicates the number of the processing terminal of this transaction. Might differ from the TERMINALID if the transaction was submitted to a routing terminal (once the transaction is routed, it goes to a processing terminal). | | ||
+ | | RESPONSECODE | Subfield of ADDITIONAL_DETAILS. **A**: (APPROVED/ AUTHORIZED/ ACCEPTED, respectively). \\ **E**: (ACCEPTED for later processing, but result currently unknown - specifically for China Union Pay). \\ **D**: (DECLINED). \\ **R**: (REFERRED, also considered as PICKUP). \\ **C**: (PICKUP, also known as Referral A or Referral B). \\ For more details, visit at **[[merchant:existing_merchant:other_information:transaction_responses|Transaction Responses]]**. | | ||
+ | | RESPONSETEXT | Subfield of ADDITIONAL_DETAILS. The text of the authorization. | | ||
+ | | APPROVALCODE | Subfield of ADDITIONAL_DETAILS. A six digit AuthCode. | | ||
+ | | FOREIGNCURRENCYINFORMATION | Subfield of ADDITIONAL_DETAILS. Tag contains Dynamic Currency Conversion information. It has to be present in the eDCC enabled transactions. | | ||
+ | | CARDCURRENCY | Subfield of FOREIGNCURRENCYINFORMATION. Cardholder card's currency code. | | ||
+ | | CARDAMOUNT | Subfield of FOREIGNCURRENCYINFORMATION. Amount which is supposed to be charged in the home currency. | | ||
+ | | CONVERSIONRATE | Subfield of FOREIGNCURRENCYINFORMATION. Value of the Conversion Rate on original request. | | ||
+ | | DESCRIPTION | Subfield of ADDITIONAL_DETAILS. | | ||
+ | | TRANSACTION_CUSTOM_FIELDS | Subfield of ADDITIONAL_DETAILS. List of TRANSACTION_CUSTOM_FIELD used with the transaction. | | ||
+ | | NAME | Subfield of each TRANSACTION_CUSTOM_FIELD. Name of the custom field used. | | ||
+ | | VALUE | Subfield of each TRANSACTION_CUSTOM_FIELD. Value provided for the custom field used. | | ||
+ | | DATETIME | Response date and time for the transaction, created by the bank. Format: YYYY-MM-DDTHH:MM:SS. Note that this is intentionally in a different format to the request timestamp to highlight the fact that it is a different time. | | ||
+ | | 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. | | ||
+ | </searchtable> | ||
+ | \\ | ||
+ | ==== Notes and Details on the Response ==== | ||
+ | |||
+ | **ND001 - Hash Formation** | ||
+ | |||
+ | The general rule to build the HASH field is given on 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: | ||
+ | |||
+ | <WRAP center box 100%> | ||
+ | TERMINALID:UNIQUEREF:ORDERID:TRANSACTION_STATUS:TRANSACTION_DATE:OPERATOR:TRANSACTION_TYPE:CURRENCY:AUTHORIZEDAMOUNT:BATCH_NUMBER:BULK_NUMBER:PROCESSINGTERMINAL:RESPONSECODE:RESPONSETEXT:APPROVALCODE:CARDCURRENCY:CARDAMOUNT:CONVERSIONRATE:DESCRIPTION:DATETIME:SECRET | ||
+ | </WRAP> | ||
+ | |||
+ | \\ | ||
+ | |||
+ | **ND002 - Error Handling** | ||
+ | |||
+ | If there is an error processing the request, the error string is returned in an XML message with the simple tags: | ||
+ | <code xml> | ||
+ | <ERROR> | ||
+ | <ERRORSTRING>This is the error generated!</ERRORSTRING> | ||
+ | </ERROR> | ||
+ | </code> | ||
+ | \\ | ||
+ | ==== Examples for the Response ==== | ||
+ | |||
+ | * **Scenario**: Response to a simple request. | ||
+ | * **Terminal**: 3614008. | ||
+ | * **Terminal Secret**: x4n35c32RT. | ||
+ | | ||
+ | <code xml> | ||
+ | <?xml version="1.0" encoding="UTF-8" standalone="yes"?> | ||
+ | <GET_TRANSACTION_DETAILS_RESPONSE> | ||
+ | <TERMINALID>3614008</TERMINALID> | ||
+ | <UNIQUEREF>E4RGZYVCME</UNIQUEREF> | ||
+ | <TRANSACTION_STATUS>REVIEW</TRANSACTION_STATUS> | ||
+ | <TRANSACTION_DATE>26-04-2019:17:19:18:000</TRANSACTION_DATE> | ||
+ | <OPERATOR>CardHolder Payment</OPERATOR> | ||
+ | <TRANSACTION_TYPE>SALE</TRANSACTION_TYPE> | ||
+ | <CURRENCY>USD</CURRENCY> | ||
+ | <AUTHORIZEDAMOUNT>52.03</AUTHORIZEDAMOUNT> | ||
+ | <ADDITIONAL_DETAILS> | ||
+ | <RESPONSECODE>A</RESPONSECODE> | ||
+ | <RESPONSETEXT>APPROVAL</RESPONSETEXT> | ||
+ | <APPROVALCODE>VVVVWM</APPROVALCODE> | ||
+ | <TRANSACTION_CUSTOM_FIELDS> | ||
+ | <TRANSACTION_CUSTOM_FIELD> | ||
+ | <NAME>Promocode</NAME> | ||
+ | <VALUE>sevr9w409vw4v59w45v</VALUE> | ||
+ | </TRANSACTION_CUSTOM_FIELD> | ||
+ | </TRANSACTION_CUSTOM_FIELDS> | ||
+ | </ADDITIONAL_DETAILS> | ||
+ | <DATETIME>30-04-2019:14:34:47:707</DATETIME> | ||
+ | <HASH>61a587361fa4631a72af9d47395ad0ab81cb6b5928ed8b41ab0860e7cd52c4bc55361f3d3c0b8cf52add999c0c5c07acd6f8f26c0b045d33c0d97489b3f6be9a</HASH> | ||
+ | </GET_TRANSACTION_DETAILS_RESPONSE> | ||
+ | </code> | ||
+ | |||
+ | <WRAP center important 100%> | ||
+ | **REMEMBER** to change the Terminal ID and Terminal Secret for valid values. Consult the **[[developer:integration_docs|Integration Docs]]** for examples or contact our support team. | ||
+ | </WRAP> | ||
+ | \\ | ||
+ | |||
+ | <WRAP center important 100%> | ||
+ | Not all the transaction will return the same fields. Mostly they are similar, but some of them might have less data than what is described by the response field table. | ||
+ | </WRAP> | ||
\\ | \\ | ||