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.
TokenApi tokenService = new TokenService(); ExternalTerminal terminal = createExternalTerminal(); TokenDelegate tokenDelegate = new TokenDelegate() { ... }; tokenService.token(terminal, TokenPurpose.TRACKING, tokenDelegate);
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 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.
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 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);
The following code snippet demonstrates how you can get a Mifare UID via CardDetection
TokenApi tokenService = new TokenService(); ExternalTerminal terminal = createExternalTerminal(); terminal.supportMifareCards(true); TokenDelegate tokenDelegate = new TokenDelegate() { ... @Override public void cardUID(String cardUID) { ... } ... }; tokenService.token(terminal, TokenPurpose.TRACKING, tokenDelegate);
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);