Integrate our products into your software. Let's make payment happen together!
Look at all the possibilitiesWhen the POS is not equipped with a physical printer, the POS must use the E-Receipt Server to enable the cardholder to get a receipt.
CCV offers a special E-Receipt Server, where receipts are stored as PDF file. The POS is expected to send its own receipt information to the E-Receipt server using the OPI element ‘AdditionalText ’ and ‘DeviceTarget’ set to “E-ReceiptServer”. This triggers the terminal that the POS uses the E-Receipt option.
The following code snippet demonstrates how you can perform a payment with an E-Receipt.
For unattended terminals only.
createTerminal(ExternalTerminal.TerminalType.UNATTENDED_OPI_NL); PaymentApi paymentService = new PaymentService(); PaymentDelegate delegate = new PaymentDelegate() { @Override public void eReceipt(EReceiptRequest eReceipt) { ... } }; Payment payment = Payment .builder() .eReceiptAdditionalTextRequestList(eReceiptAdditionalTextRequest()) .type(Payment.Type.SALE) .amount(new Money(amount, Currency.getInstance("EUR"))) .lastReceiptNumber("1") .build(); paymentService.payment(terminal, payment, delegate); private ListeReceiptAdditionalTextRequest() { String headerLine = "Welcome To My shop"; String footerLine = "Thank You For Coming"; List headerLines = new ArrayList<>(); List footerLines = new ArrayList<>(); headerLines.add(headerLine); footerLines.add(footerLine); EReceiptAdditionalTextRequest request = new EReceiptAdditionalTextRequest(EReceiptTextPlacement.HEADER, headerLines); EReceiptAdditionalTextRequest footer = new EReceiptAdditionalTextRequest(EReceiptTextPlacement.FOOTER, footerLines); List requestList = new ArrayList<>(); requestList.add(request); requestList.add(footer); return requestList; }
The following code snippet demonstrates how you can perform a cardFinancialAdvice with an E-Receipt.
For unattended terminals only.
createTerminal(ExternalTerminal.TerminalType.UNATTENDED_OPI_NL); PaymentApi paymentService = new PaymentService(); TokenDelegate tokenDelegate = new TokenDelegate() { @Override public void eReceipt(EReceiptRequest eReceipt) { ... } }; FinancialAdviceRequest financialAdviceRequest = new FinancialAdviceRequest(Money.EUR(3.02), Environment.EVCHARGING, tokenSuccessResult.preAuthReference(), eReceiptAdditionalTextRequest()); paymentService.financialAdvice(terminal, financialAdviceRequest, tokenDelegate); private ListeReceiptAdditionalTextRequest() { String headerLine = "Welcome To My shop"; String footerLine = "Thank You For Coming"; List headerLines = new ArrayList<>(); List footerLines = new ArrayList<>(); headerLines.add(headerLine); footerLines.add(footerLine); EReceiptAdditionalTextRequest request = new EReceiptAdditionalTextRequest(EReceiptTextPlacement.HEADER, headerLines); EReceiptAdditionalTextRequest footer = new EReceiptAdditionalTextRequest(EReceiptTextPlacement.FOOTER, footerLines); List requestList = new ArrayList<>(); requestList.add(request); requestList.add(footer); return requestList; }
The following code snippet demonstrates how you can get an eReceiptUrl while perform a payment with the PhonePOS solution.
To be able to receive a eReceiptUrl with the PhonePOS solution the following flag needs to be added to your TerminalID: OAM_QR_CODE_AS_URL_STRING
createTerminal(ExternalTerminal.TerminalType.ATTENDED_OPI_DE); PaymentApi paymentService = new PaymentService(); PaymentDelegate delegate = new PaymentDelegate() { @Override public void onPaymentSuccess(PaymentResult paymentResult) { paymentResult.eReceiptUrl(); ... } }; Payment payment = Payment .builder() .type(Payment.Type.SALE) .amount(new Money(amount, Currency.getInstance("EUR"))) .build(); paymentService.payment(terminal, payment, delegate);
The following code snippet demonstrates how you can get an eReceiptUrl while perform a payment with the SecPos OPI-DE terminal.\
createTerminal(ExternalTerminal.TerminalType.ATTENDED_OPI_DE); PaymentApi paymentService = new PaymentService(); PaymentDelegate delegate = new PaymentDelegate() { @Override public void eReceipt(EReceiptRequest eReceiptRequest) { String qrCode = eReceiptRequest.url(); } }; Payment payment = Payment .builder() .type(Payment.Type.SALE) .amount(new Money(amount, Currency.getInstance("EUR"))) .build(); paymentService.payment(terminal, payment, delegate);