Integrate our products into your software. Let's make payment happen together!
Look at all the possibilitiesWith this guide we will use the TerminalService to perform a PeriodClosing
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
.build();
TerminalDelegate terminalDelegate = new TerminalDelegate() {
@Override
public void onPaymentAdministrationSuccess(PaymentAdministrationResult result) {
//contains code which handles a successful period closing
}
@Override
public void onError(Error error) {
//contains code which handles a failed period closing
}
@Override
public void printMerchantReceiptAndSignature(PaymentReceipt receipt) {
//contains code which handles receiving a merchant receipt
}
@Override
public void printCustomerReceiptAndSignature(PaymentReceipt receipt) {
//contains code which handles receiving a customer receipt
}
@Override
public void storeEJournal(String journal) {
//contains code which handles storing a E-Journal
}
@Override
public void printJournalReceipt(PaymentReceipt paymentReceipt) {
//contains code which sends receipt/lines to printer (contains all period closing information)
}
};
TerminalApi terminalService = new TerminalService();
terminalService.periodClosing(externalTerminal, terminalDelegate);