Create a Single-Step Payment
This guide explains how to process a standard PAGO (sale) transaction using Get Central. A single-step payment performs authorization and capture in one operation and represents the most common flow for attended Point-of-Sale (POS) environments.
This guide applies to Slim Pack.
Slim Pack exposes the same native library through C# (DLL) and the ActiveX interface. Differences between the two affect only how the function is invoked, not the parameters, business logic, or response validation.
Requirements
Before you begin, ensure the following prerequisites are met:
-
Get Central (TPVPC) installed and available
- Native library (DLL / JAR), or
- Local Service (for JavaScript integrations)
-
Merchant credentials provided by the acquirer:
cComercio(merchant number)cTerminal(terminal number)cClaveFirma(signature key)
-
Physical PIN pad connected to the same machine as the TPVPC
-
Successful initialization via
fnDllIniTpvpcLatente
The PIN pad and the TPVPC must run on the same machine. Distributed or remote scenarios are not supported.
Single-Step Payment Process
A single-step payment consists of the following logical steps:
- Initialize communication with Get Central (once per application lifecycle)
- Execute a PAGO operation using the PIN pad
- Parse the XML response to determine whether the transaction was authorized
Only the XML response determines the financial outcome of the transaction.
Step 1: Execute a PAGO Operation
To perform a sale with card reading, invoke the function:
fnDllOperPinPad
This function handles card reading, customer interaction, and host communication.
The following parameters are required:
| Parameter | Type | Required | Description |
|---|---|---|---|
cImporte | String | Yes | Transaction amount in format XXXXXXXXX.XX (for example, 25.90). |
cFactura | String | Yes | Merchant reference used to identify the transaction. |
cTipoOper | String | Yes | Operation type. Must be set to PAGO. |
cXMLResp | Buffer | Yes | Output buffer that will receive the XML response. |
iTamMaxResp | Integer | Yes | Maximum size of the response buffer. Minimum recommended value: 8192. |
Example in C#:
StringBuilder xmlResponse = new StringBuilder(8192);
int result = fnDllOperPinPad(
"25.90", // cImporte
"ORD-2023-001",// cFactura
"PAGO", // cTipoOper
xmlResponse,
xmlResponse.Capacity
);When the function is called:
- The PIN pad prompts the cardholder
- The transaction is processed
- The XML response is written into
cXMLResp
A return value of 0 only confirms that the process completed correctly.
Step 2: Validate the XML Response
After execution, the TPVPC returns an XML document describing the transaction result. This XML is the only authoritative source to determine whether the payment was approved.
A transaction must be considered AUTHORIZED only if the XML response contains both of the following elements:
<estado>F</estado>
<resultado>Autorizada</resultado>If either element is missing or contains a different value, the transaction must be treated as DENIED, even if the function returned 0.
This is an example of an authorized response:
<resultadoOperacion>
<tipoPago>PAGO</tipoPago>
<importe>25.90</importe>
<moneda>978</moneda>
<pedido>ORD-2023-001</pedido>
<estado>F</estado>
<resultado>Autorizada</resultado>
<codigoRespuesta>0000</codigoRespuesta>
</resultadoOperacion>Next Steps
After completing a successful PAGO operation, you can proceed with further implementation:
- To learn how to reverse standard payments or authorize pre-authorizations, refer to the Process a Refund and Process a Pre-authorization guides.
- For details on generating and printing receipts for your customers, see the Generate and Print Receipts documentation.