Library configuration
This should be the first call to the CliSiTef library. It aims to configure the parameters of connection with the SiTef server, and with Commercial Automation itself.
#
Interface ASCIIParâmetro | Tipo | Interface Padrão | Interface ASCII | Descrição |
---|---|---|---|---|
Resultado | Saída, por favor | Não Usado | Fixo 6 | Contém o resultado de resposta à chamada da rotina. |
IPSiTef | Entrada, por favor | char * | Variável | Configura o nome ou endereço IP (em notação “.”) do servidor SiTef. |
IdLoja | Entrada, por favor | char * | Fixo 8 | Identifica o número da loja perante a rede de estabelecimentos comerciais. |
IdTerminal | Entrada, por favor | char * | Fixo 8 | Identifica o pdv perante a loja. Possui o formato XXnnnnnn onde XX corresponde a 2 caracteres alfabéticos e nnnnnn 6 dígitos quaisquer desde que o número resultante não sobreponha a faixa 000900 a 000999 que é reservada para uso pelo SiTef. |
Reservado | Entrada, por favor | char * | Fixo 6 | Deve ser passado com 0 |
ParametrosAdicionais | Entrada, por favor | char * | Variável | Parâmetros adicionais de configuração da CliSiTef no seguinte Formato:[<Nome_Parametro_1>=<Valor_Parametro_1>;<Nome_Parametro_2>=<Valor_Parametro_2>] |
Important! Each terminal must have a unique and fixed code per SiTef store. Therefore, the commercial establishment must manage the codes used so that there is never a repetition of terminals for the same store.
The SiTef server does not allow two or more simultaneous connections using the same pair (store, terminal), dropping previous connections, keeping only the last connection made; if perhaps the transaction that was in progress when the connection dropped due to a duplicate POS was already in a pending state (a sale for example), SiTef immediately places it in Canc.POS (Cancelled by POS) status, that is, this will be cancelled; the terminal that is disconnected will receive the message “No SiTef connection” with the error -5.
When the commercial establishment uses Pinpad to read cards and enter passwords and if the pair (store, terminal) is changed, this will result in new tables being loaded onto the pinpad with each change. This is another one reason for the terminal code to be fixed.
The configuration routines return one of the following values:
Value | Description |
---|---|
0 | No error occurred |
1 | Invalid or unresolved IP address |
2 | Invalid store code |
3 | Invalid terminal code |
6 | Tcp/Ip initialization error |
7 | Lack of memory |
8 | Didn't find CliSiTef or it has problems |
9 | SiTef server configuration has been exceeded. |
10 | Access error in the CliSiTef folder (possible lack of writing permission) |
11 | Invalid data passed through automation. |
12 | Safe mode not active (possible lack of configuration on the SiTef server of the .cha file). |
13 | Invalid DLL path (the full library path is too long). |
Note: during the automation lifecycle, if there is no change in the function's input parameters, then there is no need to call it again.
#
1.1 General special settingsCertain general settings (valid for all transactions) of CliSiTef can be passed through the parameter “ParametersAdditional” of the routine SetsUpIntSiTefInteractiveEx. The format of this field is as follows:
Next, we describe the functionalities provided in this field.
Note: only the main settings will be highlighted in this item. For a detailed description of all available options, see the document “CliSiTef – List of Additional Parameters”.
Functionality | Description |
---|---|
MultiplosCupons=1 | Indicates that the POS is able to receive more than one receipt per transaction. In the case of transactions with more than one receipt, such as cell phone recharge transactions or bill payments with credit or debit cards, the cell phone recharge or bill payment receipt will be delivered separately from the credit or debit EFT receipt. |
PortaPinPad=<Porta PinPad> | Defines the port to which the shared pinpad is connected. Example: Windows: [PortaPinPad=1] Linux: [PortaPinPad=/dev/ttyS0] |
LojaECF=<Num Loja> | Tax store number (Maximum size: 20) |
CaixaECF=<Num Caixa> | Tax box number (Maximum size: 20) |
NumeroSerieECF=<Serie ECF> | ECF Serial Number (Max Size: 20) |
#
1.2 Additional Automation/Establishment informationThe ParmsClient configuration allows commercial automation to configure information common to all transactions exchanged with the SiTef server.
Format:
where:
<ParmsClient=>
= Data identifier prefix.
<IdN>
= Field identifier, as defined in the table below.
<ValorN>
= Field value.
Id | Format | Meaning |
---|---|---|
1 | Numeric | CNPJ of the establishment/store. |
2 | Numeric | CNPJ of the company that developed commercial automation |
3 | Numeric | CNPJ of the establishment/store |
4 | Numeric | CNPJ Facilitator (Van) |
Example of how to send data to CliSiTef:
Where:
1 (CNPJ of the Establishment) with the value 31406434895111.
2 (CNPJ of the commercial automation company) with the value 12523654185985.
Note: this parameter should not be used for sub-acquiring purposes (soft descriptor). To this end, see the document “CliSiTef - Sub-Acquiring Information (Soft Descriptor)”
#
1.3 Floating pointHow automation tells CliSiTef that it knows how to handle floating point fields
Treating fields with Floating Point requires a procedure performed in conjunction with automation.
For Clisitef to carry out this procedure, which will be described below, the automation must inform Clisitef that it is able to handle it. To do this, the automation must pass the string below in the parameter “ParametersAdditional” when executing the ConfiguraIntSiTefInterativoEx function.
If this parameter is omitted and SiTef requests field collection with Floating Point, CliSiTef will request the automation, the message is displayed: "Floating Point not Supported by POS".
#
Procedure in “married operation” with automationHow automation tells CliSiTef that it knows how to handle floating point fields
The treatment of fields with Floating Point requires a procedure carried out in conjunction with the automation.
For Clisitef to carry out this procedure, which will be described below, the automation must inform Clisitef that it is able to handle it. To do this, the automation must pass the string below in the “ParametersAdditionals” parameter when executing the ConfiguraIntSiTefInterativoEx function.
If this parameter is omitted and SiTef requests field collection with Floating Point, CliSiTef will request the automation, the message is displayed: "Floating Point not Supported by POS".
#
Procedure in “married operation” with automationIf it was informed in the Configuration, to support the Floating Point feature, as described above, CliSiTef, through Command 0 in conjunction with the FieldType 2470, informs the Automation of the number of decimal places in the Buffer parameter, so that it can Format your screens before displaying them to the operator (See Screen Examples on the next page). Only after this “pact” with Automation, CliSiTef will send the floating point field collection command (through commands 34 or 30) as per the examples below
Parameters ContinueSiTefInteractive Function: CliSiTef ======= -> PDV |
---|
Command | FieldType |
---|---|
0 | No |
Gym | 2470 |
Examples of number of decimal places | Buffer |
---|---|
Lunch weight in grams with 2 boxes | 2 |
otal of the Fuel Pump in reais with 3 houses | 3 |
• In the example where the number of decimal places entered was 2, shortly afterwards, CliSitef will request the command
• In the example where the number of decimal places entered was 3, shortly afterwards, CliSitef will request the command 34: