Integrate our products into your software. Let's make payment happen together!
Look at all the possibilitiesTo stop an ongoing payment the POS will send an “AbortRequest” to the terminal. it is not guaranteed that the transaction will actually be aborted. The decision, if a transaction can be aborted, is taken by the payment application running the transaction.
The steps to stop an ongoing payment can be found below.
For the IM30/Unattended configured terminals we created a separate example/topic which can be found by clicking here
The main method to abort/stop an ongoing payment is using the same socket/connection. If you have an OPI-NL configured terminal you can also abort an ongoing payment on using a new socket/connection.
The following code snippet demonstrates how you can abort on the same connection/socket
TerminalDelegate terminalDelegate = new TerminalDelegate() { @Override public void onPaymentAdministrationSuccess(PaymentAdministrationResult result) { //Successful abort } @Override public void onError(Error error) { //Failed abort } }; PaymentApi paymentService = new PaymentService(); paymentService.abort(externalTerminal, terminalDelegate);
###Abort On New Connection
The following code snippet demonstrates how you can do a Normal Abort on a new connection
TerminalDelegate terminalDelegate = new TerminalDelegate() { @Override public void onPaymentAdministrationSuccess(PaymentAdministrationResult result) { //Successful abort } @Override public void onError(Error error) { //Failed abort } }; PaymentApi paymentService = new PaymentService(); paymentService.abortOnNewConnection(externalTerminal, terminalDelegate);
###What is the difference between a Normal Abort and a Silent Abort? When performing a Normal Abort the terminal will send an CashierDisplayMessage with the message “Aborted”. With a Silent Abort no CashierDisplayMessage is sent from the terminal.
The following code snippet demonstrates how you can do a Normal Abort
boolean isSilent = false; TokenApi tokenService = new TokenService(); ExternalTerminal terminal = createExternalTerminal(); TokenDelegate tokenDelegate = new TokenDelegate() { ... }; tokenService.abort(isSilent, terminal, tokenDelegate);
The following code snippet demonstrates how you can do a Silent Abort.
boolean isSilent = true; TokenApi tokenService = new TokenService(); ExternalTerminal terminal = createExternalTerminal(); TokenDelegate tokenDelegate = new TokenDelegate() { ... }; tokenService.abort(isSilent, terminal, tokenDelegate);
The following code snippet demonstrates how you can do a Normal Abort on a new connection
boolean isSilent = false; TokenApi tokenService = new TokenService(); ExternalTerminal terminal = createExternalTerminal(); TokenDelegate tokenDelegate = new TokenDelegate() { ... }; tokenService.abortOnNewConnection(isSilent, terminal, tokenDelegate);
The following code snippet demonstrates how you can do a Silent Abort on a new connection.
boolean isSilent = true; TokenApi tokenService = new TokenService(); ExternalTerminal terminal = createExternalTerminal(); TokenDelegate tokenDelegate = new TokenDelegate() { ... }; tokenService.abortOnNewConnection(isSilent, terminal, tokenDelegate);