POS-SiTef Browser

TECHNICAL SPECIFICATION#

Version B07.03.07r000 220711 Rev A

Summary#

Introduction

Objective

Target Audience

Version Characteristics

Solution Architecture

General Browser Operation

HTML Tags supported by the Browser

Constraints File

Communication with the POS-SiTef module

Management of images for printing

Printing and transaction confirmation flows

TEF data resending mechanism

Electronic Invoice: NFC-E and CF-E-SAT

JavaScript support

Cookie Support

Browser Identification

License View

Change History

Introduction#

This document aims to describe the Browser module. web) POS-SiTef.

Goal#

Help commercial automation developers integrate their solutions with the POS-SiTef Browser

Target-Audience#

All commercial automation developers and teams at Software Express.

Version Characteristics#

Below is the description of the versions:

Version 01.00

  • Initial version of the browser.

  • WiFi support.

  • Proxy support.

  • HTML 4 support: Limited interpretation. Tag descriptions Accepted tags are present in the HTML Tags supported by the Browser section.

  • Integration with POS-SiTef through form.

  • Use of VeriFone's VMAC architecture.

Version 01.03

  • Ethernet Combo support.

  • HTML 4 support: Accepts the password tag.

  • Improvements in field navigation in forms

  • Limited acceptance of cookies, for use in sessions.

Version 01.04

  • Support dialing via Dial Up.

  • Accept card tags in form fields.

  • Accept name resolution via DNS.

  • Printing pages.

Version 01.05

  • Miscellaneous fixes.

  • Definition of supervisor password to access part of functions.

Version 01.06

  • Inclusion of page cache.

Version 01.13

  • Various fixes regarding performance and WiFi.

  • GPRS support.

  • Inclusion of a word dictionary.

  • Inclusion of card reading blocking for any range.

Version 01.20

  • Various corrections regarding memory manipulation.

  • Correction of the address history function.

  • Inclusion of the serial type in the input tag for reading the serial port in forms.

  • Inclusion of the repom-smart type in the input tag for smart reading Repom cards in forms.

  • Partial JavaScript support (optional).

Version 01.21

  • Support list of allowed words.

  • Text printing functionality using the <PRE> tag.

Version 01.22

  • Change in the part where receipts are sent through the browser.

Version 01.29

  • Sending the model and serial number of the terminal along with the header "User-Agent" of HTTP messages.

  • Barcode printing within the print command (tag <PRE>).

  • Centering of texts in the print command (tag <CENTER> inside <PRE>).

  • Pause printing command (tag <PRE>).

Version 01.34

  • Creation of the TRANS_HAB option in the SITEF form for choice by the AC of payment method executed in the POS-SiTef module.

Version 01.36

  • Creation of the <ALARM> tag for the AC to send an alert to the user of the Browser.

Version 01.37

  • Creation of the EMPRESA option in the SITEF form to define the company code company in the transaction in question.

  • Inclusion of the characters ?$%()|_ in the ALPHA key.

  • Correction in the POST method (white spaces were blocked on the page ASP)

  • Correction in the parser of HTML pages with the printing tag <PRE>

  • Included fields COD_CLIENTE and NUM_PARC when receiving the FORM_TEF

  • Included fields NSU_HOST, NSU_SITEF, NSU_HOST_RECARGA, NSU_SITEF_RECARGA and VLTROCO in the FORM_TEF field response.

  • Correction of the treatment of the Field installments (surplus plots or invalid).

Version 01.38

  • Included communication header to display signal and battery.

  • Fix for accepting encryption key with lowercase letters

  • Includes treatment for the operating mode: POS Prints and Automation Confirms. (mode enabled in application licensing).

Version 01.39

  • Performance improvements when displaying pages larger than 5KB and in HTTP POST requests

  • Correction in the waiting time for page display

  • Improvements in the display of error codes

  • Correction in receiving data packets

  • Configuration - Correction in the "Other" GPRS APN configuration.

  • Configuration - Correction in layout, change of titles and order of collections.

  • Configuration - Removal of collections of number of routes, timeout and ping.

  • Configuration - "Cookies" option disabled by default.

  • Configuration - Removed timeout on collection screens.

  • Added key map in the Browser application.

  • Improvements to the version display screen.

  • Added the Print and Confirmation modality: POS Print and Confirm Automation

Version 02.00

  • Functionalities:

    • Display of Battery and Connection Status.

    • Configuration for Additional SiTef IP

    • Configuration for ticket header - costume, address, city, cnpj

    • Communication header with signal and battery icons

    • Information menu:

      • displaying IP data (EMV)

      • displaying terminal logical number

      • printing of information menu

      • SIM card ID and GPRS operator

    • Automatic download: Automatic query and back-up menu

    • Maintenance menu (device testing)

    • Cancellation of the 2nd copy of the ticket allowed

    • Configuration of the 1a route: establishment or customer

    • Minimum battery flow

    • Idle/off battery configuration

    • FormTEF fields: Return of the Authorization code field for the FormTEF.

  • Improvements:

    • Added physical reconnection between pages and TEF transaction

    • Manual communication configuration now only displays possible options to the terminal

    • Function menu: Moved supervisor password request to just within the options that require it

    • Communication Errors:

      • Display of messages for page error codes:

        • HTTP: 400 (badreq) 401 (auth), 403 (forbidden), 404 (notfound), 503 (internalservererror)

        • Internal: 902 (canc), 905 (timeout), 906 (dns), 907 (resetbypeer)

        • Internal: -52 (dns)

      • Message display for common error codes:

        • SIM Card Missing

        • Insufficient signal

        • Registration failed

        • Attach failure

Version 02.01

  • Correction of the lack of description of HTTP 500 errors (Internal Server error)

  • TEF EMPRESA field:

    • If present but empty, the SiTef company used will be the already configured in the terminal.

    • Otherwise, it is completed in 8 digits with leading zeros.

  • Performance improvement (reduced memory allocations unnecessary).

  • Removed display of the content of the <style> HTML tag. This tag is CSS are still not supported.

  • Correction of the possibility of passing more characters in HTML <input type="text"> than allowed by the maxlength attribute.

  • Correction in the treatment of special HTML text characters (e.g.: &aacute;).

  • Added activity display on the TEF screen Enter or swipe the card.

  • Correction of the terminal number not being used in TEF sales.

  • Added shipping of the full version and the serial number of the equipment when requesting a download.

Version 02.02

  • Increased the amount of memory available for JavaScript use.

Version 02.03

  • Correction of the treatment of the IMP_ and SAC_ fields (introduced in version 02.01).

  • Vx680 WiFi WPA-TKIP support

  • Added forwarding of local communication data from GerApps to Browser.

  • WiFi: Removed channel collection.

  • Added KSI snippet printing on the key map.

  • Added use of the # (sharp) key as . (dot) in IP settings.

  • Added support for POS Installation with URL, cookies and IP TEF additional.

  • Correction of the transaction confirmation message but not printed.

Version 02.04

  • WiFi: Addition of Vx680 WiFi WPA/WPA2 modes in TKIP/AES.

  • Correction of centralized TEF coupon printouts.

  • Use of Standard Interface 412-5.0.6. Fixes several issues card processing (e.g. 70-Invalid mode).

  • Correction in the handling of pending issues with additional IP TEF able.

  • Added use of # (sharp) key as . (dot) for IP TEF additional.

Version 02.05

  • Correction of inconsistency in the number of print columns. All pages print in 42 columns (introduced in version 01.37).

  • Correction of system error if the HTML </pre> tag is missing.

  • Correction of memory invasion when formatting some coupons of TEF.

  • Correction in the TEF print layout.

    • Terminal released by installation: added description "CNPJ" preceded by its value.

    • Terminal released by password: 4 empty lines removed unnecessary.

  • Information screen: added EOS version

  • Correction of the handling of the Cielo Premia transaction.

Version 02.06

  • Boleto: memory invasion correction for large fields.

  • Vx520: key reading correction.

  • Change in sending HTTP POST

    • No longer uses the 100-continue header and no longer sends the form content in a second message, avoiding problems caused by proxies and dropped connections.
  • Correction of HTTP POST redirecting to another page

    • Redirection is performed with a GET instead of POST. See "PRG (Post/Redirect/Get) Pattern".
  • Correction of sending duplicate Cookie in the HTTP header post-redirects.

Version 02.07

  • New blank page with several options, in case there is a failure connection or there is no home page configured. The options are:

    • Home page (if configured)

    • Sales SiTef and administrative SiTef (if the modality is POS Print and Confirm)

    • Information

    • More options (redirects to the full function menu).

  • Added support for HTTP tag <meta> with attribute http-equiv="refresh".

  • Fixed the <PRE> tag with URLOK/URLERR attribute using relative URLs.

  • Removed possibility of POST with non-relative URL, to prevent CSRF.

  • Removal of the POST restriction with an empty form (introduced in version 02.06).

  • Addition of the SITEF_MULTPAG method, which allows multiple payments in POS Print and Confirm mode.

  • Correction of the COD_CLIENTE field not having effects on transactions administrative.

  • Removed unnecessary termination of connection with TEF server between printing the coupon and confirming the transaction, saving time in each TEF performed.

  • Correction of wrong URLs loading after using redirection.

  • Changed manual TEX query to warn if the terminal is deconfigured.

  • Added option to configure maximum loading time page and page reception.

  • Added option to configure maximum downtime until abort an ongoing transaction.

  • VxEOS: Changed maximum number of sockets to 32 to reduce possibility of the "connect 24" error.

Version 02.08

  • Correction of redirection errors from URLs that have ? or # (bug introduced in version 02.07).

Version 02.10

  • Fixed timeout (error 905) when the server responds redirection to a form submission (bug introduced in 02.08)

Version B03.02.01r000

  • Added reuse of the TCP connection in a maximum of 5 seconds to page loading (it also depends on the configuration of the server). Every redirection reuses the same TCP connection.

  • Added appropriate error message when connection is refused (e.g. firewall or page server down)

Version B03.02.03r000

  • Correction of JavaScript error caused sporadically. The reason was problem in JavaScript parser when TCP fragmentation (which commonly occurs in GPRS) occurred in a line break within the tag <script>. This error could occur in all previous versions with JavaScript.

Version B03.02.04r000

  • Correction of cookies not accepting values ​​with special characters

  • Correction in the function to remove all cookies, which does not it worked since version 01.39.

  • Correction in the treatment of URLs starting with a slash (/). This error was introduced in version 02.07.

Version B03.02.05r000

  • Added optional response field NSU_HOST_DIGITADO, usable to link transactions such as cancellations and reprints.

Version B03.03.00r000

  • Simplified TEF module processing and status messages.

  • Support for compression of TEF module messages has been enabled (messages with the SiTef server).

Version B03.03.01rc01

  • Fixed WiFi password setting not allowing characters specials (#, ., etc.)

  • Added new value of the TIPO_TRN field with value 3 to allow use of any CliSiTef modality. To define the modality, it is necessary definition of the MOD_TRN field with the modality of the CliSiTef desired.

    • This feature allows you to perform, for example, Recharge Prepaid mobile phone.
  • Added fields RECCEL_OPERADORA and RECCEL_DDD_TELEFONE for Prepaid Cell Phone Recharge.

Version B03.03.02r000

  • Addition of return fields PAN_CARTAO_CRIPTOGRAFADO and VENCEMENT_CARTAO when .cha is enabled.

  • Addition of form method SITEF_CARTAO to collect PAN_CARTAO_CRIPTOGRAFADO and VENTIMENTO_CARTAO without making EFT.

Version B03.03.03r000

  • Addition of all other possible return fields using the .cha:

    • PAN_CARTAO_MASCARADO

    • NOME_PORTADOR

    • TRILHA1_MASCARADO

    • TRILHA2_MASCARADO

    • TRILHA3_MASCARADO

    • PAN_CARTAO_HASHDINAMICO

    • VENCIMENTO_CARTAO_HASHDINAMICO

    • NOME_PORTADOR_HASHDINAMICO

    • TRILHA1_HASHDINAMICO

    • TRILHA2_HASHDINAMICO

    • TRILHA3_HASHDINAMICO

    • VENCIMENTO_CARTAO_CRIPTOGRAFADO

    • NOME_PORTADOR_CRIPTOGRAFADO

    • TRILHA1_CRIPTOGRAFADO

    • TRILHA2_CRIPTOGRAFADO

    • TRILHA3_CRIPTOGRAFADO

    • PAN_CARTAO_HASHFIXO

    • VENCIMENTO_CARTAO_HASHFIXO

    • NOME_PORTADOR_HASHFIXO

    • TRILHA1_HASHFIXO

    • TRILHA2_HASHFIXO

    • TRILHA3_HASHFIXO.

  • Changed form method SITEF_CARTAO so that it is possible to renegotiate of a new .cha when terminal opening times out. Until the version previously, it was necessary to initiate a TEF so that the opening of terminal, which carries out the .cha negotiation, could be triggered.

  • Changed form methods SITEF and SITEF_PAGMULT to return the same Customer Code used as input.

Version B03.03.04r000

  • Addition of the SITEF_INFO form method to retrieve equipment data. Currently, SiTef Terminal, SiTef Company and S/N do Terminal.

  • Extension of the SITEF form method to allow invocation of any CliSiTef modality via fields TIPO_TRN=3 and MOD_TRN

Version B03.03.05r000

  • Extension of the SITEF form method to return the same MOD_TRN field used in the request.

  • Restructuring of the Pooling configuration menu (see the Pooling manual user).

  • Increased internal cookie limits.

Version B04.00.01rc00

  • Possibility of printing QRcode using the special command qrcodestart from tag <PRE>

    • Verifone Verix eVo models only

Version B05.00.00r000

  • Restructuring of the information menu

  • Correction in the function menu, the page was rendered incorrectly again before executing the option.

  • Simplification/centralization of the coupon confirmation flow via tag <PRE> with URLOK and URLERR attributes

  • Correction in the pooling flow

  • Fixed communication header not showing immediately after an automatic transaction change the screen

  • Removed support for the <print> HTML tag, which is undocumented and allowed memory invasions by the page

Version B05.00.02r000

Version B05.01.00r000

  • Removed serial and repom-smart values ​​as attributes type of the <input> tag.

  • Deprecated card value as type attribute of <input> tag. Replace the flow with <form method="SITEF_CARTAO">.

  • Added date and time values ​​for the tag's type attribute <input>

  • Added data-swex-keymap attribute to <input type="text">, serving as a keystroke filter

  • Added onfocus and onblur attributes to <input> and tags <select>.

  • JS DOM: Added document.forms object, containing all tags <form>

  • JS DOM: Added document.forms[idx].elements object (also referenceable via document.<formname>.elements), containing all <input> tags and <select> below the <form> tag.

  • Removed display of the URL of the page being loaded (can be restored via Data Terminal).

Version B05.01.01r000

  • Addition of the form method SITEF_FINALIZA to allow finalizing in the POS transactions carried out in the Confirm Automation modalities.

  • Added return DATAHORA_SITEF to form method SITEF and SITEF_PAGMULT

  • Added returns VERSAO_APL, MODALIDADE_APL, LIBERACAO, INST_ID_REDE, INST_ID_CHAVE_ATIVACAO, COMP_NOME_FANTASIA, COMP_LOGRADOURO, COMP_CIDADE, COMP_CNPJ for form method SITEF_INFO

  • Correction of documentation: the "POS Print and Confirm" confirms the transaction immediately before printing the coupon. The documentation incorrectly stated that the transaction was undone. The section has been rewritten.

Version B05.01.03r000

  • Support for automation reporting subacquiring data to the Browser for form method SITEF and SITEF_PAGMULT with fields SUB_*.

  • Support for automation to query subacquiring data configured in the Browser at the time of installation with the form method SITEF_INFO.

  • The COMP_CNPJ field in the form method response was deprecated SITEF_INFO.

  • Correction of some cases where the Browser ignores the transaction value passed by automation.

Version B05.01.04r000

  • Fix form submit via JavaScript not being executed when the current page was loaded via <PRE>, <META>, 'page home', 'refresh page' or 'enter address' (problem arose in version B05.01.00r000).

  • Fix redirect not running when page current was loaded by another redirection (e.g. via <PRE>)

Version B05.01.05r000

  • Correction of post-print card removal not occurring in Browser Print and Confirm mode (problem arose in the version B04.00.00r000).

Version B05.01.06r000

  • Added the data-swex-mask attribute to this documentation for use by <input type="text"> tag to collect masked data in display (e.g. for CPF and CNPJ). This attribute has existed since version B05.01.00r000.

  • Added decimal value to data-swex-mask attribute for use from the <input type="text"> tag to collect fractional data (e.g. volume in liters or monetary)

  • Added data-swex-fracdigits attribute to define quantity of digits from the fractional collection for the data-swex-mask="decimal" attribute.

  • Addition of the beep() javascript method, which emits sound pre-defined in the POS.

  • Correction of the coupon footer printing flow not being executed TEF (IMP_XX fields). Changed documentation to reflect the implementation - the print order was always reversed (ex: IMP_03 IMP_02 - IMP_01). Problem occurred since version B04.00.00r000.

  • Crash correction when the Browser is configured to display title (<title>) but this was not provided by the page. Problem occurred in all versions.

  • Correction of screen dirt (inverted letters or backgrounds) during screen transitions. Problem occurred since version B04.00.00r000.

Version B05.01.07r000

  • Correction of the mechanism for resending TEF data not having in certain conditions the mandatory fields: EMPRESA, TERMINAL, VALOR, CODTRANS

  • Correction of warning not being displayed when the last transaction was confirmed but no coupon was printed

  • Fixed issues when activating the HTTP Proxy

Version B05.01.12r000

  • Added ability to not print coupon header data (required for Subacquiring projects)

Versão B05.01.13r000

  • Adicionado suporte aos terminais Verifone VxEOS E265, PAX Prolin S920 e Gertec GEDI GPOS400

  • Correção de travamento do terminal ao configurar Proxy com IP/porta inválida

  • Melhoria de performance de telas durante navegação de páginas

  • Adicionado cabeçalho de comunicação em todas as telas (páginas, editores de campos nas páginas e módulo TEF)

Versão B05.01.14r000

  • Removida exibição repetida de erros de comunicação

  • Melhoria de performance de telas durante navegação de páginas

  • Correções de tela em relação à versão anterior

  • Correções diversas para PAX Prolin

Versão B05.01.15rc01

  • Correção do mecanismo de reenvio dos dados TEF ao reiniciar o terminal

  • Adição do campo RESULTADOS para obter resultados CliSiTef nos métodos SITEF, SITEF_PAGMULT e SITEF_CARTAO

  • Adição dos comandos de impressão \barcode128, \barcode128h e \feed

Versão B05.02.02rc01

  • Adição do campo PAR_TRN_<TIPO CAMPO>_<N> para fornecer dados solicitados pela CliSiTef no método SITEF

Versão B05.03.00r000

  • Junção das versões B05.01.15rc01 e B05.02.02rc01

Version B05.03.03r000

  • Addition of the REENVIO return field to indicate that the message was triggered by the TEF data forwarding mechanism.

Version B05.04.01r000

  • Ingenico Telium 2: Added support for QRCode printing.

Version B05.05.00r000

  • Added <meta data-swex-ui="pos"> for step-by-step editing

  • Addition of <meta data-swex-ui="inline"> to not use field editor

  • Added <meta data-swex-cancel-url="linkcanc.html" data-swex-cancel-action="abort"> to make the cancel key call a URL

  • Added <meta data-swex-ui="pos" data-swex-cancel-url="linkcanc.html" data-swex-cancel-action="abort-if-first"> to make the cancel key call a URL only in the first step-by-step edit

  • Correction of the NSU_SITEF and NSU_HOST fields not returning the NSU of Prepaid Cell Phone Recharge transaction with EFT

  • Addition of the RESULTADOS_SEPARADOR input field in the SITEF methods, SITEF_CARTAO and SITEF_PAGMULT to obtain TypeFields repeated within the same transaction

  • Changed COMP_DADOS_CONF return field to concatenate the confirmations of a chained transaction, separating with ;

  • Changed the SITEF_INFO method to return the PEND_QTDETRANS field (number of pending transactions in the terminal) and the fields PEND_CUPOM_FISCAL_<i>, PEND_DATA_FISCAL_<i>, PEND_HORA_FISCAL_<i>, PEND_MOD_TRN_<i>, PEND_VALOR_<i> for each pending transaction.

  • (Browser Automation Confirma) Changed SITEF_FINALIZA method to accept the input fields COMP_CUPOM_FISCAL, COMP_DATA_FISCAL and COMP_HORA_FISCAL and deprecated use of COMP_DADOS_CONF and CODRESP. COMP_DADOS_CONF + CODRESP can still be used for transactions started before the version change.

  • (Browser Automation Confirma) Changed SITEF method to accept the COMP_USAR_DADOS_CONF, which means that a transaction can still be completed in the old way (via COMP_DADOS_CONF) and that the method SITEF_INFO does not report the transaction as pending.

  • Added TITLE attribute to INPUT and SELECT tags.

Version B05.05.01r000

  • Fixed DNS resolution of large domain names

Version B05.06.09r000

  • Verifone C680: Increased screen font.

  • Correction and standardization of the printing module: Verifone Terminals VxEOS supports accented characters

  • Correction and standardization of the printing module: Telium 2 Terminals, Telium Tetra and PAX-Prolin with faster printing speed

  • Correction and standardization of the printing module: PAX-Prolin Terminals and Gertec GEDI with faster printing speed, stronger font and line spacing equalized with Verifone

Version B05.06.11r000

  • Correction so that CODRESP 00 + rest of the transaction data is sent if the terminal restarts during the request. 2a copy of the coupon in POS Print and Confirm mode. Previously, the code 98 was sent.

Version B05.07.02r000

  • Inclusion of the IMG_CARREGA and IMG_APAGA methods.

  • Added print command \img

Version B05.09.06r000

  • Correction of the <PRE> tag when there are consecutive subcommands (e.g. feed followed by pause), not executing the subcommand correctly and considering the print as failed, invoking the URLERR attribute.

  • Correction of the User-Agent with application name and serial number with spaces instead of underscores (error in versions B05.07.xx, B05.08.xx, B05.09.04 and B05.09.05)

Version B06.02.00r000

  • Creation of the DOC_INTEGRATOR field in the SITEF method so that Automation Commercial can inform SiTef of the Integrator's CNPJ.

Version B07.03.00r000 210706

  • Change so that it is possible to pass, in the COD_AUTORIZACAO field of the SITEF method, the extended NSU returned from FEPAS of size up to 99 characters.

Version B07.03.06r000 220613

  • Creation of the PAR_TRN_CODBAR_<TIPO CAMPO>_<N> field of the SITEF method to enable, for Commercial Automation, the pre-definition of the barcode to be provided in transactions bill payment, thus avoiding the intervention of the POS operator in a possible collection.

Version B07.03.07r000 220711

  • Creation of the CD_HABILITADAS and CD_RESTRICOES fields of the SITEF method to enable for Commercial Automation to filter, for each transaction, the options displayed in the wallet menu digital;
  • Creation of the CD_PRIORIZADAS field of the SITEF method to allow Commercial Automation pre-define, for each transaction, the order in which the options will be displayed in the wallet menu digital;
  • Creation of the RESTRICOES_PAGTO field of the SITEF method to allow Commercial Automation Restrict, for each transaction, the payment methods displayed on the POS screen.

Solution Architecture#

For naming purposes, it is defined as POS-SiTef browser (referred to as in this document only by browser) the web navigation module that will be loaded inside the POS, together with the POS-SiTef module (referred to in this document only as POS-SiTef), which will be responsible to carry out the electronic funds transfer part.

The browser works together with POS-SiTef and uses the following transactional flow:

  1. The Commercial Automation (AC) developer will write the pages relating to commercial automation software, which will be interpreted by the browser.

  2. When it is necessary to finalize any financial transaction, the CA developer will create a form as described in Forms section.

  3. When you select the form submit button, the browser will download the execution flow for the POS-SiTef module, which will perform the payment as described in section Communication with the POS-SiTef module.

  4. After payment is made, the execution flow will return to the browser. You can continue browsing other pages.

It is up to the page developer for the AC server to notice the following items:

  1. Use HTML code according to the rules described in section HTML Tags supported by the Browser. Tags not described in this document will be ignored. Not all HTML 4 tags are interpreted according to the specification.

  2. JavaScript support is limited (enough for validation of form fields).

  3. Images, sounds and videos will not be displayed.

  4. Server languages ​​(ASP, ASP.NET, PHP, JSP, among others) can be used, as long as the result of executing the scripts is made in HTML format.

  5. Applets are not supported.

The solution architecture represented in the following figure:

Figure 1

For TCP/IP communication, WIFI, GPRS and Ethernet according to the POS hardware capacity.

POS-SiTef#

Application that collects transactional data: customer card, password encrypted, etc. and performs transactions with SiTef.

POS-SiTef Browser#

Application responsible for interpreting pages in HTML format, execute JavaScript scripts and talk to the POS-SiTef module.

General Browser Operation#

Home Screens#

When started, the browser will show the presentation screen for configuration, or if it is already configured and connected it will display the automation's own HTML page.

For more details on general operation and features available, see the manual: POS-SiTef - Navigator - User Manual User.pdf.

Terminal already configured with home page configured and accessible:

#ScreenDescription
1Loading parameters

POS-SiTef Browser
01.39-20120827-tj
Displays the application version while applying configurations received by external means (download or POS installation).
2Connecting...

POS-SiTef Browser
01.39-20120827-tj
Displays the application version while physically connecting the terminal. This operation may take up to three minutes, depending on the type of connection (GPRS, WiFi).
3Loading application PLEASE WAIT...

POS-SiTef Browser
01.39-20120827-tj
Displays the application version while initializing the application.
4«HOME PAGE»Displays the home page. User: Performs its internal procedures according to the page displayed. You can also press the [F2] key to access the function menu.(*)

Table 1: Home screens

Terminal not configured or with unconfigured home page:

#ScreenDescription
1FUNCTIONS MENU

>DIRECT TEF - SALE

DIRECT TEF - ADM

HOME PAGE

UPDATE PAGE

TOOLS

SUPPORT

DATA TERMINAL
Displays the application version while applying
configurations received by external means
(telecharge or POS installation).

Table 2

HTML Tags supported by the Browser#

The HTML pages that will be viewed by the browser may contain any standard HTML version 4.0 tag. However, only some tags will be interpreted, all others will be ignored. In future versions of browser new tags can be included in this documentation. The tags can be written in uppercase or lowercase, depending on the choice of the developer.

<META HTTP-EQUIV="REFRESH" CONTENT="tempo;URL=url">#

The http-equiv="refresh" attribute is currently supported limited.

HTTP-EQUIV#

The HTTP-EQUIV parameter only accepts the value "REFRESH", indicating page redirection after page has finished loading chain.

CONTENT#

The CONTENT parameter has the values ​​needed for the attribute http-equiv and accepts the following values:

  1. "time": time in seconds to redirect the page after finish loading the current page. If it is zero, the current page is not stored in history, to prevent loops redirection. This value is mandatory.

  2. "URL=url": URL, relative or absolute, where to redirect the page. This value is mandatory.

<META data-swex-ui="modo" data-swex-cancel-action="acao" data-swex-cancel-url="url">#

data-swex-ui#

Identifies the editing mode for form fields. Use a of the following values:

  • browser or missing (UI Browser): keystrokes [0-9] or [ENTER] with the cursor on <INPUT> or <SELECT> opens a screen edition.

  • inline (inline UI): keystrokes [0-9], [ALPHA] or [CLEAR] with the cursor on <INPUT> or [LEFT] or [RIGHT] in <SELECT> directly changes the data.

  • pos (UI POS): opens sequential editing screens for all <INPUT>s and <SELECT>s of the first existing <FORM>. Automatically sends data in the last step. This mode makes the tags <A>, <P>, <BR>, <INPUT TYPE="SUBMIT"> and <INPUT TYPE="RESET"> are ignored.

data-swex-cancel-url#

Defines the URL that will be called according to the attribute rules data-swex-cancel-action, described below.

data-swex-cancel-action#

Identifies the behavior of the [CANCEL] key. Use one of following values:

  • none or absent:

    • In UI Browser mode, the [CANCEL] key does nothing.

    • In inline UI mode, the [CANCEL] key undoes the changes made in the selected field.

    • In UI POS mode, the [CANCEL] key returns to editing the step previous.

  • abort: the [CANCEL] key calls the URL defined by the attribute data-swex-cancel-url.

  • abort-if-first: (POS UI mode only) if the current edition is the First, the [CANCEL] key calls the URL defined by the attribute data-swex-cancel-url.

<TITLE> and </TITLE>#

These two tags mark the beginning and end of the title of an HTML page. All text contained between these two tags (limited to the size of the terminal display) will be shown in the second line of the browser, as demonstrated below, but only if the display is enabled in the Data Terminal function:

http://
title content
Rest of the page

<P>#

Leaves a blank line in the browser. The </p> tag is not necessary.

<BR>#

Skip to the next line in the browser. Attention: several <br> commands in sequence will not leave several lines blank. To do this, use the <p> tag.

Texts#

Any text present that is not contained in some parameter some specific tag will be shown literally on the screen browser. Until this current version, tables will be ignored.

  • Text formatting tags like <font>, <strong>, etc. will be ignored.

  • Any white space at the beginning of a text will be ignored.

Example html page:

<!DOCTYPE html>
<title>SiTef 01 POS Test</title>
<p>Text on html page</p>
<p>Next line</p>
<p>
Blank line in the middle
<table border="0">
<tr>
<td align="right"><strong>Ignored Table</strong></td>
</tr>
</table>
Text after table

It will be shown as follows in the browser:

Text on html page
Next Line
Blank line on me
io
Skipped Table
Text after table

To scroll through the rest of a page, press [F3] to go up the page and [F4] to go down the page.

<SCRIPT> and </SCRIPT>#

Used to define a script. JavaScript is only supported and in a limited way (see section JavaScript Support.)

Forms#

The following tags are supported for form submission.

<FORM METHOD="metodo" ACTION="acao" ONSUBMIT="script"> and </FORM>#

The tag that indicates the beginning of a form has the following parameters accepted by the browser:

METHOD#

The METHOD parameter, indicating the form submission method, accepts the following values:

  1. GET

  2. POST

  3. SITEF

  4. SITEF_FINALIZA

  5. SITEF_CARTAO

  6. SITEF_INFO

  7. IMG_CARREGA

  8. IMG_APAGA

The SITEF and SITEF_CARTAO methods are used to indicate a call to the POS-SiTef module, described in section Communication with the module POS-SiTef.

The SITEF_FINALIZA method finalizes a completed transaction (confirm or undo/unconfirm) in the Automation Print and Confirm modes and Browser Print Automation Confirm.

The SITEF_CARTAO method collects card data without performing a transaction with SiTef. The data, after collected, is returned to the page. A specific file must be added to the server SiTef, with the extension .cha.

The SITEF_INFO method collects and returns information from the terminal to the page.

The IMG_CARREGA method loads an image for printing on the receipt. See more information at IMG_CARREGA METHOD

The IMG_APAGA method deletes an image previously loaded into the POS. To see more information in IMG_APAGA METHOD

ACTION#

The ACTION parameter will indicate the form's landing page. A page may have the relative or absolute address.

ONSUBMIT#

Defines a JavaScript script that will be executed when the user trigger the form submission command. In this case, the form is sent only if the script returns a true value. This parameter is typically used to check field values ​​before sending of the form. See section Print confirmation for more details.

<INPUT TYPE="fieldType" NAME="fieldName" VALUE="initialValue" TITLE="title" MAXLENGTH="tamanhoMaximo" data-swex-keymap="mapaTeclado" ONFOCUS="script" ONBLUR="script">#

The INPUT tag indicates data collection, and will be accepted by the browser the following parameters:

TYPE#

The TYPE parameter, which indicates what type of field will be collected, currently accepts the following values:

  1. TEXT: collects data in a text field. If the TYPE parameter is not present in the INPUT tag, the TEXT type will automatically be assumed.

  2. HIDDEN

  3. PASSWORD: collects data with a mask. Important Note: Usage of this tag is restricted. Check your usage in the section Constraints file creation process.

  4. DATE: collects a field with a date mask. Introduced in version B5.1.0r0.

  5. TIME: collects a field with a time mask. Introduced in version B5.1.0r0.

  6. SUBMIT: submits the form.

  7. RESET: clears the form.

NAME#

Identifies the name of the field to be sent to the receiving page the form data. If this parameter is not present, the field will not be sent.

TITLE#

Identifies the title displayed during field editing, used only in UI Browser (default) and UI POS.

VALUE#

Identifies the initial value of a field. If the type is SUBMIT or RESET, will be the value of the button text.

MAXLENGTH#

Identifies the maximum size of a field. If the type is DATE, TIME, SUBMIT or RESET, the parameter is ignored. Note: does not prevent the page server provides a VALUE with a size greater than provided.

data-swex-keymap#

Introduced in version B5.1.0r0. Available only for types TEXT and PASSWORD. It can have the following values:

  • numeric: Only allows typing of numeric keys. Note: no prevents the page server from providing a VALUE with other characters.

  • currency: Only allows typing of numeric keys and has display with monetary value format. The maximum size is 12, which can be decreased via the MAXLENGTH parameter. The transmitted data will be in cents and without separators.

  • alpha: Only allows typing of characters a-z and A-Z. Note: no prevents the page server from providing a VALUE with other characters.

  • alphaspace: Only allows typing of characters a-z, A-Z and space. Note: does not prevent the page server from providing a VALUE with other characters.

  • alphanumeric: Only allows typing characters a-z, A-Z and 0-9. Note: does not prevent the page server from providing a VALUE with other characters.

  • alphanumericspace: Only allows typing characters a-z, A-Z, 0-9 and space. Note: Does not prevent the page server from providing a VALUE with other characters.

  • alphaupper: Only allows typing of characters A-Z. Note: no prevents the page server from providing a VALUE with other characters.

  • alphaspaceupper: Only allows typing of characters A-Z and space. Note: does not prevent the page server from providing a VALUE with other characters.

  • alphanumericupper: Only allows typing of characters A-Z and 0-9. Note: does not prevent the page server from providing a VALUE with other characters.

  • alphanumericspaceupper: Only allows typing of characters A-Z, 0-9 and space. Note: Does not prevent the page server from providing a VALUE with other characters.

  • alphalower: Only allows typing of characters a-z. Note: no prevents the page server from providing a VALUE with other characters.

  • alphaspacelower: Only allows typing of characters a-z and space. Note: does not prevent the page server from providing a VALUE with other characters.

  • alphanumericlower: Only allows typing of characters a-z and 0-9. Note: does not prevent the page server from providing a VALUE with other characters.

  • alphanumericspacelower: Only allows typing of characters a-z, 0-9 and space. Note: Does not prevent the page server from providing a VALUE with other characters.

  • all: Default value. Equivalent to the absence of the parameter.

  • allupper: Default value, but forces uppercase characters.

  • allower: Default value, but forces lowercase characters.

  • decimal (introduced in version B05.01.06r000): Allows only typing of numeric keys and has value format display volumetric (by default, three decimal places). Unlike the currency value, this value allows arbitrary maximum size. Like this currency, the data transmitted when the form is sent will be without separators.

data-swex-fracdigits#

Introduced in version B5.1.6r0. Available only for TEXT types and PASSWORD using data-swex-keymap='decimal'. Defines the number of digits in the fractional part. For example, use "2" for monetary collection in cents or "3" for monetary collection in liters.

data-swex-mask#

Introduced in version B5.1.0r0. Available only for types TEXT and PASSWORD. Sets a fill mask for the data, where its numeric characters will be replaced by the data collected and its non-numeric characters will be displayed next to the collect. The mask is only for display in the Browser - the mask is not sent along with the data when the form is sent to the server. The mask size has priority over others values ​​(size and maxlength). See the following examples:

Example for collecting CPF:

<!DOCTYPE html>
<title>POS-SiTef Form</TITLE>
<form action="recebe-cpf.php" method="POST">
<p>CPF field:</p>
<input type="text" data-swex-keymap="numeric" data-swex-mask="999.999.999-99" name="fieldCPF" value="22233344405">
<input type="submit" value="Submit">
</form>

Example for collecting CNPJ:

<!DOCTYPE html>
<title>POS-SiTef Form</TITLE>
<form action="recebe-cnpj.php" method="POST">
<p>CNPJ Field:</p>
<input type="text" data-swex-keymap="numeric" data-swex-mask="99.999.999/9999-99" name="fieldCNPJ">
<input type="submit" value="Submit">
</form>

ONFOCUS#

Introduced in version B5.1.0r0. Defines a JavaScript script that will be executed when the user starts the data editing screen. Any result of the script will be ignored (it is not possible to cancel the data editing entry).

ONBLUR#

Introduced in version B5.1.0r0. Defines a JavaScript script that will be executed when the user leaves the data editing screen. Any result of the script will be ignored (it is not possible to cancel the data editing output).

<SELECT NAME="fieldname" TITLE="title" ONFOCUS="script" ONBLUR="script"> and </SELECT>#

Identifies a field for selecting some value. In this version of browser, it is not possible to perform multiple selection of values. will be The following parameters are accepted:

NAME#

Identifies the name of the field to be sent to the receiving page the form data. If this parameter is not present, the field will not be sent.

TITLE#

Identifies the title displayed during field editing, used only in UI Browser (default) and UI POS.

ONFOCUS#

Introduced in version B5.1.0r0. Defines a JavaScript script that will be executed when the user starts the data editing screen. Any result of the script will be ignored (it is not possible to cancel the data editing entry).

ONBLUR#

Introduced in version B5.1.0r0. Defines a JavaScript script that will be executed when the user leaves the data editing screen. Any result of the script will be ignored (it is not possible to cancel the data editing output).

<OPTION VALUE="valueField" [SELECTED]> and </OPTION>#

Within a SELECT tag, the OPTION tag indicates the option that can be selected. The text between the beginning and end of an OPTION tag will be shown as the option text in the browser. The following will be accepted parameters:

VALUE#

Identifies the value of the option.

SELECTED#

Identifies this option as the one that should be chosen initially by default.

When sending information through a form, please pay attention for the following observations:

  1. Preferably use POST as the form submission method.

  2. Name all collection fields.

  3. There is no option, unlike traditional browsers, to resending the form if the browser is already showing the page receiving data.

  4. Each collection field will be displayed on 1 line of the display.

  5. In the current version it is not possible to place text next to a field collect.

<INPUT TYPE="DATE" NAME="fieldName" VALUE="initialValue" TITLE="title" ONFOCUS="script" ONBLUR="script">#

NAME#

Identifies the name of the field to be sent to the receiving page the form data. If this parameter is not present, the field will not be sent.

TITLE#

Identifies the title displayed during field editing, used only in UI Browser (default) and UI POS.

VALUE#

Identifies the initial value of a field. The value must be in the format YYYY-MM-DD and must correspond to a valid date, according to the following rules:

  • YYYY corresponds to the year: exactly four numeric characters.

  • Year cannot be 0000.

  • MM corresponds to the month: exactly two numeric characters.

  • Month cannot be 00 and cannot be greater than 12.

  • DD corresponds to the day: exactly two numeric characters.

  • Day cannot be 00 and cannot be greater than 31.

  • If the month is 04, 06, 09 or 11, the day cannot be greater than 30.

  • If the month is 02:

    • If the year is divisible by 400 or the year is divisible by 4 but not by 100, the day cannot be greater than 29.

    • Otherwise, the day cannot be greater than 28.

If the value is an invalid date, the initial value of the field will be empty.

The data display is always in DD/MM/YYYY format, while the data traffic is always in the format YYYY-MM-DD.

ONFOCUS#

Defines a JavaScript script that will be executed when the user start the data editing screen. Any result of the script will be ignored (it is not possible to cancel the entry action of editing the given away).

ONBLUR#

Defines a JavaScript script that will be executed when the user exits from the data editing screen. Any result of the script will be ignored (it is not possible to cancel the data editing exit action).

<INPUT TYPE="TIME" NAME="fieldName" TITLE="title" STEP="granularidade" VALUE="initialValue" ONFOCUS="script" ONBLUR="script">#

NAME#

Identifies the name of the field to be sent to the receiving page the form data. If this parameter is not present, the field will not be sent.

TITLE#

Identifies the title displayed during field editing, used only in UI Browser (default) and UI POS.

STEP#

Identifies the granularity, in seconds, of the field value. Use a of the following values:

  • any, 60 or absent: allows data collection in HH:MM format

  • 1: allows data collection in HH:MM:SS format

  • 0.001: allows data collection in the format HH:MM:SS.FFF

VALUE#

Identifies the initial value of a field. The value must be in the format according to the STEP parameter and must correspond to a valid time, according to the following rules:

  • HH corresponds to the time: exactly two numeric characters.

    • Time cannot be greater than the value 23.
  • MM corresponds to the minute: exactly two numeric characters.

    • Minute cannot be greater than 59.
  • SS matches the second: exactly two numeric characters.

    • Second cannot be greater than 59. There is no representation for seconds leap seconds.
  • FFF corresponds to milliseconds: between 1 and 3 numeric characters.

If the value is an invalid time, the initial value of the field will be empty. If the value is a valid time, but does not fit the format defined by STEP, extra fields are ignored.

The data display is always in the format HH:MM, HH:MM:SS or HH:MM:SS,FFF (completed with zeros on the right), while the data traffic is always in the format HH:MM, HH:MM:SS or HH:MM:SS.FFF (this completed with trailing zeros). That is, milliseconds are separated by a comma in the display and a period in the data traffic.

ONFOCUS#

Defines a JavaScript script that will be executed when the user start the data editing screen. Any result of the script will be ignored (it is not possible to cancel the entry action of editing the given away).

ONBLUR#

Defines a JavaScript script that will be executed when the user exits from the data editing screen. Any result of the script will be ignored (it is not possible to cancel the data editing exit action).

Example of collection form#

Example of collection form in UI Browser (default) or inline UI

<!DOCTYPE html>
<title>POS-SiTef Form</title>
<p>Form</p>
<p>
<form action="recebe-form1.php" method="POST">
<p>Text Field:&nbsp;</p>
<input type="text" size="50" name="textfield" value="Initial Text">
<p>Selection Field:&nbsp;</p>
<select name="fieldSelecao">
<option value="1">Option 01</option>
<option value="2">Option 02</option>
<option value="3" selected>Option 03</option>
</select>
<p>Hidden Field:&nbsp;</p>
<input type="hidden" name="hidden field" value="Any Value">
<input type="submit" value="Submit">
<input type="reset" value="Clear">
</form>
<!DOCTYPE html>
<meta data-swex-ui="inline">
<title>POS-SiTef Form</title>
<p>Form</p>
<p>
<form action="recebe-form1.php" method="POST">
<p>Text Field:&nbsp;</p>
<input type="text" size="50" name="textfield" value="Initial Text">
<p>Selection Field:&nbsp;</p>
<select name="fieldSelecao">
<option value="1">Option 01</option>
<option value="2">Option 02</option>
<option value="3" selected>Option 03</option>
</select>
<p>Hidden Field:&nbsp;</p>
<input type="hidden" name="fieldHidden" value="Valor Qualquer">
<input type="submit" value="Enviar">
<input type="reset" value="Limpar">
</form>

They will be shown as follows in the browser:

Form
Text Field:
[Initial Text]
Selection Field:
[Option 03]
Hidden Field:
"To send "
"To clean "

To cycle through the different fields that a form can contain, use the [DOWN] or [UP] buttons. In this case, an arrow will indicate which field was selected. To scroll through the rest of the page, continue using the [DOWN] or [UP] buttons:

In UI Browser mode (default), to insert some data into a field present in a form, after selecting the field, press the [0-9] or [ENTER] key

FIELD: textfield
Initial Text
>: OK
<: CLEAN | X:CANCEL
FIELD: Selection field
Option 01
Option 02
>Option 03
>:OK | X:CANCEL

For inline UI mode, to insert some data into a <input> field, After selecting the field, press the [0-9], [ALPHA] or [CLEAR]. To change the selection of a <select> field, after having Selecting the field, press the [LEFT] or [RIGHT] key. A Editing will be done in the display itself.

To send the form, press the [ENTER] key, after having selected the submit button

Selection Field
[Option 03]
Hidden Field:
>«Send»
"To clean "

Collection form example in UI POS

<!DOCTYPE html>
<meta data-swex-ui="pos">
<title>POS-SiTef Form</title>
<p>Form</p>
<p>
<form action="recebe-form1.php" method="POST">
<p>Text Field:&nbsp;</p>
<input type="text" size="50" name="textfield" value="Initial Text" title="Enter text">
<p>Selection Field:&nbsp;</p>
<select name="Selectfield" title="Select option">
<option value="1">Option 01</option>
<option value="2">Option 02</option>
<option value="3" selected>Option 03</option>
</select>
<p>Hidden Field:&nbsp;</p>
<input type="hidden" name="hidden field" value="Any Value">
<input type="submit" value="Submit">
<input type="reset" value="Clear">
</form>

It will be shown as follows in the browser:

Enter text
Initial text
Select option
Option 01
Option 02
>Option 03

<A HREF="url"> and </A>#

To insert a link to another page, use the A and /A tags. Any text placed between these two tags will indicate the link text to be shown in the browser.

HREF#

Indicates the address to which the page should be directed. It may be relative or absolute.

To scroll through the various links, use the [DOWN] or [UP], the chosen link will be underlined. After choosing the link, press the [ENTER] button to activate it. Another way to Choosing the link to be accessed is using one of the shortcut keys numeric. On the left side of each link a number is shown that corresponds to the shortcut key. If the shortcut key is pressed, the corresponding link is accessed immediately, even if another link is selected. Note that this feature is only used until the tenth link on the page.

Example:

<a href="texto1.php">Link to the page containing the first example</a>
<br>
<a href="texto2.php">Second Example</a>
1 Link to page
which contains the first
example
2 Second Example

Print command#

This feature allows you to print texts contained on a page HTML. All content between the tags <PRE> and </PRE> is printed in the moment of opening the page, considering the following observations.

  • Spaces between words and blank lines are preserved. Avoid indenting the content, as the indentation spaces will be printed. Also avoid using the <P> and <BR> tags to break lines, they are not necessary and generate an undefined result.

  • The tags <B> and <EM> allow some font formatting. To the letters between <B> and </B> are printed twice as wide and letters between <EM> and </EM> are printed twice as large height. You can combine both options to print letters with twice the width and twice the height. The normal font is 42 columns (with a fixed size), therefore, the source has 21 columns double wide.

  • To print special characters, you must use named entities. For example, instead of the character <, you must use the sequence &lt;. Accents are also in this case, so for For example, the character á must be encoded as &aacute;.

  • The <CENTER> tag can be used to center the lines of the text. Any other tag for this purpose will not have the expected effect.

Special commands#

One line with text

\feed

is replaced by blank lines to advance the paper to the cut-line.

One line with text

\barcode <n> <code>

is replaced by the barcode image in the I25 standard corresponding to the code digit sequence. The parameter n determines the thickness in points of the thin bar. The number of digits in the code must be even. The code image is always centered horizontally. Any text that is on the same line as \barcode and after <code> will be ignored (it will not be printed). Note that the digit code is not automatically printed with the barcode, this must be done by the page developer (see example below).

One line with text

\barcode128 <n> <code>

is replaced by the vertical barcode image in the pattern Code128 corresponding to the code digit sequence. The n parameter determines the thickness in points of the thin bar. The code image is always centered horizontally. Any text that is in same line as \barcode128 and after <code> will be ignored (not will be printed). Note that the code in digits is not printed automatically with the barcode, this must be done by the page developer (see example below).

One line with text

\barcode128h <n> <code>

is replaced by the barcode image, preferably in horizontal in the Code128 pattern corresponding to the digit sequence code (if the image does not fit on the printer, printing will be done automatically vertically). The parameter n determines the thickness in thin bar points. The code image is always centered horizontally. Any text that is on the same line as \barcode128h and after <code> will be ignored (it will not be printed). Note that the digit code is not printed automatically with the barcode, this must be done by the developer of the page (see example below).

One line with text

\pause [wait] [message]

causes printing to pause until the user presses press a key or until the waiting time has passed. The optional parameter wait determines the time in seconds for this wait. If this value is zero, the wait is infinite. The message parameter is also optional and, if informed, it is displayed on the terminal screen during the pause. Case Otherwise, a default message is displayed.

One line with text

\qrcodestart <n> <m> <text>\qrcodeend

is replaced by the image of the QR code corresponding to the text <text>. The <n> parameter is used to choose between the QR code normal (<n>=0) or micro QR code (<n>=1). The <m> parameter is used to define the correction level, being <m>=0 for the correction level low (L), <m>=1 for medium level (M), <m>=2 for level quartile (Q) and <m>=3 for the high level (H).

Any text after \qrcodeend on the same line will be ignored (will not be printed). If \qrcodeend is omitted, the encoded section goes to the end of the </PRE> tag.


In Verifone VxEOS, the command is available from version B04.00.01rc00.

In Ingenico Telium 2, the command is available from version B05.04.01r000.

In Gertec GEDI, the command is available from version B05.01.04r000.

In PAX Prolin, the command is available from version B05.01.13r000.


Due to limitations imposed by the terminal printer and the print coupon size, to ensure consistent reading of the QR code, the Browser works with versions 1 to 17 of the QR code and with the M3 and M4 versions of the micro QR code. Therefore, the maximum sizes of Encoded data for each correction level can be viewed through the following tables:

TypeVersionCorrection LevelMaximum number of binary charactersCode
QR code17L644\qrcodestart 0 0
QR code17M504\qrcodestart 0 1
QR code17Q364\qrcodestart 0 2
QR code17H280\qrcodestart 0 3

Table 3

TypeVersionCorrection LevelMaximum number of binary charactersCode
Micro QR codeM4L15\qrcodestart 1 0
Micro QR codeM4M13\qrcodestart 1 1
Micro QR codeM4Q9\qrcodestart 1 1

Table 4

Legend: L - Low level; M - Medium level; Q - Quartile level; H - High level

One line with text

\img <image name> <required>

prints a monochrome BMP image previously loaded into the POS, where

  • <image name> is the name of the image that was saved in the POS and
  • <required>
    • 0 or absent continues with the rest of the printout of the receipt even if the image printing fails;
    • 1 stops printing as an error if the image is not printed.

Print confirmation#

There is a mechanism to confirm whether the print was successful or not. The URLOK and URLERR attributes of the <PRE> tag define addresses that are accessed after the page loads. The URLOK address, if defined, is accessed if no printing error is detected. O URLERR address, if defined, is accessed if a printing error occurs is detected. The two attributes are independent of each other and optional. If they are not defined, no redirection occurs. If there is more than one <PRE> tag on the same page with addresses confirmation defined, the Browser only accesses the successful address of the last tag. In case of error, however, the Browser accesses the tag URL where the error occurred.

If for any reason the terminal is turned off during printing, the Browser assumes printing failed. The next time the terminal is turned back on, the Browser tries to access the corresponding error URL. If If this attempt fails, the Browser gives the user the options to try again or give up accessing the error URL forever. note that in case of multiple <PRE> tags on the same page, there is a chance that shutdown occurs at the moment right after printing a tag and immediately before processing the next tag. In this case, the URL accessed will be the OK button for the last successfully printed tag.

The case of connection loss is similar to disconnection.

Example of a page with the print command

<!DOCTYPE html>
<title>Print Test</title>
<p> This text appears on the screen, but the following is printed. </p>
<pre urlok="http://www.x.y.z/impressao.php"id=123&res=ok" urlerr="http://www.x.y.z/impressao.php"id=123&res=erro">
Normal text
Normal indented text
Normal indented text
<b>Double Width</b>
<em>Double Height</em>
<b><em>Double Height and Width</em></b>
&lt;ABC&gt;
<em>mis</em><b>tur</b><em><b>ado</b></em> sizes
<center><em>
Barcode
\barcode 4 1234567890
<b>1234567890</b>
</em></center>
Three blank lines:
\feed
\pause 3 Cut the coupon in 3s.
\pause Please press a key.
\pause
</pre>

Page Minimization#

It is recommended to use HTML and JavaScript minimizers (search by html minify and javascript minify to find tools online) to reduce the size of pages that are sent to the POS.

In most cases, the reduction is around 80% - this means that, on GPRS communication media (approx. 286 bytes/s), a page of 5000 bytes, loaded in approximately 18 seconds, would be loaded in approximately 4 seconds.

URL handling#

URLs can be characterized as absolute or relative. The URLs are absolute when they have the character : before /, ?, # and will be relative otherwise.

For example, all URLs starting with http:/ are considered absolute. The URLs index.html, /dir/pagina.html, /pos, login.html?user=abc are relative.

Until version B3.2.4r0, several inconsistencies occurred when using Relative URLs. The tags that allow relative URLs are as follows:

  • <A HREF="url">

  • <FORM ACTION="url">

  • <PRE URLOK="url1" URLERR="url2">

  • <META HTTP-EQUIV="REFRESH" CONTENT="time;URL=url">

There are known problems with interpreting relative URLs between versions 02.07 and B3.2.3r0, as described in section Version Characteristics, unduly causing error 404 (page not found).

To prevent errors from occurring when transitioning versions from this period, It is recommended that pages do not start URLs with / (slash) or ./ (dot followed by slash).

Constraints File#

To ensure security when using the browser, a restrictions file so that pages read on the device cannot have codes of dubious content.

Constraints file creation process#

The file that is generated by Software Express will be loaded in all browser versions, after it goes through an encryption process 3DES with MD5.

This file will be responsible for:

  • Restriction of words contained in the pages read

    The restrictions file will contain all words not allowed for be displayed on the browser screen. If any are found word from this list on a loaded page, the entire string and/or tag using that word will be automatically deleted from the page in question. question. The string can span the entire page, if that page consists of a single text that contains the prohibited word.

  • Allowing some words containing restricted strings

    There may be situations in which the presence of a restricted word in the middle of a known word, delete it. For these cases, it was created a list of permitted words, so that the pair can be made checking.

  • Restriction of the <input type="password"> tag

    In this case, the field name must be contained in the name list possible for this tag. If the name is not on the list described in the constraints file, this tag will be ignored.

  • List of words that cannot be present on pages loaded in the browser. This list will be changed as necessary necessary.

    • 'SENHA' 'S ENHA' 'SE NHA' 'SEN HA' 'SENH A' 'S E N H A'

    • 'CHAVE' 'C HAVE' 'CH AVE' 'CHA VE' 'CHAV E' 'C H A V E'

    • 'ACESSO' 'A CESSO' 'AC ESSO' 'ACE SSO' 'ACES SO' 'ACESS O' 'A C E S S O'

    • 'PASS' 'P ASS' 'PA SS' 'PAS S' 'P A S S' 'PASSWORD' 'P ASSWORD' 'PA SSWORD' 'PAS SWORD'

    • 'PASS WORD' 'PASSW ORD' 'PASSWO RD' 'PASSWOR D'

    • 'P A S S W O R D'

    • 'ACCESSO' 'A CCESSO' 'AC CESSO' 'ACCE SSO' 'ACCES SO' 'ACCESS O' 'A C C E S S O'

    • 'CLAVE' 'C LAVE' 'CL AVE' 'CLA VE' 'CLAV E' 'C L A V E'

    • 'SEÑA' 'S EÑA' 'SE ÑA' 'SEÑ A' 'S E Ñ A' 'SENA' 'S ENA' 'SE NA' 'SEN A' 'S E N A'

    • 'CONTRASEÑA' 'C ONTRASEÑA' 'CO NTRASEÑA' 'CON TRASEÑA' 'CONT RASEÑA' 'CONTR ASEÑA'

    • 'CONTRA SEÑA' 'CONTRAS EÑA' 'CONTRASE ÑA'

    • 'CONTRASEÑ A' 'C O N T R A S E Ñ A' 'CONTRASENA'

    • 'C ONTRASENA' 'CO NTRASENA' 'CON TRASENA' 'CONT RASENA' 'CONTR ASENA' 'CONTRA SENA'

    • 'CONTRAS ENA' 'CONTRASE NA' 'CONTRASEN A'

    • 'C O N T R A S E N A'

    • 'PIN' 'PI N' 'P IN' 'P I N'

  • List of allowed words that contain word excerpts restricted. This list will be changed as necessary.

    • 'PINHEIRO' 'ALPINO' 'PINGA'
  • List of allowed names for fields of this type PASSWORD: 'LOGIN'

Communication with the POS-SiTef module#

Communication with the POS-SiTef module, to carry out transactions or Collection of card data occurs via HTML form.


Important notes to the AC developer:

  • In addition to the parameters mentioned later, in the section Characteristics of WEB server response fields, POS-SiTef Browser may return others without prior notice. Be prepared to receive extra parameters that can be ignored.
  • Not all parameters mentioned in section Characteristics of WEB server response fields, can be present in all transactions. Some parameters may not be sent depending on the payment method or if the transaction is not is completed, for example.
  • For details related to digital wallet transactions, please refer to the "Payments" document PIX in POS-SITEF and BROWSER - Requirements and Flow".*

Characteristics of the information submission form#

Below is the list of features:

  1. The METHOD parameter of the FORM tag must be composed by the words SITEF, SITEF_FINALIZA, SITEF_CARTAO or SITEF_INFO (in upper or lower case).

  2. The SITEF_CARTAO method, which collects data from a card, only returns data if there is a .cha file on the SiTef server.

  3. The SITEF_FINALIZA method allows completion (confirmation or undoing/non-confirmation) of a transaction carried out via Automation modalities Print and Confirm or Browser Print and Automation Confirms.

  4. The ACTION parameter of the FORM tag will contain the file name for the which will be sent information about the payment made. That response page must be handled by the developer of the AC server as if a message was being sent to it form with POST method.

SITEF method: Fields that may be present to send information to the POS-SiTef module#


Name:"VALUE"
Size:Up to 12
Type:Numeric
Optional:Yes
Description:Amount of payment to be made. If the value entered is 0, POS-Sitef will collect the field.
Field Type: numeric, with the last two digits considered as decimal places. Note: semicolon characters may be present, but are automatically removed.
Examples:
100 = will be treated as 1.00
1225 = will be treated as 12.25
100.00 = will be treated as 100.00
12.3.4 = will be treated as 12.34

Name:"COMPANY"
Size:8
Type:Alphanumeric
Optional:Yes
Description:SiTef company code.
Use of this field is not recommended. Use it only if strictly necessary.
This field is ignored if the terminal was released by POS Installation.
If it is not present, the Browser passes the company code configured on the terminal to the POS-SiTef module.
The field will be completed with leading zeros to complete the required 8 characters.

Name:"NUM_PARC"
Size:Up to 2
Type:Numeric
Optional:Yes
Description:Number of Installments.
Only valid if the Enabled Transactions field TRANS_HAB indicates an installment type transaction.

Name:"TYPE_TRN"
Size:1
Type:Numeric
Optional:Yes
Description:Type of Transaction to be carried out. Possible values:
1: Financial Transaction
2: Administrative Transaction
3: Direct Transaction
If the value has not been defined , the value 1 will be adopted, Financial Transaction.

Name:"MOD_TRN"
Size:Up to 4
Type:Numeric
Optional:Yes
Description:[From version B03.03.01.r000] Type of transaction to be carried out.
This parameter is the CliSiTef modality. The most used modal codes are the following:
0: Generic payment
113: Reprint of Specific Receipt
114: Reprint of the Last Receipt
200: Normal Cancellation
300: Prepaid Cell Phone Recharge
Note: this parameter will only be used if TIPO_TRN is passed as a value 3.

Name:"TRANS_HAB"
Size:Variable
Type:Alphanumeric
Optional:Yes
Description:Transactions Enabled.
Payment methods that the POS-SiTef module makes available in its menu. This parameter is defined as a list of payment method codes separated by the character ;. The modality codes are as follows:
16: Debit in cash
26: Credit in cash
27: Credit in installments with financing from the establishment
28: Credit in installments with financing from the administrator
Field Type: numeric with semicolon separator ;
Examples: TRANS_HAB="16;26" . In this example, the POS-SiTef module will only make cash debit and credit options available in its menu.
If only one option is defined (for example, TRANS_HAB="16"), the menu will not is displayed and the modality is selected automatically.
The absence of this parameter or its definition as empty text causes the module to show the default options defined in the terminal configuration file.

Name:"PAR_TRN_<FIELD TYPE>_<N>"
Size:Variable
Type:Alphanumeric
Optional:Yes
Description:Transaction parameters.
This field is used for the CA to send data via the page, thus avoiding some collections and operator intervention in carrying out the transaction.
It is the full responsibility of the AC sends the fields properly assembled and formatted, with the risk of aborting the transaction, incomplete data passing or the parameter being ignored and opening the collection.
For security reasons, some parameters will not be accepted. Ex: PAN of the card. Each time the parameter is used, it is consumed. This allows the AC to pass more than one value for collection if it is executed more than once during the transaction.
<FIELD TYPE> is a numeric value that corresponds to a transaction parameter. Each parameter has its shape and size. See more details in table 5, below. A more complete table with the description of TypeFields can also be consulted in the Table of values ​​for TypeField section of the document SiTef - Simplified Interface with the application.
<N> nth entry of field type current, indicating the order in which the data will be passed to the payment module. It starts at 1 and cannot have holes in the sequence.
Example, to pass 2 types of fields (999 and 909), one with 3 values ​​and the other with 2 values:
PAR\_TRN\_999\_1 =abc
PAR\_TRN\_999\_2=defg
PAR\_TRN\_999\_3=xyz
PAR\_TRN\_909\ _1=1023
PAR\_TRN\_909\_2=0

Field TypeSizeTypeDescription
146up to 13NAmount of the transaction to be canceled. Value in cents.
5154.8NDate of the transaction to be canceled. DDMMYYY or DDMM format.
516up to 20ANNumber of the document to be canceled or to be reprinted.

Table 5: FieldType for the field PAR_TRN_<FIELD TYPE>


With the natural evolution of the POS-SiTef Browser and the specification of acquiring networks, the TypeCampos list may undergo additions, removals and changes without prior notice its formats and sizes.


Name:"COD_CLIENT"
Size:Up to 20
Type:Alphanumeric
Optional:Yes
Description:Customer Code.
Field to identify the customer transaction in the SiTef report. The value entered in this field is displayed in the SiTefWEB report.

Name:"COMP_CUPOM_TAX"
Size:Up to 20
Type:Alphanumeric
Optional:Yes
Description:Tax Coupon for the transaction.
If not informed, the value is generated by the POS-SiTef module.
In Confirma Automation, it is highly recommended that this data is generated by Automation, so that Automation can, behind the scenes, resolve possible pending issues.
As of version B05.00.00r000, this field is used to finalize a transaction.

Name:"COMP_DATA_TAX"
Size:8
Type:Alphanumeric
Optional:Yes
Description:Tax Date of the transaction.
If not informed, the value is generated by the POS-SiTef module.
In Confirma Automation, it is highly recommended that this data is generated by Automation, so that Automation can, behind the scenes, resolve possible pending issues.
As of version B05.00.00r000, this field is used to finalize a transaction.

Name:"COMP_TIME_TAX"
Size:6
Type:Alphanumeric
Optional:Yes
Description:Fiscal Time of the transaction.
If not informed, the value is generated by the POS-SiTef module.
In Confirma Automation, it is highly recommended that this data is generated by Automation, so that Automation can, behind the scenes, resolve possible pending issues.
As of version B05.00.00r000, this field is used to finalize a transaction.

Name:"IMP_XX"
Size:Up to 38
Type:Alphanumeric
Optional:Yes
Description:Line to be printed on the receipt - AC server.
Line to be printed at the end of the customer copy with information from the AC server. Example: thank you message.
IMP_01="THANKS FOR YOUR PREFERENCE"
IMP_02="COME BACK ALWAYS"

Name:"SAC_XX"
Size:Variable
Type:Alphanumeric
Optional:Yes
Description:Fields to be sent along with the payment result to the AC server. These fields are used so that the AC server can, for example, identify the original transaction.

Name:"SUB_NAME_COSTUME"
Size:Up to 22
Type:Alphanumeric
Optional:Yes
Description:Fantastic name of the subacquirer that will be sent to the authorizer.
The treatment of this field can be disabled via the installation service.
This field changes the TEF coupon header.

Name:"SUB_LOGRADOURO"
Size:Up to 40
Type:Alphanumeric
Optional:Yes
Description:Sub-acquiring location that will be sent to the authorizer.
The treatment of this field can be disabled via the installation service.
This field changes the TEF coupon header.

Name:"SUB_CITY"
Size:Up to 13
Type:Alphanumeric
Optional:Yes
Description:City of the subacquirer that will be sent to the authorizer.
The treatment of this field can be disabled via the installation service.
This field changes the TEF coupon header.

Name:"SUB_UF"
Size:2
Type:Alphanumeric
Optional:Yes
Description:Federative unit of the sub-acquirer that will be sent to the authorizer.
The treatment of this field can be disabled via the installation service.
This field changes the TEF coupon header.

Name:"SUB_COUNTRY"
Size:3
Type:Alphanumeric
Optional:Yes
Description:Country of subacquiring that will be sent to the authorizer.
The treatment of this field can be disabled via the installation service.
This field changes the TEF coupon header.

Name:"SUB_CEP"
Size:8
Type:Numeric
Optional:Yes
Description:CEP of the subacquirer that will be sent to the authorizer.
The treatment of this field can be disabled via the installation service.
This field changes the TEF coupon header.

Name:"SUB_MCC"
Size:4
Type:Numeric
Optional:Yes
Description:Merchant Category Code of the subacquirer that will be sent to the authorizer.
The treatment of this field can be disabled via the installation service.
This field changes the TEF coupon header.

Name:"SUB_CNPJ_CPF"
Size:Up to 14
Type:Numeric
Optional:Yes
Description:CNPJ/CPF of the subacquirer that will be sent to the authorizer.
The treatment of this field can be disabled via the installation service.
This field changes the TEF coupon header.

Name:"SUB_TEL"
Size:Up to 11
Type:Numeric
Optional:Yes
Description:Telephone number of the subacquirer that will be sent to the authorizer.
The treatment of this field can be disabled via the installation service.
This field changes the TEF coupon header.

Name:"SUB_SOFT_DESC"
Size:Up to 22
Type:Alphanumeric
Optional:Yes
Description:Software Descriptor of the subacquirer that will be sent to the authorizer.
The treatment of this field can be disabled via the installation service.
This field changes the TEF coupon header.

Name:"SUB_EMAIL"
Size:Up to 99
Type:Alphanumeric
Optional:Yes
Description:Email from the subacquirer that will be sent to the authorizer.
The treatment of this field can be disabled via the installation service.
This field changes the TEF coupon header.

Name:"RESULTS"
Size:Variable
Type:Alphanumeric
Optional:Yes
Description:CliSiTef data request.
Field with FieldType values ​​that will be retrieved from the SiTef Client, separated by square brackets.
Example: `[133][136][160] `
Consult the Table of values ​​for TypeField section of the SiTef - Simplified Interface with the application manual to check the possible values. For values ​​related to transactions with digital wallets, see the Field Codes section of the CliSiTef - Application Interface - Digital Wallets manual.

Name:"RESULTS_SEPARATOR"
Size:Variable
Type:Alphanumeric
Optional:Yes
Description:[From version B05.05.00r000] Used in conjunction with RESULTS.
Allows you to retrieve multiple Field Types in the same transaction (as is the case in chained transactions ).
If it is absent, only the last reported FieldType is retrieved.
The value of this field defines the separator used between the reported FieldTypes. Example: ;

Name:"DOC_INTEGRATOR"
Size:14
Type:Numeric
Optional:Yes
Description:[From version B06.02.00r000] Allows Commercial Automation to inform an Integrator CNPJ, information that will be passed in id 2 of the ParmsClient configuration in Additional Parameters of the CliSiTef ConfiguraIntSiTefInterativoEx routine. See the Additional Automation/Establishment Information section of the CliSiTef manual SiTef - Simplified Interface with the application for more details.
The CNPJ must be entered only with numbers, that is, without . , - or /. If the data entered does not correspond to a valid CNPJ, it will be ignored.

Name:"PAR_TRN_CODBAR_<FIELD TYPE>_<N>"
Size:Variable
Type:Alphanumeric
Optional:Yes
Description:[From version B07.03.06r000 220613] Pre-definition of a barcode that will be requested during the transaction.

This field is used for the AC sends a barcode via the page, thus avoiding the intervention of the POS operator in carrying out the transaction. The barcode provided by AC is passed by the browser to clisitef when it issues a 35 command. Details about the commands issued by CliSitef can be found in the document SiTef - Simplified Interface with the application. The Command Code Table section of this document contains a table with the description of the commands.

When passing the barcode, the CA must also inform whether it was collected manually or by the reader, the which is indicated by prefixing the numerical sequence corresponding to the code with 0: or 1: respectively.

It is the CA's sole responsibility to send the value of the field properly assembled and formatted, at the risk of aborting the transaction, incomplete data passing or the parameter being ignored and, as a result, a collection being displayed on the POS screen requiring operator intervention.

Each time a barcode is used, it is consumed. This allows the CA to pre-define more than one value for the collection if it is made more than once during the transaction.

<FIELD TYPE> is a numeric value that corresponds to a transaction parameter that is in barcode format. The field types treated by the application in the 35 command are currently the following: -1, 624 and 1116. A table with the description of the field types can be consulted in the Table of values ​​for TypeField section of the document SiTef - Simplified Interface with the application.
<N> nth entry of the field type, indicating the order in which the data will be passed to the payment module. It starts at 1 and cannot have holes in the sequence.

Example: to pass 3 barcodes corresponding to field type -1 in a transaction in which the command 35 is issued 3 times, the page can provide the following fields

PAR_TRN_CODBAR_-1_1=0:23791111036000000010301000222206148622000000000
PAR_TRN_CODBAR_-1_2=1:0019050095401 4481606906809350314337370000000100
PARTRN_CODBAR-1_3=1:03399493803800000000000422701011256740000042000``

In this case, the page also reported that the first barcode was collected manually and the other two were read by the AC using a barcode reader.

Name:"CD_ENABLED"
Size:Variable
Type:Alphanumeric
Optional:Yes
Description:[From version B07.03.07r000 220711] Digital wallets enabled.
Definition of options to be displayed in the digital wallets menu of the POS-SiTef module. This parameter is defined as a list of digital wallet menu codes separated by the character ; or the character ,. A table of digital wallet menu codes and their respective names can be consulted in the Menu Codes section of the document Digital Wallets - CliSiTef Library.
Example: CD_HABILITADAS=00380009;00760023;00600012
In this example, the POS-SiTef module will make available, in the digital wallet menu, only the options Itaú, AME Digital and PicPay.
If only one option is defined, as for example in CD_HABILITADAS=00600012 , the menu is not displayed and the digital wallet is selected automatically.
The absence of this parameter or its definition as empty text makes the module show all available digital wallet options.

Name:"CD_RESTRICOES"
Size:Variable
Type:Alphanumeric
Optional:Yes
Description:[From version B07.03.07r000 220711] Digital wallets restricted.
Restriction of options to be displayed in the digital wallets menu of the POS-SiTef module. This parameter is defined as a list of digital wallet menu codes separated by the character ; or the character ,. A table of digital wallet menu codes and their respective names can be consulted in the Menu Codes section of the document Digital Wallets - CliSiTef Library.
Example: CD_RESTRICOES=00380009;00760023;00600012
In this example, the POS-SiTef module will not display, in the digital wallet menu, the options Itaú, AME Digital and PicPay.
The absence of this parameter or its definition as an empty text makes the module show all available digital wallet options.

Name:"CD_PRIORIZED"
Size:Variable
Type:Alphanumeric
Optional:Yes
Description:[From version B07.03.07r000 220711] Setting the position of digital wallet options in the menu.
This parameter is defined as a list of digital wallet menu codes separated by the character ; or the character ,. A table of digital wallet menu codes and their respective names can be consulted in the Menu Codes section of the document Digital Wallets - CliSiTef Library.
Example: CD_PRIORIZADAS=00380009;00760023;00600012 .
In this example, the POS-SiTef module will display, in the digital wallet menu and in this order, the options Itaú, AME Digital and PicPay. If there are more digital wallets to be displayed in the menu besides these three, they will appear after the options in this prioritized fixed menu.

Name:"RESTRICTIONS_PAYMENT"
Size:Variable
Type:Alphanumeric
Optional:Yes
Description:[From version B07.03.07r0000 220711] Restricted transactions.
Payment methods that should not be displayed in the POS-SiTef module menu. This parameter is defined as a list of payment method codes separated by the character ; or the character ,. The modality codes can be consulted in the Table of payment method codes, configurations and menus section of the document SiTef - Simplified Interface with the application.
Example: RESTRICOES_PAGTO=16;26. In this example, the POS-SiTef module will not display the cash debit and credit options in its menu.

SITEF_FINALIZA Method: Fields that may be present to send information to the POS-SiTef module#


Name:"COMP_DADOS_CONF"
Size:Variable
Type:Alphanumeric
Optional:No (only if completion is performed via this field)
Description:[Deprecated use from version B05.05.00r000] Confirmation Data.
This data is returned by a transaction carried out in the Confirm Automation modalities.
Only one transaction at a time can be completed. In chained transactions, such as Prepaid Cell Phone Recharge with EFT, the Automation will need to separate the confirmation data, which have a semicolon ; between them.
When using this data to finalize the transaction , the response will contain the fields
COMP_DADOS_CONF and CODRESP.
From version B05.05.00r000, use the fields COMP_CUPOM_FISCAL, COMP_DATA_FISCAL and COMP_TIME_TAX. In the case of a chained transaction, these three data are identical, completing all parts.

Name:"COMP_CUPOM_TAX"
Size:Up to 20
Type:Alphanumeric
Optional:No (only if completion is carried out via Coupon, Tax Date and Time)
Description:[From version B05.05.00r000] Transaction Tax Coupon.
All transactions with the same Tax Coupon and the same Tax Date on the terminal will be completed at the same time.
When using this data to finalize the transaction, the response will contain the fields
COMP_CUPOM_FISCAL, COMP_DATA_FISCAL and COMP_HORA_FISCAL.

Name:"COMP_DATA_TAX"
Size:8
Type:Alphanumeric
Optional:No (only if completion is carried out via Coupon, Tax Date and Time)
Description:[From version B05.05.00r000] Fiscal Date of the transaction.
All transactions with the same Fiscal Coupon and the same Fiscal Date on the terminal will be completed at the same time.
When using this data to finalize the transaction, the response will contain the fields
COMP_CUPOM_FISCAL, COMP_DATA_FISCAL and COMP_HORA_FISCAL.

Name:"COMP_TIME_TAX"
Size:6
Type:Alphanumeric
Optional:No (only if completion is carried out via Coupon, Tax Date and Time)
Description:[From version B05.05.00r000] Fiscal Time of the transaction.

Name:"COMP_VALUE_CONF"
Size:1
Type:Numeric
Optional:No
Description:Confirmation Value. Value used to complete the transaction:
0: Undoes (does not confirm) the transaction
1: Confirms the transaction

SITEF_CARTAO Method: Fields that may be present to send information to the POS-SiTef module#


Name:"RESULTS"
Size:Variable
Type:Alphanumeric
Optional:Yes
Description:Field with FieldType values ​​that will be retrieved from the SiTef Client, separated by square brackets.
Example: [133][136][160]
See section Table of values ​​for TypeField from the SiTef - Simplified Interface with the application manual to check possible values. For values ​​related to transactions with digital wallets, see the Field Codes section of the CliSiTef manual - Application Interface - Digital Wallets.

Name:"RESULTS_SEPARATOR"
Size:Variable
Type:Alphanumeric
Optional:Yes
Description:[From version B05.05.00r000] Used in conjunction with RESULTS. Allows you to retrieve multiple FieldTypes from the same transaction (as is the case in chained transactions).
If it is absent, only the last reported FieldType is retrieved.
The value of this field defines the separator used between the reported FieldTypes . Example: ;.

SITEF_INFO Method: Fields that may be present to send information to the POS-SiTef module#

There are currently no input fields for the SITEF_INFO method.

Examples#

Example of a page that allows you to top up a prepaid cell phone (mode 300):

<!DOCTYPE html>
<TITLE> Sitef </TITLE>
<form action="recebe-tef.php" method="SITEF">
<input type="hidden" name="TIPO_TRN" value="3">
<input type="hidden" name="MOD_TRN" value="300">
<select name="TRANS_HAB">
<option value="60;61;62;63;16;26">All forms of payment</option> <option value="60">Money</option>
<option value="61">Check</option>
<option value="62;16">Debit</option>
<option value="63;26;30">Credit</option>
</select>
<br>
<input type="submit" value="Submit">
<input type="reset" value="Clear">
</form>

Example of a page for calling the SITEF_CARTAO method:

<!DOCTYPE html>
<TITLE>Receive Card</TITLE>
<form action="example/recebe/cartao.php" method="SITEF_CARTAO">
<input type="submit" value="Collect Card Data">
</form>

Example of a page for calling the SITEF_INFO method:

<!DOCTYPE html>
<TITLE>Terminal Data</TITLE>
<form name="formsitef" action="example/recebe-dados-terminal.php" method="SITEF_INFO">
<input type="submit" value="Collect Terminal Data">
</form> <script> document.formsitef.submit();
</script>

Example of a page for calling the SITEF_FINALIZA method, to Manually finalize a transaction in the Confirm Automation mode:

<!DOCTYPE html>
<TITLE>Finalizes Transaction (Automation Confirms only)</TITLE>
<form name="formsitef" action="example/recebe-finaliza.php" method="SITEF_FINALIZA">
<input type="text" name="COMP_CUPOM_FISCAL">
<p>Original date to confirm</p>
<input type="text" name="COMP_DATA_FISCAL">
<p>Original time to confirm</p>
<input type="text" name="COMP_HORA_FISCAL">
<p>1=Confirm, 0=No Confirm</p>
<p>
<input type="text" name="COMP_VALOR_CONF" size="1" value="1" data-swex-keymap="numeric">
<input type="submit" value="Finish manually">
</form>

To automatically confirm a transaction, change <input type="text"> to <input type="hidden"> and add shipping form automatic:

<script>document.formsitef.submit();</script>


In some versions of the Browser, send automatic form does not work when there is no the <input type="submit"> tag. Therefore, its inclusion is recommended.


Characteristics of WEB server response fields#

After making payment (and if necessary, printing the receipt) through the POS-SiTef module, the browser will send to the AC server, via WEB server (through the page indicated in the initial form), some fields relating to the payment made.

For reference purposes, the page that receives the data must treat it as if they had been sent via a form you were using POST method.

SITEF Method: Fields that may be present to respond to information from the POS to the WEB server#


Name:"COMPANY"
Size:8
Type:Alphanumeric
Optional:No
Description:Company code used in SiTef.

Name:"TYPE_TRN"
Size:1
Type:Numeric
Optional:Yes
Description:Transaction Type. Same value sent in the request.

Name:"MOD_TRN"
Size:Up to 4
Type:Numeric
Optional:Yes
Description:Transaction Type. Same value sent in the request.

Name:"TERMINAL"
Size:8
Type:Alphanumeric
Optional:No
Description:Terminal Identification. Terminal identification used in SiTef

Name:"COD_CLIENT"
Size:Up to 20
Type:Alphanumeric
Optional:Yes
Description:Customer Code. Same value sent in the request.

Name:"CODRESP"
Size:2
Type:Alphanumeric
Optional:Yes
Description:Response code for the transaction carried out with CliSiTef

Name:"CODTRANS"
Size:2
Type:Alphanumeric
Optional:No
Description:Transaction Code.
Indicates code of the transaction carried out. Possible values:
"00": Check Inquiry
"01": Debit Card
"02": Credit Card
Note : for transactions that do not communicate with authorizers (e.g. Reprint), this field will be filled with "00".

Name:"VALUE"
Size:Up to 12
Type:Numeric
Optional:No
Description:Amount Paid.
Field with the amount paid in the transaction with SiTef. Numeric, with the last two digits being decimals (cents).

Name:"NETWORK_AUT"
Size:4 to 5
Type:Alphanumeric
Optional:Yes
Description:Authorizing Network.
Field containing the authorizing network of the TEF transaction carried out. Values ​​for reference:
0001: Tecban
0004: Visanet
0005: Redecard
00006: Amex
00021: Banrisul
00031: Fuel ticket
00082: GetNet
00125: Visanet - Specification 4.1

Name:"FLAG"
Size:5
Type:Alphanumeric
Optional:Yes
Description:Field containing the flag of the TEF transaction carried out.
The complete list of flag codes is available in the document Standard Flag SiTef.pdf.
Some examples are below.
00000: Other, not defined
00001: Visa (Credit)
00002: Mastercard (Credit)
00004: American Express (Credit)
00011: JCB (Credit)
10014: Discovery (Voucher)
20001: Maestro (Debit)<br/ >20002: Visa Electron (Debit)
20137: Telenet (Debit)

Name:"NUM_PARC"
Size:Up to 2
Type:Numeric
Optional:Yes
Description:Instalments.
Field containing the number of installments of the transaction. If it is absent, or has a value of "0" or "1", consider selling it in cash.

Name:"TYPE_PARC"
Size:2
Type:Alphanumeric
Optional:Yes
Description:Type of installment.
Possible values:
"00": Cash
"01": Pre-Dated
"02": Establishment Installments
"03": Installments Administrator

Name:"NSU_SITEF"
Size:6
Type:Alphanumeric
Optional:Yes
Description:SiTef NSU.

Name:"NSU_SITEF_RECARGA"
Size:6
Type:Alphanumeric
Optional:Yes
Description:Sitef NSU corresponding to the Card Recharge payment transaction

Name:"NSU_HOST"
Size:Up to 15
Type:Alphanumeric
Optional:Yes
Description:NSU of the Authorizing Host.

Name:"NSU_HOST_RECHARGE"
Size:Up to 15
Type:Alphanumeric
Optional:Yes
Description:NSU of the Authorizing Host corresponding to the Card Recharge payment transaction.

Name:"NSU_HOST_TYPE"
Size:Up to 15
Type:Alphanumeric
Optional:Yes
Description:NSU of the Host entered by the operator during data collection before the transaction.
This data is exactly what the operator enters. It is commonly used only when the response code is 00.
This field can be used in Specific Cancellations and Reprints to link this transaction to the original transaction.

Name:"COD_AUTORIZACAO"
Size:Up to 99
Type:Alphanumeric
Optional:Yes
Description:Credit transaction authorization code (only present in credit card transactions).

Name:"VLTROCO"
Size:Up to 12
Type:Numeric
Optional:Yes
Description:Change / Withdrawal Amount.
Contains the approved amount for cash change. Used for purchases with Cash available for some networks.

Name:"COMP_1VIA"
Size:Variable
Type:Alphanumeric
Optional:Yes
Description:First copy of the receipt.
Text containing the first copy of the receipt to be printed by the AC server.
Commercial Automation must consider characters @ as breaking line.
This data is only provided when the modality is Print Automation and the transaction is approved.

Name:"COMP_2VIA"
Size:Variable
Type:Alphanumeric
Optional:Yes
Description:Second copy of the receipt.
Text containing the second copy of the receipt to be printed by the AC server.
Commercial Automation must consider characters @ as breaking line.
This data is only provided when the modality is Print Automation and the transaction is approved.

Name:"COMP_DADOS_CONF"
Size:Variable
Type:Alphanumeric
Optional:Yes
Description:Confirmation Data.
Data used in Confirm Automation (deprecated mode) to finalize a transaction using the SITEF_FINALIZA method.
From version B05.05.00 r000, use the method SITEF_FINALIZA with the fields COMP_CUPOM_FISCAL, COMP_DATA_FISCAL and COMP_HORA_FISCAL.

Name:"COMP_CUPOM_TAX"
Size:Up to 20
Type:Alphanumeric
Optional:Yes
Description:Tax Coupon for the transaction.
In Automação Confirma, from version B05.05.00r000 onwards, this data is necessary to finalize a transaction via the SITEF_FINALIZA method.

Name:"COMP_DATA_TAX"
Size:8
Type:Alphanumeric
Optional:Yes
Description:Tax Date of the transaction.
In Automação Confirma, from version B05.05.00r000 onwards, this data is necessary to finalize a transaction via the SITEF_FINALIZA method.

Name:"COMP_TIME_TAX"
Size:6
Type:Alphanumeric
Optional:Yes
Description:Fiscal Time of the transaction.
In Automação Confirma, from version B05.05.00r000 onwards, this data is necessary to finalize a transaction via the SITEF_FINALIZA method.

Name:"DATAHORA_SITEF"
Size:14
Type:Numeric
Optional:Yes
Description:Date and time of the transaction before SiTef.
Date and time of the transaction before SiTef in the format YYYYMMDDHHMMSS

Name:"SAC_XX"
Size:Variable
Type:Alphanumeric
Optional:Yes
Description:Additional Information.
The same fields (with the same values) that were sent to the browser through the initial form will be resent to the AC server.

Name:"RECCEL_OPERATOR"
Size:Variable
Type:Alphanumeric
Optional:Yes
Description:Name of the operator used for Prepaid Cell Phone Recharge, in capital letters. Examples: "CLARO", "HI", "TIM", "LIVE".

Name:"RECCEL_DDD_PHONE"
Size:Variable
Type:Numeric
Optional:Yes
Description:DDD + Phone used to top up prepaid cell phones. Example: "1199998888".

Name:"PAN_CARD_MASCARADO"
Size:Variable
Type:Alphanumeric
Optional:Yes
Description:PAN of the masked card, displaying the first 6 (card BIN) and the last 4 of the card.
Normally 16 characters.
Requires installation of the extension file .cha on the SiTef server.
Example: 123456******1234.

Name:"DUE CARD_CARD"
Size:4
Type:Numeric
Optional:Yes
Description:Card expiration date, in "YYMM" format.
Requires installation of the .cha extension file on the SiTef server.

Name:"NOME_PORTADOR"
Size:Variable
Type:Alphanumeric
Optional:Yes
Description:Name of the cardholder.
Requires installation of the .cha extension file on the SiTef server.

Name:"TRILHA1_MASCARADO"
Size:Variable
Type:Alphanumeric
Optional:Yes
Description:Track 1 of the card used.
Requires installation of the .cha extension file on the SiTef server.

Name:"TRILHA2_MASCARADO"
Size:Variable
Type:Alphanumeric
Optional:Yes
Description:Track 2 of the card used.
Requires installation of the .cha extension file on the SiTef server.

Name:"TRILHA3_MASCARADO"
Size:Variable
Type:Alphanumeric
Optional:Yes
Description:Track 3 of the card used.
Requires installation of the .cha extension file on the SiTef server.

Name:"PAN_CARTAO_HASHDINAMICO"
Size:Variable
Type:Alphanumeric
Optional:Yes
Description:Salted hash of the card's PAN.
Requires installation of the .cha extension file on the SiTef server.

Name:"Expiration_CARD_HASHDINAMICO"
Size:Variable
Type:Alphanumeric
Optional:Yes
Description:Hash with card expiration salt.
Requires installation of the .cha extension file on the SiTef server.

Name:"NAME_PORTADOR_HASHDINAMICO"
Size:Variable
Type:Alphanumeric
Optional:Yes
Description:Salted hash of the cardholder's name.
Requires installation of the .cha extension file on the SiTef server.

Name:"TRACK1_HASHDINAMICO"
Size:Variable
Type:Alphanumeric
Optional:Yes
Description:Hash with salt from track 1 of the card.
Requires installation of the .cha extension file on the SiTef server.

Name:"TRACK2_HASHDINAMICO"
Size:Variable
Type:Alphanumeric
Optional:Yes
Description:Salted hash of card track 2.
Requires installation of the .cha extension file on the SiTef server.

Name:"TRACK3_HASHDINAMICO"
Size:Variable
Type:Alphanumeric
Optional:Yes
Description:Hash with salt from track 3 of the card.
Requires installation of the .cha extension file on the SiTef server.

Name:"PAN_CARD_CRYPTOGRAPHED"
Size:Variable
Type:Alphanumeric
Optional:Yes
Description:PAN of the encrypted card.
Normally 16 characters.
Requires installation of the .cha extension file on the SiTef server.

Name:"DUE_CARD_CRYPTOGRAPHED"
Size:Variable
Type:Alphanumeric
Optional:Yes
Description:Card expiration date encrypted.
Requires installation of the .cha extension file on the SiTef server.

Name:"NAME_CARRIER_CRYPTOGRAPHED"
Size:Variable
Type:Alphanumeric
Optional:Yes
Description:Encrypted cardholder name.
Requires installation of the .cha extension file on the SiTef server.

Name:"TRACK1_CRYPTOGRAPHED"
Size:Variable
Type:Alphanumeric
Optional:Yes
Description:Encrypted track 1 of the card used.
Requires installation of the .cha extension file on the SiTef server.

Name:"TRACK2_CRYPTOGRAPHED"
Size:Variable
Type:Alphanumeric
Optional:Yes
Description:Encrypted track 2 of the card used.
Requires installation of the .cha extension file on the SiTef server.

Name:"TRACK3_CRYPTOGRAPHED"
Size:Variable
Type:Alphanumeric
Optional:Yes
Description:Encrypted track 3 of the card used.
Requires installation of the .cha extension file on the SiTef server.

Name:"PAN_CARD_HASHFIXO"
Size:Variable
Type:Alphanumeric
Optional:Yes
Description:Fixed Hash of the Card's PAN.
Normally, 16 characters.
Requires installation of the .cha extension file on the SiTef server.

Name:"DUE TIME_CARD_HASHFIXO"
Size:Variable
Type:Alphanumeric
Optional:Yes
Description:Fixed Hash of Card Expiration Date.
Requires installation of the .cha extension file on the SiTef server.

Name:"NAME_CARRIER_HASHFIXED"
Size:Variable
Type:Alphanumeric
Optional:Yes
Description:Fixed hash of the cardholder's name.
Requires installation of the .cha extension file on the SiTef server.

Name:"TRACK1_HASHFIXO"
Size:Variable
Type:Alphanumeric
Optional:Yes
Description:Fixed hash of track 1 of the card used.
Requires installation of the .cha extension file on the SiTef server.

Name:"TRACK2_HASHFIXO"
Size:Variable
Type:Alphanumeric
Optional:Yes
Description:Fixed hash of track 2 of the card used.
Requires installation of the .cha extension file on the SiTef server.

Name:"TRACK3_HASHFIXO"
Size:Variable
Type:Alphanumeric
Optional:Yes
Description:Fixed hash of track 3 of the card used.
Requires installation of the .cha extension file on the SiTef server.

Name:"SUB_NAME_COSTUME"
Size:Up to 22
Type:Alphanumeric
Optional:Yes
Description:Fantastic name of the subacquirer that was sent to the authorizer.

Name:"SUB_LOGRADOURO"
Size:Up to 40
Type:Alphanumeric
Optional:Yes
Description:Sub-acquiring address that was sent to the authorizer.

Name:"SUB_CITY"
Size:Up to 13
Type:Alphanumeric
Optional:Yes
Description:City of the subacquirer that was sent to the authorizer.

Name:"SUB_UF"
Size:2
Type:Alphanumeric
Optional:Yes
Description:Federative unit of the sub-acquirer that was sent to the authorizer.

Name:"SUB_COUNTRY"
Size:3
Type:Alphanumeric
Optional:Yes
Description:Country of subacquiring that was sent to the authorizer.

Name:"SUB_CEP"
Size:8
Type:Numeric
Optional:Yes
Description:CEP of the subacquirer that was sent to the authorizer.

Name:"SUB_MCC"
Size:4
Type:Numeric
Optional:Yes
Description:Merchant Category Code of the subacquirer that was sent to the authorizer.

Name:"SUB_CNPJ_CPF"
Size:Up to 14
Type:Numeric
Optional:Yes
Description:CNPJ/CPF of the subacquirer that was sent to the authorizer.

Name:"SUB_TEL"
Size:Up to 11
Type:Numeric
Optional:Yes
Description:Telephone number of the subacquirer that was sent to the authorizer.

Name:"SUB_SOFT_DESC"
Size:Up to 22
Type:Alphanumeric
Optional:Yes
Description:Software Descriptor of the subacquirer that was sent to the authorizer.

Name:"SUB_EMAIL"
Size:Up to 99
Type:Alphanumeric
Optional:Yes
Description:Email from the subacquirer that was sent to the authorizer.

Name:"RESULTS"
Size:Variable
Type:Alphanumeric
Optional:Yes
Description:Field with FieldType values ​​retrieved from the SiTef Client, separated by square brackets, in the format key=value.
The value may be empty, indicating that there was no corresponding value.
Example:
[133=][136=400970][160=123456]
Example with RESULTADOS_SEPARADOR=; in chained transaction:
[ 133=][136=400970;400970][160=123456;123457]
Note: the order of input FieldTypes is not necessarily preserved.

Name:"RESEND"
Size:1
Type:Numeric
Optional:Yes
Description:[From version B05.03.03r000] Indicates that this message was triggered by the TEF data forwarding mechanism.

SITEF_FINALIZA Method: Fields that may be present to respond to information from the POS to the WEB server#

Name:"COMP_DADOS_CONF"
Size:Variable
Type:Alphanumeric
Optional:No (only if the completion was carried out via this field)
Description:Confirmation Data. This is the same data sent in the request.

Name:"CODRESP"
Size:2
Type:Alphanumeric
Optional:Yes
Description:Response Code.
Return of completion:
"00": Finalization sent to SiTef.
"00" or absent: Finalization cannot be sent to SiTef.
Note: The return only indicates whether SiTef received the request. There are no return codes for cases in which the input parameters are invalid before SiTef or if the transaction had already been completed – in these cases, the return is "00" and the operation is ignored.

Name:"COMP_CUPOM_TAX"
Size:Up to 20
Type:Alphanumeric
Optional:No (only if the completion was carried out via Coupon, Tax Date and Time)
Description:[From version B05.05.00r000] Transaction Tax Coupon. This is the same data sent in the request.

Name:"COMP_DATA_TAX"
Size:8
Type:Alphanumeric
Optional:No (only if the completion was carried out via Coupon, Tax Date and Time)
Description:[From version B05.05.00r000] Fiscal Date of the transaction. This is the same data sent in the request.

Name:"COMP_TIME_TAX"
Size:6
Type:Alphanumeric
Optional:No (only if the completion was carried out via Coupon, Tax Date and Time)
Description:[From version B05.05.00r000] Fiscal Time of the transaction. This is the same data sent in the request.

SITEF_CARTAO Method: Fields that may be present to respond to information from the POS to the WEB server#


Name:"PAN_CARD_MASCARADO"
Size:Variable
Type:Alphanumeric
Optional:Yes
Description:PAN of the masked card, displaying the first 6 (card BIN) and the last 4 of the card.
Normally the size is 16 characters.
Requires installation of the card file .cha extension on the SiTef server.
Example: 123456******1234.

Name:"DUE CARD_CARD"
Size:4
Type:Numeric
Optional:Yes
Description:Card expiration date, in "YYMM" format.
Requires installation of the .cha extension file on the SiTef server.

Name:"NAME_PORTADOR"
Size:Variable
Type:Alphanumeric
Optional:Yes
Description:Name of the cardholder.
Requires installation of the .cha extension file on the SiTef server.

Name:"TRILHA1_MASCARADO"
Size:Variable
Type:Alphanumeric
Optional:Yes
Description:Track 1 of the card used.
Requires installation of the .cha extension file on the SiTef server.

Name:"TRILHA2_MASCARADO"
Size:Variable
Type:Alphanumeric
Optional:Yes
Description:Track 2 of the card used.
Requires installation of the .cha extension file on the SiTef server.

Name:"TRILHA3_MASCARADO"
Size:Variable
Type:Alphanumeric
Optional:Yes
Description:Track 3 of the card used.
Requires installation of the .cha extension file on the SiTef server.

Name:"PAN_CARTAO_HASHDINAMICO"
Size:Variable
Type:Alphanumeric
Optional:Yes
Description:Salted hash of the card's PAN.
Requires installation of the .cha extension file on the SiTef server.

Name:"Expiration_CARD_HASHDINAMICO"
Size:Variable
Type:Alphanumeric
Optional:Yes
Description:Hash with card expiration salt.
Requires installation of the .cha extension file on the SiTef server.

Name:"TRACK1_HASHDINAMICO"
Size:Variable
Type:Alphanumeric
Optional:Yes
Description:Salted hash of card track 1.
Requires installation of the .cha extension file on the SiTef server.

Name:"TRACK1_HASHDINAMICO"
Size:Variable
Type:Alphanumeric
Optional:Yes
Description:Salted hash of track 1 of the card.
Requires installation of the .cha extension file on the SiTef server.

Name:"TRACK2_HASHDINAMICO"
Size:Variable
Type:Alphanumeric
Optional:Yes
Description:Salted hash of card track 2.
Requires installation of the .cha extension file on the SiTef server.

Name:"TRACK3_HASHDINAMICO"
Size:Variable
Type:Alphanumeric
Optional:Yes
Description:Hash with salt from track 3 of the card.
Requires installation of the .cha extension file on the SiTef server.

Name:"PAN_CARD_CRYPTOGRAPHED"
Size:Variable
Type:Alphanumeric
Optional:Yes
Description:PAN of the encrypted card.
Normally, the length is 16 characters.
Requires installation of the .cha extension file on the SiTef server.

Name:"DUE_CARD_CRYPTOGRAPHED"
Size:Variable
Type:Alphanumeric
Optional:Yes
Description:Card expiration date encrypted.
Requires installation of the .cha extension file on the SiTef server.

Name:"NAME_CARRIER_CRYPTOGRAPHED"
Size:Variable
Type:Alphanumeric
Optional:Yes
Description:Encrypted cardholder name.
Requires installation of the .cha extension file on the SiTef server.

Name:"TRACK1_CRYPTOGRAPHED"
Size:Variable
Type:Alphanumeric
Optional:Yes
Description:Encrypted track 1 of the card used.
Requires installation of the .cha extension file on the SiTef server.

Name:"TRACK2_CRYPTOGRAPHED"
Size:Variable
Type:Alphanumeric
Optional:Yes
Description:Encrypted track 2 of the card used.
Requires installation of the .cha extension file on the SiTef server.

Name:"TRACK3_CRYPTOGRAPHED"
Size:Variable
Type:Alphanumeric
Optional:Yes
Description:Encrypted track 3 of the card used.
Requires installation of the .cha extension file on the SiTef server.

Name:"PAN_CARD_HASHFIXO"
Size:Variable
Type:Alphanumeric
Optional:Yes
Description:PAN of the encrypted card.
Normally the length is 16 characters.
Requires installation of the .cha extension file on the SiTef server.

Name:"DUE TIME_CARD_HASHFIXO"
Size:Variable
Type:Alphanumeric
Optional:Yes
Description:Card expiration hash.
Requires installation of the .cha extension file on the SiTef server.

Name:"NAME_CARRIER_HASHFIXED"
Size:Variable
Type:Alphanumeric
Optional:Yes
Description:Hash of the cardholder's name.
Requires installation of the .cha extension file on the SiTef server.

Name:"TRACK1_HASHFIXO"
Size:Variable
Type:Alphanumeric
Optional:Yes
Description:Hash of track 1 of the card used.
Requires installation of the .cha extension file on the SiTef server.

Name:"TRACK2_HASHFIXO"
Size:Variable
Type:Alphanumeric
Optional:Yes
Description:Hash of track 2 of the card used.
Requires installation of the .cha extension file on the SiTef server.

Name:"TRACK3_HASHFIXO"
Size:Variable
Type:Alphanumeric
Optional:Yes
Description:Hash of track 3 of the card used.
Requires installation of the .cha extension file on the SiTef server.

Name:"CODRESP"
Size:Variable
Type:Alphanumeric
Optional:No
Description:Response Code.
Main response codes, according to the list below:
0: Data collected
2: The card provided is not on the .cha list of allowed BINs
4: .cha access key is expired
6: Access key existing encryption in .cha is invalid
Normally, the length is 1 to 4 digits. For other errors, see the CliSiTef manual, section Card reading - secure capture routines.

Name:"RESULTS"
Size:Variable
Type:Alphanumeric
Optional:Yes
Description:Field with FieldType values ​​retrieved from the SiTef Client, separated by square brackets, in the format key=value.
The value may be empty, indicating that there was no corresponding value.
Example:
[133=][136=400970][160=123456].
Example with RESULTADOS_SEPARADOR=; in chained transaction:
[133=][136=400970;400970][160=123456;123457]
Note: the order of input FieldTypes is not necessarily preserved.


This method does not accept additional information (SAC_XX).


SITEF_INFO Method: Fields that must be present to respond to information from the POS to the WEB server#


Name:"TERMINAL"
Size:8
Type:Alphanumeric
Optional:Yes
Description:Identification of the terminal used in SiTef.

Name:"COMPANY"
Size:8
Type:Alphanumeric
Optional:Yes
Description:Company code used in SiTef.

Name:"SERIAL NUMBER"
Size:Variable
Type:Alphanumeric
Optional:Yes
Description:POS terminal serial number. Typically up to 31 characters

Name:"VERSION_APL"
Size:Variable
Type:Alphanumeric
Optional:Yes
Description:Browser application version
Ex: B05.01.00r000 160627

Name:"MODALITY_APL"
Size:1
Type:Alphanumeric
Optional:Yes
Description:Browser application mode
1: Print and Confirm Automation
2: Print and POS Confirm Automation
3 : Browser Prints and Confirms
4: Browser Prints and Confirms Automation

Name:"RELEASE"
Size:1
Type:Alphanumeric
Optional:Yes
Description:How the application was released.

Name:"INST_ID_NETWORK"
Size:Variable
Type:Alphanumeric
Optional:Yes
Description:Network identifier of the installation server. Available only if the application was released via installation.

Name:"INST_ID_CHAVE_ACTIVACAO"
Size:Variable
Type:Alphanumeric
Optional:Yes
Description:Activation key / logical number used to release the application via POS Installation.

Name:"COMP_NAME_COSTUME"
Size:Variable
Type:Alphanumeric
Optional:Yes
Description:Trade name of the establishment. In POS Print modalities, it is the field printed above the TEF coupon.

Name:"COMP_LOGRADOURO"
Size:Variable
Type:Alphanumeric
Optional:Yes
Description:Placement of the establishment. In POS Print modalities, it is the field printed above the TEF coupon.

Nome:"COMP_CIDADE"
Tamanho:Variável
Tipo:Alfanumérico
Opcional:Sim
Descrição:Cidade do estabelecimento. Em modalidades POS Imprime, é o campo impresso acima do cupom TEF.

Nome:"COMP_CNPJ"
Tamanho:Variável
Tipo:Alfanumérico
Opcional:Sim
Descrição:Esse campo foi deprecado. CNPJ do estabelecimento.
Somente retorna se houver somente o CNPJ configurado. Veja COMP_CNPJ_CPF. CNPJ do estabelecimento sem separadores.

Name:"COMP_CNPJ_CPF"
Size:Variable
Type:Alphanumeric
Optional:Yes
Description:CNPJ of the establishment or CPF of the retailer without separators. In POS Print modalities, it is the field printed above the TEF coupon.

Name:"SUB_NAME_COSTUME"
Size:Up to 22
Type:Alphanumeric
Optional:Yes
Description:Fantastic name of the subacquirer.
Fantastic name of the subacquirer's customer that is configured in the POS.

Name:"SUB_LOGRADOURO"
Size:Up to 40
Type:Alphanumeric
Optional:Yes
Description:Sub-acquirer's address.
Sub-acquirer's customer address that is configured in the POS.

Name:"SUB_CITY"
Size:Up to 13
Type:Alphanumeric
Optional:Yes
Description:City of the sub-acquirer.
City of the sub-acquirer's customer that is configured in the POS.

Name:"SUB_UF"
Size:2
Type:Alphanumeric
Optional:Yes
Description:Federative unit of the sub-acquirer.
Federative unit of the sub-acquirer's client that is configured in the POS.

Name:"SUB_COUNTRY"
Size:3
Type:Alphanumeric
Optional:Yes
Description:Country of the sub-acquirer.
Country of the sub-acquirer's customer that is configured in the POS.

Name:"SUB_CEP"
Size:8
Type:Numeric
Optional:Yes
Description:CEP of the sub-acquirer.
CEP of the sub-acquirer's customer that is configured in the POS.

Name:"SUB_MCC"
Size:4
Type:Numeric
Optional:Yes
Description:Merchant Category Code of the sub-acquirer.
MCC of the sub-acquirer's customer that is configured in the POS.

Name:"SUB_CNPJ_CPF"
Size:Up to 14
Type:Numeric
Optional:Yes
Description:CNPJ/CPF of the sub-acquirer.
CNPJ or CPF of the sub-acquirer's customer that is configured in the POS.

Name:"SUB_TEL"
Size:Up to 11
Type:Numeric
Optional:Yes
Description:Sub-acquirer's telephone number.
Telephone number of the sub-acquirer's customer that is configured in the POS.

Name:"SUB_SOFT_DESC"
Size:Up to 22
Type:Alphanumeric
Optional:Yes
Description:Sub-acquirer descriptor software.
Sub-acquirer customer descriptor software that is configured on the POS.

Name:"SUB_EMAIL"
Size:Up to 99
Type:Alphanumeric
Optional:Yes
Description:Sub-acquirer's email.
E-mail of the sub-acquirer's customer that is configured in the POS.

Name:"PEND_QTDETRANS"
Size:Variable
Type:Numeric
Optional:Yes
Description:Number of transactions pending completion on the terminal.

Name:"PEND_COUPON_TAX_<N>"
Size:Variable
Type:Alphanumeric
Optional:Yes
Description:Tax coupon for the Nth pending transaction, where N is a number between 1 and the number of pending transactions.

Name:"PEND_DATA_TAX_<N>"
Size:Variable
Type:Alphanumeric
Optional:Yes
Description:Tax date of the Nth pending transaction, where N is a number between 1 and the number of pending transactions.

Name:"PEND_TIME_TAX_<N>"
Size:Variable
Type:Alphanumeric
Optional:Yes
Description:Fiscal time of the Nth pending transaction, where N is a number between 1 and the number of pending transactions.

Name:"PEND_MOD_TRN_<N>"
Size:Variable
Type:Alphanumeric
Optional:Yes
Description:CliSiTef modality of the Nth pending transaction, where N is a number between 1 and the number of pending transactions.

Name:"PEND_VALUE_TRN_<N>"
Size:Variable
Type:Alphanumeric
Optional:Yes
Description:Value of the Nth pending transaction, where N is a number between 1 and the number of pending transactions.

Examples#

Example of a page to retrieve card data, using the SITEF_CARTAO method:

<!DOCTYPE html>
<title>Receive Data...</title>
<p>Receive Card Data...</p>
<p>
<?php
codresp = isset($_POST["CODRESP"]) ? $_POST["CODRESP"] : "Erro!";
$panCartao = isset($_POST["PAN_CARTAO_CRIPTOGRAFADO"]) ?
$_POST["PAN_CARTAO_CRIPTOGRAFADO"] : "Erro!";
$vencimentoCartao = isset($_POST["VENCIMENTO_CARTAO"]) ?
$_POST["VENCIMENTO_CARTAO"] : "Erro!";
echo "codresp: $codresp <br>";
echo "panCartao: $panCartao <br>";
echo "vencimentoCartao: $vencimentoCartao <br>";
echo ’<p>’;
echo ’<a href="Pagina_Teste.php ">Nome_Botão</a> <br>’;
?>

Example of a page to retrieve terminal data, using the SITEF_INFO method:

<!DOCTYPE html>
<title>SiTef Response</title>
<p>Receives Data from Terminal...</p> <p>
<?php
function getHttpPost($key) {
return isset($_POST[$key]) ? $_POST[$key] : "N/D";
}
$EmpresaSitef = getHttpPost("EMPRESA");
$terminalSitef = getHttpPost("TERMINAL");
$numeroSerieterminal = getHttpPost("NUMERO_SERIE_TERMINAL");
echo "EmpresaSitef: $EmpresaSitef <br>";
echo "terminalSitef: $terminalSitef <br>";
echo "numeroSerieterminal: $numeroSerieterminal <br>";
echo ’<p>’;
echo ’<a href="dados-terminal.php">Voltar</a> <br>’;
echo ’<a href="login.php">Inicio</a> <br>’;
?>

Example of a page to receive a transaction completion response (Automation Confirms only), using the SITEF_FINALIZA method:

<!DOCTYPE HTML>
<title>Response Finalization</title>
<p>Receive Completion...</p>
<p>
<?php
function getHttpPost($key)
{
return isset($_POST[$key]) ? $_POST[$key] : "N/D";
}
$codresp = getHttpPost("CODRESP");
$cupomEcho = getHttpPost("COMP_CUPOM_FISCAL");
$dataEcho = getHttpPost("COMP_DATA_FISCAL");
$horaEcho = getHttpPost("COMP_HORA_FISCAL");
echo "codresp: $codresp <br>";
echo ’<p>’;
echo "cupomEcho: $cupomEcho <br>";
echo "dataEcho: $dataEcho <br>";
echo "horaEcho: $horaEcho <br>";
echo ’<p>’;
?>

Management of images for printing#

The browser application can print images on receipts through a command in the <PRE> tag.

To do this, the image must be previously loaded into the POS. Uploading and removing images is done through forms.

IMG_CARREGA method#

This method loads an image into the POS. The image must be in the format Monochrome BMP. The maximum width of POS printers is 384 pixels. It is not recommended to use images wider than 384 pixels.

Send fields of the IMG_CARREGA method#


Name:"URL_IMG"
Size:Variable
Type:Alphanumeric
Optional:No
Description:[From version B05.07.02r000] Address of the image to be loaded into the POS.

Name:"NAME_IMG_POS"
Size:Variable
Type:Alphanumeric
Optional:No
Description:[From version B05.07.02r000] Name with which the image will be saved in the POS.
This name must be used in the \img command of the tag <PRE> to print the image on the receipt.

IMG_CARREGA method response fields#


Name:"RESULT_ACAO_IMG"
Size:Variable
Type:Numeric
Optional:No
Description:Image load result.
0 - Load OK.
101 - Invalid image
102 - Image not found
103 - Mandatory field missing.
104 - Invalid file name. Cannot contain :

Name:"URL_IMG"
Size:Variable
Type:Alphanumeric
Optional:No
Description:Same shipping price

Name:"NAME_IMG_POS"
Size:Variable
Type:Alphanumeric
Optional:No
Description:Same shipping price

Example of a form using the IMG_CARREGA method#

<!DOCTYPE html>
<TITLE>Upload image</TITLE>
<form name="carregaimagem" action="recebe-carregaImagem.php" method="IMG_CARREGA">
<input type="hidden" name="URL_IMG" value="http://www.x.y.z/imagem.bmp">
<input type="hidden" name="NOME_IMG_POS" value="imagem.bmp">
</form>
<script>
document.carregaimagem.submit();
</script>

The ACTION parameter of the FORM tag will contain the file name for the which the result of the image load will be sent. This page response should be treated by the AC server developer as if, to her, a form with a GET method was being sent.

Example:

<!DOCTYPE html>
<title>Title Load Image</title>
<p>Upload Image</p>
<?php
$RetImagem = isset($_GET["RESULT_ACAO_IMG"]) ? $_GET["RESULT_ACAO_IMG"] : "N/D";
$urlImagem = isset($_GET["URL_IMG"]) ? $_GET["URL_IMG"] : "N/D";
$NomeImagem = isset($_GET["NOME_IMG_POS"]) ? $_GET["NOME_IMG_POS"] : "N/D";
echo "<br>Resultado: $RetImagem <br>";
echo "URL Imagem: $urlImagem <br>";
echo "Nome Img POS: $NomeImagem <br>";
?>

IMG_APAGA method#

This method deletes an image previously loaded into the POS.

Send fields of the IMG_APAGA method#


Name:"NAME_IMG_POS"
Size:Variable
Type:Alphanumeric
Optional:No
Description:Name with which the image was saved in the POS.
This name is the name that was passed in the IMG_APAGA

IMG_APAGA method response fields#


Name:"RESULT_ACAO_IMG"
Size:Variable
Type:Numeric
Optional:No
Description:Image loading result.
0 - Removal OK.
103 - Mandatory field missing.

Name:"NAME_IMG_POS"
Size:Variable
Type:Alphanumeric
Optional:No
Description:Same shipping price

Example of a form using the IMG_APAGA method#

<!DOCTYPE html>
<TITLE>Delete image</TITLE>
<form name="apagaimagem" action="recebe-apagaImagem.php" method="IMG_APAGA">
<input type="hidden" name="NOME_IMG_POS" value="imagem.bmp">
</form>
<script>
document.apagaimagem.submit();
</script>

The ACTION parameter of the FORM tag will contain the file name for the which the result of the image load will be sent. This page response should be treated by the AC server developer as if, to her, a form with a GET method was being sent.

Example:

<!DOCTYPE html>
<title>Title Erase Image</title>
<p>Delete Image</p>
<?php
$RetImagem = isset($_GET["RESULT_ACAO_IMG"]) ? $_GET["RESULT_ACAO_IMG"] : "N/D";
$NomeImagem = isset($_GET["NOME_IMG_POS"]) ? $_GET["NOME_IMG_POS"] : "N/D";
echo "<br>Resultado: $RetImagem <br>";
echo "Nome Img POS: $NomeImagem <br>";
?>

Printing and transaction confirmation flows#

The Browser application can work in different ways in terms of printing of the transaction and confirmation of the transaction. Mode selection is done when releasing the application where you choose which modality the application will operate:

ModalityDescription
1: Print and Confirm AutomationCommercial Automation is responsible for printing the coupon and confirming the transaction.

In the transaction request, the automation generates the fields COMP_CUPOM_FISCAL, COMP_DATA_FISCAL and COMP_HORA_FISCAL.

The POS response to the WEB server will include:
•    The fields with the image of the receipt to be printed: COMP_1VIA and COMP_2VIA
•    Fields required to complete the transaction in SiTef: COMP_CUPOM_FISCAL, COMP_DATA_FISCAL, COMP_HORA_FISCAL.

From version B05.01.01 r000, use the SITEF_FINALIZA method to confirm or undo the transaction. Before this version, the only way to finalize the transaction was using SiTefWeb or using a function available in LibSiTef on the commercial automation server.
2: Automation Prints and POS ConfirmsCommercial Automation is responsible for printing the transaction coupon, and the POS for confirming the transaction.

In this modality, the POS confirms the transaction and subsequently sends it to automation the fields required for printing. If the automation is unable to print the receipt, an option to reprint the last transaction can be implemented.

In the POS response to the WEB server, the fields will appear with the image of the receipt to be printed: COMP_1VIA and COMP_2VIA.

This modality is not recommended, and it is desirable to use the Print and Confirm Automation modality, which provides the necessary controls.
3: POS Prints and ConfirmsThe POS is responsible for printing the coupon and confirming the transaction.

In this mode, multiple payments (SITEF_PAGMULT method or via Direct TEF) can be used .
4: POS Prints and Automation ConfirmsThe POS is responsible for printing the transaction coupon and the Automation for confirming it.

In the transaction request, the automation generates the fields COMP_CUPOM_FISCAL, COMP_DATA_FISCAL and COMP_HORA_FISCAL.

The POS response to the WEB server will contain the fields necessary to confirm the transaction on Sitef: COMP_CUPOM_FISCAL, COMP_DATA_FISCAL, COMP_HORA_FISCAL.

From version B05.01.01r000, use the SITEF_FINALIZA method to confirm or undo the transaction. Before this version, the only way to finalize the transaction was using SiTefWeb or using a function available in LibSiTef on the commercial automation server.

This modality is not recommended, and it is desirable to use the Automation Print and Confirm that it provides the necessary controls.

Table 6: Browser modes and print flow

Transactional flow of the Print and Confirm Automation modality#

  1. (Optional) Automation generates the Coupon, Date and Tax Time of the transaction. This data will be used to finalize the transaction.

  2. Browser performs transaction and terminal display shows, for example, "TRANSACTION OK". The SiTef report displays the transaction status "PENDING".

  3. Browser sends the transaction data to Commercial Automation (with the copies of the coupon).

  4. (Optional) Automation prints the coupon with the HTML tag <pre> with the attributes URLOK and URLERR.

  5. (Optional) Automation confirms the transaction with the form <form method="SITEF_FINALIZA"> and JavaScript to automatic form submission.

If there is a power outage at the terminal after step 1 and before the step 3, when turning on the terminal again, the transaction will continue in the same state "PENDING". Starting with version B05.00.00r000 160331, the Browser will force step 3 to be resubmitted until it succeeds.

If there is a power outage at the terminal after step 3 and before the step 4, it is suggested that Commercial Automation uses cookies and/or session to identify that the last transaction was not printed and then redirect the POS to the page responsible for printing or to the page responsible for undoing the transaction.

If there is a power outage at the terminal between step 4 and step 5, the POS will load the page defined in the URLERR attribute. It is suggested that this page redo the requested printout or undo the transaction.

If there is a power outage at the terminal in step 5, it is suggested that the Commercial Automation use cookies and/or session to identify which the last transaction was not completed and then redirect the POS to the page responsible for confirming or undoing the transaction.

Transactional flow of the Print and Confirm POS modality#

  1. Browser performs transaction and terminal display shows, for example, "TRANSACTION OK". The SiTef report displays the transaction status "PENDING".

  2. Browser confirms the transaction. The SiTef report displays the transaction in status "DONE".

  3. Browser prints the transaction coupon.

  4. Browser sends transaction data to Commercial Automation (without the copies of the coupon).

If there is a power outage at the terminal after step 1 and before the step 2, when turning the terminal back on and trying to perform some operation with the internal TEF module, the transaction will be undone. The report displays the transaction in status "CANC POS".

If there is a power outage at the terminal during step 3, from from version B05.00.00r000 160331, the Browser will force you to resubmit step 4 until it happens.


  1. Denied transactions do not require completion (confirmation or undoing).
  2. Before version B05.00.00r000 160331, Commercial Automation was unable to infer if the transaction was carried out or aborted unless reprinting the last one transaction.
  3. The SITEF_FINALIZA form method was added in version B05.01.01r000 160624. Until then, it was necessary to complete the transaction on SiTefWeb manually or using LibSiTef library on the Commercial Automation server.

Printing of the TEF coupon in Automation Print modalities#

When Automation is responsible for printing the coupon, the fields return COMP_1VIA (establishment copy) and COMP_2VIA (business copy) client) must be printed via the <pre> HTML tag.

Below is an example in PHP of a TEF coupon printing flow, considering the handling of printing errors such as paper shortages.

<!DOCTYPE html>
<title>recebe-tef.php</title>
<?php
$cupomFiscal = $_POST["COMP_CUPOM_FISCAL"];
//gravar dados da transação no banco de dados
if (isset($_POST["COMP_1VIA"])) {
echo "<pre urlerr=’reimprime.php?trn=$cupomFiscal&via=loja’>";
echo str_replace("@", "\n", $_POST["COMP_1VIA"]);
echo "\\feed\n\\pause 30 Destaque a via da loja</pre>";
}
if (isset($_POST["COMP_2VIA"])) {
echo "<pre urlerr=’reimprime.php?trn=$cupomFiscal&via=cliente’>";
echo str_replace("@", "\n", $_POST["COMP_2VIA"]);
echo "\\feed\n\\pause 30 Destaque a via do cliente</pre>";
}
?>

TEF data resending mechanism#

If the terminal is turned off after starting a transaction, but before HTTP POST with the transaction data to be sent to Automation, the Browser, when connected, will try to send HTTP POST to Automation with the data of that transaction.

If shutdown occurred before all TEF data was processed, HTTP POST will return CODRESP, the value 98, indicating that the transaction status may have been pending in SiTef and a conciliation/backup action must be taken by Automation Commercial.


Depending on the transaction authorizing network, pending transactions can be automatically confirmed after a few days, debiting the value on the customer's card, while Automation may not have released it the product/service purchased. Therefore, the conciliation/backup action on the part of Automation it is extremely important.


If there are communication problems, HTTP POST will be attempted for 3 times. If HTTP POST still cannot be sent, the following screens are displayed on the POS:

*** NOTICE ***
DATA TRANSFER
FOR THE PAGE FAILED
PRESS A KEY
DATA FORWARD FAILURE
>TRY AGAIN
CANCEL REPAIR
FUNCTIONS
>:OK | X:CANCEL

Select the TRY AGAIN option, restart the terminal or press cancel will cause the POS to retain the HTTP POST.

Selecting the option CANCEL PASSING will request the password of the supervisor so that HTTP POST is discarded and the POS is released to load the home page.

Selecting the FUNCTIONS option will display the function menu with options SUPPORT and TERMINAL DATA.


A partir da versão B05.03.03r000, o HTTP POST contém o campo de retorno REENVIO.


Electronic Invoice: NFC-E and CF-E-SAT#

SiTef and Browser do not communicate with the Treasury Department, automation is responsible for carrying out the necessary procedures.

However, it is possible to install the "SAT-NFCE" module in SiTef and configure, in SiTef, the CNPJ of the paying source for each product existing in SiTef. The name given to the flag is considered a product. offers. For example, the Mastercard brand offers products "Mastercard" and "Maestro", the "Visa" brand offers the products "Visa Crédito", "Visa Electron" and "Visa Vale".

After performing a transaction, the automation may receive the following fields:

NameSizeOptionalDescription
"CNPJ_CREDENTIADORA_NFCE"VariableYesCNPJ of the NFC-e accreditor of the brand product used and registered in SiTef
"FLAG_CARD_NFCE"VariableYesNFC-e card flag of the brand product used and registered in SiTef
"NUMBER_AUTORIZATION_NFCE"VariableYesNFC-e authorization number of the product of the brand used and registered in SiTef
"CODE_CREDENTIATOR_SAT"VariableYesAccreditor code in CF-eSAT of the product of the brand used and registered in SiTef

Table 7

It is up to the automation to print the QRCode (via the <pre> tag). A The Treasury Department requires, for NFC-e, the use of the normal QRCode in medium correction level (\qrcodestart 0 1) and, for CF-e-SAT, the use of Normal QRCode at low correction level (\qrcodestart 0 0).

In the "Print Automation" format, coupons and fields above are sent to automation, which must be printed together with the QRCode via the <pre> tag.

In the "POS Imprime" form, the TEF coupon is printed and then the automation receives the fields above. That is, the impression of TEF coupon and QRCode printing are done at different times, the which causes automation to worry about power outages in a that, when turned on, the automation home page should redo the QRCode printing.

It is strongly recommended to use the URLERR attribute of the <pre> tag to that, if there is a power outage while printing the QRCode, when call, the POS calls an automation page that must be responsible for reprinting the QRCode.

JavaScript support#

The browser offers a JavaScript interpreter based on the implementation SpiderMonkey 1.70 reference (equivalent to the ECMAScript specification ECMA-262 Edition 3).

As a requirement of the SpiderMonkey implementation license, changes made in the original source code of the JavaScript interpreter can be requested from Software Express.

Integration between the browser and the interpreter is limited, being only sufficient for form validation. HTML objects DOM and DHTML support is not supported. This means that the Window, Navigator, Screen, History and Location objects cannot be used and the Document object is limited only to obtaining values of form elements.

Until before version B05.03.00r000, the only way to access a form was via

document.<form name>.

Starting with version B05.03.00r000, it is You can also access forms via

document.forms[<numeric form index>].

Until before version B05.03.00r000, the only way to access an element of a form was via

document.<form name>.<element name>.

From version B05.03.00r000 onwards, it is also possible to access the elements of a form via

document.forms[<form numeric index>].elements[<element numeric index>].

In addition to the pure JavaScript language (including String objects, Date, Array, Boolean, and Math), the developer of the pages for AC server has the following features available:

  • Execution of scripts using the <SCRIPT> tag.

  • Execution of script when sending form through ONSUBMIT attribute of the <FORM> tag.

  • Execution of script when entering and exiting the editing of a <INPUT> or <SELECT> form element through attributes ONFOCUS and ONBLUR.

  • Read and write access to form field values through the value property (document.NAME.value).

  • Automatic submission of a form through the method document.FORMNAME.submit().

  • alert(mensagem) command used to show error messages. When being called, the command displays the text contained in the message on the browser until the user presses a key.

  • [From version B05.01.06r000] Command beep(), which emits a pre-defined sound.


In some versions of the Browser, automatic submission of a form does not work when there is no the <input type="submit"> tag. Therefore, its inclusion is recommended.


Among the features not available (not extensively described here they are:

  • Use of the attributes ONCLICK, ONCHANGE, ONKEYUP, ONKEYPRESS, ONKEYDOWN, ONLOAD, ONUNLOAD, ONBEFOREUNLOAD, ONSCROLL, ONABORT, ONERROR, among others.

  • Use of HTML comments (<!-- -->) within the <script> tag. If this is attempted, a JavaScript error will be displayed.

  • Access to history, location, window and navigator objects.

  • Access to any document method, such as document.getElementById() or document.createElement().

Changes made by scripts in the JavaScript environment are maintained within each loaded page. For example, a variable created in global scope can be accessed both in different <SCRIPT> blocks as in the ONSUBMIT attribute.

Example of form with validation:

<!DOCTYPE html>
<title>JavaScript Form</title>
<script>
function validaForm(form) {
if (form.campoTexto.value.length > 0) {
return true;
} else {
alert("Campo Texto deve ter um valor!");
return false;
}
}
</script>
<p>Form with JavaScript</p> <p>
<form action="recebe.php" method="POST" onsubmit="return validaForm(this);">
<p>TEXT FIELD:&nbsp;</p>
<input type="text" size="10" name="fieldTexto">
<input type="submit" value="Enviar">
<input type="reset" value="Limpar">
</form>

Example of using its own functionbeep():

<!DOCTYPE html>
<title>beep</title>
<p>Message</p>
<script>
if (typeof beep ==function) {
beep();
}
</script>

Cookie Support#

In versions B05.07.xx, B05.08.xx and from version B05.09.04 onwards, the Cookies processing is delegated to the cURL library, and the expiration of Cookies are now processed. Previously, the Browser had limited own implementation, which did not strictly follow the specification RFC 2109 (HTTP State Management Mechanism).

Until version B03.03.04r000, internal limits were extremely reduced:

  • Maximum value size for each cookie: 193 characters

  • Maximum internal file size for each host: 4096 characters

  • Global maximum size: depends on equipment limit

Starting with version B03.03.05r000, internal limits have been increased for:

  • Maximum size of each cookie value: 4096 characters

  • Maximum internal file size for each host: 8192 characters

  • Global maximum size: depends on equipment limit

When the limit is reached, it is likely that the management file will cookies become corrupted and lose data. It is recommended to use the function cleaning of all cookies (see user manual) if used of cookies larger than the limit.

It is recommended to avoid using cookies with large values ​​in GPRS communication, as any increase in data traffic between the Browser and Commercial Automation increases the chances of crashes communication.

Browser Identification#

The Browser sends an identification through the "User-Agent" header of every HTTP message it sends. The format of this text identification is as follows.

<application name>/<version>/<terminal model>/<num. terminal serial>/<other components>

For example:

Browser_POS−SiTef/B05.09.06r000/VX680/300000986/libwww/5.3.1−pos libcurl/7.54.0 mbedTLS/2.1.4

Important note: some distributed versions had the User-Agent format with different content from presented here. It is recommended to use the SITEF_INFO form method to obtain data presented here. Versions B05.07.xx, B05.08.xx, B05.09.04 and B05.09.05 had fields with spaces instead of underlines. Ex: application name like Browser POS-SiTef. Versions below B05.07.xx, B05.08.xx and B05.09.04 had the wrong serial number with the text VVX in front.


License View#

We have added a way to view the licenses of libraries used.


libqrencode
https://fukuchi.org/works/qrencode/
http://www.gnu.org/licenses/lgpl.txt

LICENSING INFORMATION

Copyright (C) 2006-2012 Kentaro Fukuchi

This library is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as published by the Free Software Foundation; either version 2.1 of the License, or any later version.

This library is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details.

You should have received a copy of the GNU Lesser General Public License along with this library; if not, write to the Free Software Foundation, Inc., 51 Franklin St, Fifth Floor, Boston, MA 02110-1301 USA



libcurl
https://curl.haxx.se/
https://curl.haxx.se/docs/thanks.html

COPYRIGHT AND PERMISSION NOTICE

Copyright (c) 1996 - 2017, Daniel Stenberg, <daniel@haxx.se>, and many contributors, see the THANKS file.

All rights reserved.

Permission to use, copy, modify, and distribute this software for any purpose with or without fee is hereby granted, provided that the above copyright notice and this permission notice appear in all copies.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT OF THIRD PARTY RIGHTS. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.

Except as contained in this notice, the name of a copyright holder shall not be used in advertising or otherwise to promote the sale, use or other dealings in this Software without prior written authorization of the copyright holder.


Change History#

RevisionChangeResponsible
01.00aInitial Version of the Document.Rodrigo K. Tomotani
01.01Inclusion of the password field. Limitation of options without being configured.Rodrigo K. Tomotani
01.03Inclusion of the functions to clear history, clear cookies and screen lighting in the functions menu.Rodrigo K. Tomotani
01.04Inclusion of the page printing function. Inclusion of disconnection function. Inclusion of the card type field. Explanation of the connection.Rodrigo K. Tomotani
01.05Inclusion of the supervisor password function.Rodrigo K. Tomotani
01.06Inclusion of the cache part.Rodrigo K. Tomotani
01.13Blocking words using a dictionary. Card reading permitted only for specific ranges. Added extra information about the TEF transaction carried out.Rodrigo K. Tomotani
01.13aModifications to the values ​​returned from a TEF transaction so that they are compatible with the CliSiTef specification.Rodrigo K. Tomotani
01.20 (04/05/2007)Inclusion of the serial type in the input tag for reading the serial port (barcode).
Inclusion of the repom-smart type in the input tag for reading a Repom smart card. Initial JavaScript implementation.
Leo Kazuhiro Ueda
01.20 (16/05/2007)Inclusion of the option to advance in the history of visited addresses.Leo Kazuhiro Ueda
01.21 (24/07/2007)Inclusion of list of permitted words. Inclusion of the print tag.Leo Kazuhiro Ueda
01.22 (27/08/2007)Reformulation of sending TEF receipt through the browserRodrigo K. Tomotani
01.29 (28/03/2008)Sending the model and serial number of the terminal together with the "User-Agent" header of HTTP messages.
Barcode printing within the print command (tag <PRE>). Centering of texts in the print command (tag <CENTER> within <PRE>). Barcode printing within the print command (tag <PRE>). Centering of texts in the print command (tag <CENTER> within <PRE>).
Leo Kazuhiro Ueda
01.29 (10/04/2008)Clarifications about the tag <PRE>.Leo Kazuhiro Ueda
01.29 (15/04/2008)Command \pause in the tag <PRE>.Leo Kazuhiro Ueda
01.29 (04/25/2008)Update of the \pause command in the <PRE> tag. More clarifications about the <PRE> tag.Leo Kazuhiro Ueda
01.30 (03/10/2008)Print confirmation mechanism in the tag <PRE>.Leo Kazuhiro Ueda
01.31 (10/10/2008)Description of shortcut keys for links.Leo Kazuhiro Ueda
01.31 (22/10/2008)Further clarifications about confirmation of printing of the tag <PRE>.Leo Kazuhiro Ueda
01.34 (12/01/2009)Description of the option TRANS_HAB of the form SITEF.Leo Kazuhiro Ueda
01.36 (07/07/2009)Description of the tag <ALARM>.Leo Kazuhiro Ueda
01.38 (06/07/2010)More information about Javascript. Description of the EMPRESA option of the SITEF form.Leo Kazuhiro Ueda
01.39 (07/05/2010)The option IMPRIMIRCOMP was removed from the SITEF form.Ana Paula Adinolfi
01.40 (29/04/2011)Inclusion of the fields NUM_PARC and COD_CLIENTE when receiving the SITEF form.
Inclusion of the fields NSU_SITEF, NSU_SITEF_RECARGA, NSU_HOST, NSU_HOST_RECARGA, VLRTROCO return to the form SITEF.
Ana Paula Adinolfi
01.40 (29/04/2011)Inclusion of the fields NUM_PARC and COD_CLIENTE when receiving the SITEF form.
Inclusion of the fields NSU_SITEF, NSU_SITEF_RECARGA, NSU_HOST, NSU_HOST_RECARGA, VLRTROCO return to the form SITEF.
Ana Paula Adinolfi
01.41 (26/07/2011)Added new returns for the Authorizing Network field - REDE_AUT.
Added new returns for the Flag field - FLAG
Included the field TYPE_TREATMENT, to identify special treatments. (Promotional Platform)
Removed the fields FORMATCODBAR and CODBAR. Barcode printing must be called by printing functions.
Tag <PRE>
Ana Paula Adinolfi
01.42 (15/12/2011)Added note regarding the POST fields sent and received by the browser.Rodrigo Kuaye Tomotani
01.43 (10/12/2012)Added new returns for the Authorization Code field - COD_AUTORIZACAO
Update of the Solution Architecture and General Operation of the Browser.
Update of the item "Version Characteristics"
Change history moved to the end of this document.
Ana Paula Adinolfi
02.07 (10/17/2013)Added history of version changes between 02.00 and 02.07.
Change the EMPRESA field to optional.
New blank page format.
Correction: the Browser accepts the field VLTROCO, not VLRTROCO.
Addition of the SITEF_MULTPAG method, which allows multiple payments in the POS Imprime e Confirma modality.
Marcelo Massahiro Meikaru
02.08 (12/12/2013)Corrected change history of version 02.07. Added change history from version 02.08. Added section on handling relative URLs.Marcelo Massahiro Meikaru
B03.02.01r000 (22/09/2014)Added change history for version 02.10 and B3.2.1r0
Added section on page minimization
Marcelo Massahiro Meikaru
B03.02.04r000 (01/06/2015)Added change history up to version B3.2.4r0 Added sections reinforcing the application's limitation in relation to supported elements.
Added section reinforcing that the treatment of URLs is not correct for all conditions between versions 02.07 and B3.2.3r0
Added section notifying that https is not available
Marcelo Massahiro Meikaru
B03.02.05r000 (03/09/2015)Added information about the value of the CODTRANS response field in transactions such as Reprint.
Added optional response field NSU_HOST_DIGITADO
Marcelo Massahiro Meikaru
B03.03.01rc01 (07/13/2015)Added MOD_TRN field to run any CliSiTef modality. Requires field TIPO_TRN with value 3. Added example of how to top up a prepaid cell phone Added fields RECCEL_OPERADORA and RECCEL_DDD_TELEFONEMarcelo Massahiro Meikaru
B03.03.02r000 (03/08/2015)Added fields PAN_CARTAO_CRIPTOGRAFADO and VENCIMENTO_CARTAO Added method SITEF_CARTAO, which allows collecting data from a card (requires .cha) without performing TEF.Marcelo Massahiro Meikaru
B03.03.03r000 (31/08/2015)Added all other fields of .cha Changed method SITEF_CARTAO so that it is possible to renegotiate a .cha when the terminal opening expires.
Changed methods SITEF and SITEF_PAGMULT to return the same input data COD_CLIENTE
Marcelo Massahiro Meikaru
B03.03.04r000 (10/19/2015)Added SITEF_INFO method to retrieve data from the TEF module, such as company and SiTef terminal. Changed the SITEF method so that it is possible to use CliSiTef modalities directly, via the TIPO_TRN=3 and MOD_TRN fields.Carlos E. J. Silva

Marcelo Massahiro Meikaru
B03.03.05r000 (10/20/2015)Changed SITEF method to return to Commercial Automation the same MOD_TRN field used in the request. Increase in internal cookie limitsMarcelo Massahiro Meikaru
B05.01.00r000 24/05/2016Revision of the sizes and types of fields in the TEF module

Possibility of printing a QR code (Verifone Verix eVo only)

Preview of licenses Removed from topic Bookmark

Removed <input type="serial"> and <input type="repom-smart">
Deprecated <input type="card"> in favor of <form method="SITEF_CARTAO">
Added <input type="date"> and <input type="time">
Added data-swex-keymap attribute to <input type="text">
Added onfocus and onblur attributes to <input> and <select>
Added JSDOM: document.forms <br/ >Added JSDOM: document.forms[idx].elements
Removed display by default of the URL of the page being loaded.
Marcelo Massahiro Meikaru

Lucas Machado Rafael Timóteo <br/ >
Ricardo Honda
B05.01.01r000 06/24/2016Reduced HTML examples
Added note about finalization via POS in Automação Confirma
Added <form method="SITEF_FINALIZA">
Added DATAHORA_SITEF return for <form method="SITEF"> and <formmethod="SITEF_PAGMULT">
Added returns VERSAO_APL, MODALIDADE_APL, RELEASE, INST_ID_REDE, INST_ID_CHAVE_ATIVACAO, COMP_NAME_FANTASIA, COMP_LOGRADOURO, COMP_CIDADE, COMP_CNPJ`` for <form method="SITEF_INFO"> < br/>Correction of the confirmation flow documentation in Browser Imprime e Confirma. Added explanations of modal flows.
Marcelo Massahiro Meikaru
B05.01.01r000 07/04/2016Correction of the confirmation flow documentation in Browser Imprime e Confirma. Addition of explanations of the flow of modalities.Marcelo Massahiro Meikaru
B05.01.03r000 03/08/2016Support for subacquiring data informed by automation Correction of some cases where the Browser ignores the transaction value passed by automation.Rafael Oliveira Freitas Timóteo
B05.01.06r000 09/05/2016Added change history of version B5.1.4r0 and B5.1.5r0 (versions with corrections) Added data-swex-mask and data-swex-fracdigits attributes
Addition of the JavaScript function beep()
Correction of the flow of the IMP_XX fields not being executed
Correction of the documentation for the IMP_XX field? the fields were always inverted
Correction of crash when displaying <title> but this was not provided by the page.
Correction of screen clutter during screen transitions.
B05.01.06r000 Rev A 12/26/2016Document conversion to Latex.
Corrections to texts that were in the Word version
Rafael Oliveira Freitas Timóteo
B05.01.13r000 Rev A 01/10/2017Added change history up to version B5.1.13r0Marcelo Massahiro Meikaru
B05.01.15rc00
170203 Rev A
Added the field PAR_TRN_<TIPO CAMPO>
Reformatting the tables to remove the "Name" column that didn't make sense.
Removal of hyphens when the word is a code snippet from tables, making them easier to read and copy.
Field columns are now flexible and will not break code words.
Correcting references within the tables.
Rafael Oliveira Freitas Timóteo
B05.01.15rc00 170203 Rev BReformatted the field tables to field tables.Rafael Oliveira Freitas Timóteo
B05.01.15rc01 Rev A 02/14/2017Added change history up to version B5.1.15rc1Marcelo Massahiro Meikaru
B05.02.02rc01 170412 Rev A 04/17/2017Change of PAR_TRN_<TIPO CAMPO> to PAR_TRN_<TIPO CAMPO>_<N> and change in the documentation of this field to facilitate its understandingAna Paula Adinolfi
Rafael Oliveira Freitas Timóteo
B05.03.00r000 170509 Rev A 05/09/2017Added change history up to version B5.3.0r0Marcelo Massahiro Meikaru
B05.03.00r000 170509 Rev B 06/13/2017Added information about the need for reconciliation/backup in some cases of transaction termination.
Added section Mechanism for resending TEF data.
Added TEF coupon printing section in the Print Automation modalities.
Marcelo Massahiro Meikaru
B05.03.03r000 170622 Rev A 06/22/2017Added REENVIO return field when the message is triggered by the TEF data resending mechanism.
Recommended levels for printing QRCode in NFC-e (M level) and CF-e-SAT (L level) have been corrected.
Code tables for QRCode printing have been changed to facilitate understanding.
Marcelo Massahiro Meikaru
B05.03.03r000 170622 Rev B 11/08/2017Corrections to examples of use of SITEF_CARTAO and SITEF_INFO. Added recommendation to include <input type="submit"> in forms that use automatic submission via JavaScript.
Correction of the minimum version for using JavaScript document.forms and FORM.elements.
Addition of the minimum version for using JavaScript beep().
Addition of the non-existence of JavaScript objects history, location, window and navigator.
Addition of non-existence of methods of the JavaScript document object.
Marcelo Massahiro Meikaru
B05.04.01r000 170815 Rev A 08/15/2017Ingenico Telium 2: Added support for QRCode printing.Marcelo Massahiro Meikaru
B05.04.01r000 170815 Rev B 08/21/2017Correction of validation example with JavaScriptMarcelo Massahiro Meikaru
B05.04.01r000 170815 Rev C 08/22/2017Removed references to the SITEF_PAGMULT method (control of transactions should be done by Automation to allow completion of an entire batch).
Removed references to input type="card" (deprecated, replaced by the SITEF_INFO method).
General cleaning of the document.
Marcelo Massahiro Meikaru
B05.05.00r000 171016 Rev A 10/16/2017Added data-swex-ui, data-swex-cancel-url and dataswex-cancel-action attributes to dataswex-cancel-action tag META.
Added TITLE attribute to INPUT and SELECT tags.
Added input field RESULTADOS_SEPARADOR in methods SITEF, SITEF_CARTAO and SITEF_PAGMULT.
Changed the format of the COMP_DADOS_CONF return field.
Added terminal issues in the SITEF_INFO method.
Changed the way of using the SITEF_FINALIZA method.
Added field COMP_USAR_DADOS_CONF in method SITEF.
Marcelo Massahiro Meikaru
B05.06.05r000 180131 Rev A 02/09/2018Added examples for SITEF_FINALIZA method
Added recommendation not to use the COMPANY field
Marcelo Massahiro Meikaru
B05.06.11r000 180502 Rev A 02/05/2018Added version history of B05.06.11r000 180502 and B05.06.09r000 180417Marcelo Massahiro Meikaru
B05.07.02r000 180507 Rev A 05/07/2018Inclusion of the IMG_CARREGA and IMG_APAGA methods for printing images
Correction of the example of the SITEF_FINALIZA method.
Marcelo Simão
B05.09.06r000 1808xx Rev A 08/15/2018Documentation correction: the URLERR attribute of the pre tag was written as URLERRO. This version now handles both cases so as not to impact customers Added explanations of User-Agent changes Added explanation that the handling of Cookies was delegated to libcURL in versions B05.07.xx, B05.08.xx and above B05. 09.04Marcelo Massahiro Meikaru
B05.09.06r000 1808xx Rev B 07/31/2019Change of examples in the Flag field according to the request from trac 44734.Rafael Oliveira Freitas Timoteo
B06.02.00r000 201106 Rev A 09/11/2020Inclusion of the description of the new DOC_INTEGRATOR field of the SITEF method.Rafael Pereira Luna
B07.03.00r000 210706 Rev A 09/03/2021New document layout with Fiserv logo. Documentation of the change so that it is possible to pass, in the COD_AUTORIZACAO field of the SITEF method, the extended NSU returned from FEPAS with a length of up to 99 characters. Inclusion of references to documents with information about digital wallets.Rafael Pereira Luna
B07.03.07r000 220711 Rev A 07/18/2022Documentation of the new fields of the SITEF method: PAR_TRN_CODBAR_<TIPOCAMPO>_<N>, CD_HABILITADAS, CD_RESTRICOES, CD_PRIORIZADAS and RESTRICOES_PAGTO.Rafael Pereira Luna