Start of Payment or Management transaction
The following routines are recommended for starting a transaction in CliSiTef.
What differentiates the transaction to be executed is the Function code passed by parameter. (See Table 5.2.2)
The various transactions initiated by commercial automation are grouped by fiscal data, which is the pair (CupomFiscal, TaxDate) and With this data, controls on pending transactions are carried out. confirmations from CliSiTef.
TaxTime is important for security validations of some pinpad manufacturers (in order to prevent attacks and fraud).
int IniciaFuncaoSiTefInterativo (Function, Value, TaxCoupon, TaxDate, TaxTime, Operator, ParamAdic)
ASCII Interface
IniciaFuncaoSiTefInterativoA (Result, Function, Value, TaxCoupon, TaxDate, TaxTime, Operator, ParamAdic)
The functions below were used for Self-Service terminals, and are considered obsolete.
int IniciaFuncaoAASiTefInterativo (Function, Value, TaxCoupon, TaxDate, TaxTime, Operator, ParamAdic, Products)
ASCII Interface
IniciaFuncaoAASiTefInterativoA (Result, Function, Value, TaxCoupon, TaxDate, TaxTime, Operator, ParamAdic, Products)
Parameter | Type | Standard interface | ASCII Interface | Description |
---|---|---|---|---|
Result | Output, by value | Not used | Fixed 6 | Contains the result of the response to the routine call. |
Function | Entry, by value | int | Fixed 6 | Select the payment method, according to the “Function Codes” table below. |
Value | Entry, by value | char * | Variable | Contains the amount to be paid containing the decimal separator (“,”). It must always be passed with two decimal places after the comma (“,”). If the operation does not have a value defined a priori (e.g. prepaid recharge), this field must be empty. |
Tax Coupon | Entry, by value | char * | Max 20 | Tax Coupon Number corresponding to the sale It is important that the tax coupon number is always increasing (increased with each transaction), as the entire process of controlling pending transactions and CliSiTef confirmations is based on the TaxCoupon + TaxDate set. |
Fiscal Data | Entry, by value | char * | Fixed 8 | Tax Date in YYYYMMDD format |
TaxTime | Entry, by value | char * | Fixed 6 | Fiscal Schedule in HHMMSS format |
Operator | Entry, by value | char * | Max 20 | Identification of the cashier |
ParamAdic | Entry, by value | char * | Variable | Additional parameters. Allows the application to limit the type of payment method. It is optional and can be passed empty. When this field is used, CliSiTef will limit the navigation menus only to codes not present in the list. See item 5 for the description of the internal format of this field |
Products | Entry, by value | char * | Variable | Contains the list of products that the customer is purchasing at the Self-Service terminal. It is mandatory as these products will form an integral part of the Tef operation receipt to be printed. The basic format of this field is: [<Description1>;<Code1>;<Quantity1>;<TotalValue1>]; [<Description2>;<Code2>;<Quantity2>;<Total Value2>];... It must be repeated as many times as the number of different products purchased by the customer. |
IMPORTANTE: Essa rotina apenas inicia o processo de pagamento. Se o retorno for 10000 o processo de pagamento deve ser continuado através da rotina ContinuaFuncaoSiTefInterativo ou ContinuaFuncaoSiTefInterativoA até que esta última devolva um resultado final (vide item que descreve esta função).
IMPORTANTE: até a versão 6.1.114.39 (inclusive) da clisitef, sempre que for iniciado um pagamento em um novo documento fiscal (um par <TaxCoupon, TaxDate> diferente do anterior), os dados da transação anterior serão substituídos pelos da recém-iniciada, impossibilitando que alguns tratamentos, como os de pendências, sejam feitos com sucesso.
Portanto, devem ser resolvidos todos os tratamentos necessários antes de iniciar-se uma nova transação.
A partir da versão 6.1.114.40 (inclusive), a CliSiTef permite iniciar um novo pagamento, sem apagar eventuais pendências do documento fiscal anterior.