Integrate our products into your software. Let's make payment happen together!
Look at all the possibilitiesThe function OnlineAgent is used to access different kinds of applications of the terminal: CardTunnel and UserInterface.
The following code snippet demonstrates how you can use the CardTunnel application to send apdu commands to Mifare cards.
TerminalApi terminalService = new TerminalService(); ExternalTerminal terminal = createExternalTerminal(); TerminalDelegate terminalDelegate = new terminalDelegate() { ... @Override public void onPaymentAdministrationSuccess(PaymentAdministrationResult result) { // Contains the CardSlotNo, CardStatus and Reponse code result.tunnelResponse(); } ... }; terminalService.onlineAgent( terminal, OnlineAgentRequest.builder() .applicationId("CardTunnel") .tunnelRequest( TunnelRequest.builder() .cardSlotNo(CardSlotNo.CUSTOMER_CONTACTLESS_READER) .command("BCA40000022901") .build()) .build(), terminalDelegate);
The following code snippet demonstrates how you can use the UserInterface application to use the terminal as a screen only if the POS does not have a primary screen
TerminalApi terminalService = new TerminalService(); ExternalTerminal terminal = createExternalTerminal(); TerminalDelegate terminalDelegate = new terminalDelegate() { ... }; terminalService.onlineAgent( terminal, OnlineAgentRequest.builder() .applicationId("UserInterface") .displayRequest(DisplayRequest.builder() .delayedResponse(true) .displayLines(List.of("This is the title", "This is the body", "This is the footer")) .buttons(List.of( Button.builder().keyBeep(KeyBeep.On).name("submitButton").value("Submit button").build(), Button.builder().keyBeep(KeyBeep.On).name("newCharge").value("New Charge button").build() )) .bottomLineButton("OK_CANCEL") .screenBeep(ScreenBeep.RequestBeep) .eReceiptUrl("https://ereceipturl.com/test") .build()) .build(), terminalDelegate);