Integrate our products into your software. Let's make payment happen together!
Look at all the possibilitiesThis guide will show you how you can retrieve the possible card circuits on different terminal.
Next it will also show you how to whitelist or blacklist certain types of card circuits.
The following code snippet demonstrates how you can retrieve the possible card circuits on your OPI-DE terminal.
TerminalDelegate terminalDelegate = new TerminalDelegate() { @Override public void onPaymentAdministrationSuccess(PaymentAdministrationResult result) { //contains code which handles a successful status call //PaymentAdministrationResult contains all the card circuits that are possible on the terminal } @Override public void onError(Error error) { //contains code which handles a failed status call } }; TerminalApi terminalService = new TerminalService(); terminalService.status(externalTerminal, terminalDelegate);
The following code snippet demonstrates how you can retrieve the possible card circuits on your unattended OPI-NL terminal.
TerminalDelegate terminalDelegate = new TerminalDelegate() { @Override public void onPaymentAdministrationSuccess(PaymentAdministrationResult result) { //contains code which handles a successful status call //PaymentAdministrationResult contains all the card circuits that are possible on the terminal } @Override public void onError(Error error) { //contains code which handles a failed status call } }; TerminalApi terminalService = new TerminalService(); terminalService.cardCircuits(externalTerminal, terminalDelegate);
ExternalTerminal externalTerminal = ExternalTerminal.builder() .ipAddress(ipAddress) // can be found using getting-started guide .port(terminalPort) // 4100 for OPI-NL & 20002 for OPI-DE .compatibilityPort(compatibilityPort) // 4102 for OPI-NL & 20007 for OPI-DE .socketMode(socketMode) // Dual-Socket for OPI-NL & Single-Socket for OPI-DE & OPI-NL .terminalType(terminalType) // EnumType which contains terminal protocol combined attended/unattended type .build(); PaymentDelegate delegate = new PaymentDelegate() { ... @Override public void onPaymentSuccess(PaymentResult paymentResult) { // The payment is completed successful! // The paymentResult contains extra information } @Override public void onError(Error error) { // A problem occured and there isn't a 'finished' message received from the terminal. // The error contains information about what went wrong. } ... }; ListcardCircuits = new ArrayList<>(); cardCircuits.add(CardCircuit.VISA); cardCircuits.add(CardCircuit.GIRO_CARD); CardCircuitCollectionRequest cardCircuitCollectionRequest = new CardCircuitCollectionRequest(cardCircuits, CardCircuitStateType.ACCEPTED); Payment payment = Payment .builder() .type(Payment.Type.SALE) .amount(new Money(new BigDecimal("0.05"), Currency.getInstance("EUR")) .cardCircuitCollectionRequest(cardCircuitCollectionRequest) .build(); PaymentApi paymentService = new PaymentService; paymentService.payment(externalTerminal, payment, delegate);
ExternalTerminal externalTerminal = ExternalTerminal.builder() .ipAddress(ipAddress) // can be found using getting-started guide .port(terminalPort) // 4100 for OPI-NL & 20002 for OPI-DE .compatibilityPort(compatibilityPort) // 4102 for OPI-NL & 20007 for OPI-DE .socketMode(socketMode) // Dual-Socket for OPI-NL & Single-Socket for OPI-DE & OPI-NL .terminalType(terminalType) // EnumType which contains terminal protocol combined attended/unattended type .build(); PaymentDelegate delegate = new PaymentDelegate() { ... @Override public void onPaymentSuccess(PaymentResult paymentResult) { // The payment is completed successful! // The paymentResult contains extra information } @Override public void onError(Error error) { // A problem occured and there isn't a 'finished' message received from the terminal. // The error contains information about what went wrong. } ... }; ListcardCircuits = new ArrayList<>(); cardCircuits.add(CardCircuit.VISA); cardCircuits.add(CardCircuit.GIRO_CARD); CardCircuitCollectionRequest cardCircuitCollectionRequest = new CardCircuitCollectionRequest(cardCircuits, CardCircuitStateType.DENIED); Payment payment = Payment .builder() .type(Payment.Type.SALE) .amount(new Money(new BigDecimal("0.05"), Currency.getInstance("EUR")) .cardCircuitCollectionRequest(cardCircuitCollectionRequest) .build(); PaymentApi paymentService = new PaymentService; paymentService.payment(externalTerminal, payment, delegate);