private boolean startVoucher(TransactionBean tab) throws Exception { LOG.debug("# SendMoneyPage.startVoucher()"); StartVoucher request = getNewMobiliserRequest(StartVoucher.class); StartVoucherResponse response = null; request.setAmount(tab.getAmount()); request.setAutoCapture(tab.isAutoCapture()); request.setOrderChannel(tab.getOrderChannel()); request.setOrderID(tab.getOrderId()); request.setPayee(tab.getPayee()); request.setPayer(tab.getPayer()); request.setText(tab.getText()); request.setUsecase(tab.getUsecase()); response = wsStartVoucherClient.startvoucher(request); transaction = response.getTransaction(); if (!evaluateMobiliserResponse(response)) { LOG.warn("# Error during start voucher preauthorization"); return false; } LOG.info( "# start voucher preauthorise transaction[{}] money successfully finished", tab.getModule()); // Calculate fees and amounts long payeeFee = 0; long payerFee = 0; for (MoneyFeeType mft : response.getMoneyFee()) { if (mft.isPayee()) { payeeFee += mft.getValue(); payeeFee += mft.getVat(); } else { // isPayer payerFee += mft.getValue(); payerFee += mft.getVat(); } } tab.setFeeAmount(payerFee + payeeFee); tab.setDebitAmount(tab.getAmount().getValue() + payerFee); tab.setCreditAmount(tab.getAmount().getValue() - payeeFee); tab.setAuthenticationMethodPayee( Integer.valueOf(response.getAuthenticationMethods().getAuthMethodPayee().getId())); tab.setAuthenticationMethodPayer( Integer.valueOf(response.getAuthenticationMethods().getAuthMethodPayer().getId())); tab.setPreAuthFinished(true); tab.setRefTransaction(response.getTransaction()); return true; }