Integrate our products into your software. Let's make payment happen together!
Look at all the possibilitiesIt is possible to allow or deny a card brands while during a payment. In this guide we will show you how to allow only a certain list of card brands.
The following code snippet demonstrates how you can allow certain card brands during a payment.
createTerminal(ExternalTerminal.TerminalType.ATTENDED_OPI_DE); PaymentApi paymentService = new PaymentService(); 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 } }; ListcardCircuits = new ArrayList<>(); cardCircuits.add(CardCircuit.ECMC) cardCircuits.add(CardCircuit.MAES) // OPI-NL terminals CardCircuitCollectionRequest cardCircuitCollectionRequest = new CardCircuitCollectionRequest(cardCircuits) // OPI-DE terminals CardCircuitCollectionRequest cardCircuitCollectionRequest = new CardCircuitCollectionRequest(cardCircuits, CardCircuitStateType.ACCEPTED); Payment payment = Payment .builder() .type(Payment.Type.SALE) .amount(new Money(amount, Currency.getInstance("EUR"))) .cardCircuitCollectionRequest(cardCircuitCollectionRequest) .build(); paymentService.payment(terminal, payment, delegate);
The following code snippet demonstrates how you can deny certain card brands during a payment.
For OPI-DE terminals only.
createTerminal(ExternalTerminal.TerminalType.ATTENDED_OPI_DE); PaymentApi paymentService = new PaymentService(); 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 } }; ListcardCircuits = new ArrayList<>(); cardCircuits.add(CardCircuit.ECMC) cardCircuits.add(CardCircuit.MAES) // OPI-DE terminals only CardCircuitCollectionRequest cardCircuitCollectionRequest = new CardCircuitCollectionRequest(cardCircuits, CardCircuitStateType.DENIED); Payment payment = Payment .builder() .type(Payment.Type.SALE) .amount(new Money(amount, Currency.getInstance("EUR"))) .cardCircuitCollectionRequest(cardCircuitCollectionRequest) .build(); paymentService.payment(terminal, payment, delegate);