Integrate our products into your software. Let's make payment happen together!
Look at all the possibilitiesThe function CardValidation is used to verify if the user has a valid card so that you are more confident a payment can be completed.
The following code snippet demonstrates how you can start a card validation request.
TokenApi tokenService = new TokenService(); ExternalTerminal terminal = createExternalTerminal(); TokenDelegate tokenDelegate = new TokenDelegate() { ... }; tokenService.validateCard(terminal, tokenDelegate);
the tokenDelegate.onTokenSuccess(TokenResult result) contains the result and the state (SUCCESS/FAILURE) shows you whether the card is valid or not.
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);