Integrate our products into your software. Let's make payment happen together!
Look at all the possibilitiesThe function CardDetection is used as a kind of Early Card Detect, and the CardDetectionResponse can contain data (TrackingToken) to recognize a card (or cardholder) in an anonymous way.
A TrackingToken is a secure representation of a PAN used for Customer recognition and tracking. Examples are:
Tracking tokens have a length of 18 characters and always starts with ‘99’ to indicate the full PAN was used during calculation of the token.
The following code snippet demonstrates how you can start a Tracking token request.
TerminalApi terminalService = new TerminalService(); ExternalTerminal terminal = createExternalTerminal(); TerminalDelegate terminalDelegate = new terminalDelegate() { ... }; terminalService.cardDetection(terminal, CardDetectionRequest.builder().tokenPurpose(TokenPurpose.TRACKING).build(), terminalDelegate);
The following code snippet demonstrates how you can get a Mifare UID via Flexo
TerminalApi terminalService = new TerminalService(); ExternalTerminal terminal = createExternalTerminal(); TerminalDelegate terminalDelegate = new terminalDelegate() { ... @Override public void cardUID(String cardUID) { ... } ... }; terminalService.cardDetection(terminal, CardDetectionRequest.builder().includeFlexo(true).build(), terminalDelegate);
The following code snippet demonstrates how you can get a Mifare UID via CardTunnel
TerminalApi terminalService = new TerminalService(); ExternalTerminal terminal = createExternalTerminal(); TerminalDelegate terminalDelegate = new terminalDelegate() { ... @Override public void onPaymentAdministrationSuccess(PaymentAdministrationResult result) { // This is a list of parameters returned by the Flexo containing the UID, CardType and CardSlotNo result.flexoParameters(); } @Override public void cardUID(String cardUID) { ... } ... }; terminalService.cardDetection(terminal, CardDetectionRequest.builder().includeCardTunnel(true).build(), terminalDelegate);
The following code snippet demonstrates how you can do a Normal Abort
boolean isSilent = false; TerminalApi terminalService = new TerminalService(); ExternalTerminal terminal = createExternalTerminal(); TerminalDelegate terminalDelegate = new terminalDelegate() { ... }; terminalService.abort(isSilent, terminal, terminalDelegate);
The following code snippet demonstrates how you can do a Normal Abort on a new connection
boolean isSilent = false; TerminalApi terminalService = new TerminalService(); ExternalTerminal terminal = createExternalTerminal(); TerminalDelegate terminalDelegate = new terminalDelegate() { ... }; terminalService.abortOnNewConnection(isSilent, terminal, terminalDelegate);
The following code snippet demonstrates how you can do a Silent Abort.
boolean isSilent = true; TerminalApi terminalService = new TerminalService(); ExternalTerminal terminal = createExternalTerminal(); TerminalDelegate terminalDelegate = new terminalDelegate() { ... }; terminalService.abort(isSilent, terminal, terminalDelegate);
The following code snippet demonstrates how you can do a Silent Abort on a new connection.
boolean isSilent = true; TerminalApi terminalService = new TerminalService(); ExternalTerminal terminal = createExternalTerminal(); TerminalDelegate terminalDelegate = new terminalDelegate() { ... }; terminalService.abortOnNewConnection(isSilent, terminal, terminalDelegate);
The following code snippet demonstrates how you can get a card token on terminals running SecPOS Evo.
Money money = new Money(new BigDecimal("0.00"), Currency.getInstance("EUR")); Payment payment = Payment .builder() .type(Payment.Type.SALE) .hashAlgorithm(HashAlgorithm.DEFAULT) .amount(money) .build(); PaymentApi paymentService = new PaymentService(); ExternalTerminal terminal = createExternalTerminal(); PaymentDelegate paymentDelegate = new PaymentDelegate() { @Override public void onPaymentSuccess(PaymentResult result) { // The payment is completed successful! // The paymentResult contains all information about the transaction } @Override public void onError(Error error) { // The payment failed // The Error object contains information about what went wrong } ... }; paymentService.payment(terminal, payment, paymentDelegate);