Virtual Pinpad (setActivity method)

Unlike the conventional architecture, in which an external pinpad is used and communication with it is via USB/Bluetooth, this APOS model has an internal pinpad. This way, communication between the application layer and the pinpad is done directly and internally.

However, as this terminal does not have a physical keyboard and only has a display, the pinpad needs to be displayed on the same screen as the application that uses CliSiTef. To facilitate integration, CliSiTef implements a visual interface creating a “virtual pinpad” 2 . This interface is made up of a reduced display and a personalized keyboard and will be superimposed on the application screen when necessary.

In terms of the flow of function calls that the application makes to CliSiTef, there is only a single additional method that developers for APOS with an internal pinpad need to call. As mentioned previously, everything else in the CliSiTef call flow is the same as in the scenario where the application is run on a terminal with an external pinpad. The application must call this method and it is available in the CliSiTef class (for interface v2).

Method#

public void setActivity(Activity activity)

The activity parameter must be the Activity that conducts the flow of calls to CliSiTef and that will display the “virtual pinpad”, that is, it must be the Activity that implements the transaction with SiTef. We recommend calling the setActivity method right in the onCreate callback of this Activity.

Important: if the setActivity method is not called at the correct time, CliSiTef will not be able to connect to the internal pinpad and will return Error 31 (PINPAD ERROR) when carrying out pinpad transactions.


  • In some models, the APOS operating system itself designs the virtual keyboard, without any control over the application or CliSiTef.