Request Parameters
The tables below reflect the invocation model used by the library. Parameters are listed using the names that appear in the TPVPC Implantado documentation.
In the web/JavaScript integration path, the same underlying library functions can be executed throughexecFnDll, passing the original function name and arguments to the local TPVPC service.
Initialization and Lifecycle Functions
These functions are used to initialize and manage the middleware lifecycle.
fnDllIniTpvpcLatente
int fnDllIniTpvpcLatente(string cComercio, string cTerminal, string cClaveFirma, string cConfPuerto, string cVersion);| Parameter | Type | Required | Description |
|---|---|---|---|
cComercio | String | Yes | Merchant identifier (FUC) provided by the acquiring entity. |
cTerminal | String | Yes | Terminal identifier assigned to the PIN Pad. |
cClaveFirma | String | Yes | Signature key associated with the merchant and terminal. |
cConfPuerto | String | No | Optional port configuration. |
cVersion | String | No | Optional protocol version ("5.1", "6.1", or "8.1"). |
cConfPuerto is specified, cVersion must also be specified. If cVersion is specified, cConfPuerto must also be specified.0 if initialization succeeds. Any other value indicates a library-level error.fnDllParaTpvpcLatente
Stops communication and releases all internal resources.
int fnDllParaTpvpcLatente();Payment and Financial Operations
0 only indicates that the operation was processed; authorization must always be validated from the XML.fnDllOperPinPad
int fnDllOperPinPad(string cImporte, string cFactura, string cTipoOper, StringBuilder cXMLResp, int iTamMaxResp);| Parameter | Type | Required | Description |
|---|---|---|---|
cImporte | String | Yes | Amount in format XXXXXXXXX.XX. |
cFactura | String | Yes | Merchant operation reference. |
cTipoOper | String | Yes | Operation type: "PAGO" or "PREAUTORIZACION". |
cXMLResp | StringBuffer | Yes | Output buffer that receives the XML response. |
iTamMaxResp | Integer | Yes | Maximum buffer size (recommended: at least 8192). |
fnDllOperManualExt
int fnDllOperManualExt(string cTarjeta, string cCaducidad, string cCVC2, string cImporte, string cFactura, string cTipoOper, StringBuilder cXMLResp, int iTamMaxResp);| Parameter | Type | Required | Description |
|---|---|---|---|
cTarjeta | String | Yes | Card number (15–19 digits). |
cCaducidad | String | Yes | Expiration date in AAMM format. |
cCVC2 | String | Conditional | Security code, required depending on merchant configuration. |
cImporte | String | Yes | Amount in format XXXXXXXXX.XX. |
cFactura | String | Yes | Merchant operation reference. |
cTipoOper | String | Yes | "PAGO" or "PREAUTORIZACION". |
cXMLResp | StringBuffer | Yes | Output XML buffer. |
iTamMaxResp | Integer | Yes | Maximum buffer size. |
Confirmation and Refund Operations
The current TPVPC Implantado documentation describes confirmations and referenced refunds through a single function.
fnDllOperComContable
int fnDllOperComContable(string cNumPedido, string cRTSOriginal, string cImporte, string cFactura, string cTipoOper, StringBuilder cXMLResp, int iTamMaxResp);| Parameter | Type | Required | Description |
|---|---|---|---|
cNumPedido | String | Yes | Order number (pedido) of the original transaction. |
cRTSOriginal | String | No | RTS identifier of the original transaction. Recommended when available. |
cImporte | String | Yes | Final amount to capture or refund amount, in XXXXXXXXX.XX format. |
cFactura | String | Yes | New merchant reference for the confirmation or refund. |
cTipoOper | String | Yes | "CONFIRMACION" or "DEVOLUCION". |
cXMLResp | StringBuffer | Yes | Output XML buffer. |
iTamMaxResp | Integer | Yes | Maximum buffer size. |
Recurring Payments
Recurring payment flows use the following functions.
fnDllActivaRecurrente
Activates recurring mode for the current library session.
void fnDllActivaRecurrente();fnDllDesActivaRecurrente
Deactivates recurring mode for the current library session.
void fnDllDesActivaRecurrente();fnDllOperRecurrente
Executes a payment using a previously generated recurring token.
int fnDllOperRecurrente(string cTokenRec, string cImporte, string cFactura, StringBuilder cXMLResp, int iTamMaxResp);| Parameter | Type | Required | Description |
|---|---|---|---|
cTokenRec | String | Yes | Token generated in a previous recurring payment. |
cImporte | String | Yes | Amount in format XXXXXXXXX.XX. |
cFactura | String | Yes | Merchant operation reference. |
cXMLResp | StringBuffer | Yes | Output XML buffer. |
iTamMaxResp | Integer | Yes | Maximum buffer size. |
Each time the library is initialized withfnDllIniTpvpcLatente, recurring mode is automatically deactivated and must be activated again if needed.
Receipt Generation
fnDllGenerateReceipt
Generates a customer or merchant receipt from the XML returned by a previous operation.
void fnDllGenerateReceipt(string cXMLResp, StringBuilder base64Receipt, int iTamMaxbase64Receipt, string nombreComercio, bool bIsClient);| Parameter | Type | Required | Description |
|---|---|---|---|
cXMLResp | String | Yes | XML returned by a previous operation. |
base64Receipt | StringBuffer | Yes | Output buffer containing the receipt PDF in Base64. |
iTamMaxbase64Receipt | Integer | Yes | Output buffer size. |
nombreComercio | String | Yes | Merchant name to include on the receipt. |
bIsClient | Boolean | Yes | true for the customer receipt, false for the merchant receipt. |
Communication Check
fnDllCheckStatus
Checks the communication state of the terminal and server with low operational cost.
int fnDllCheckStatus();| Return value | Meaning |
|---|---|
0 | Terminal and server communications are working correctly. |
-1 | Library not initialized. |
-2 | Communication error with the terminal. |
-3 | Communication error with the server. |
Authorization Validation
<estado>F</estado>
<resultado>Autorizada</resultado><estado>F</estado>
<resultado>Autorizada</resultado>On this page