Konto getDebtorAccount(AbstractScaTransaction sepaTransaction, PinTanPassport passport) { return Optional.ofNullable(sepaTransaction.getDebtorBankAccount()) .map(bankAccount -> { Konto konto = passport.findAccountByAccountNumber(bankAccount.getAccountNumber()); konto.iban = bankAccount.getIban(); konto.bic = bankAccount.getBic(); return konto; }) .orElse(null); }
private static Konto createAccount(HBCIDialog dialog, BankAccount bankAccount) { Konto account = dialog.getPassport().findAccountByAccountNumber(bankAccount.getAccountNumber()); account.iban = bankAccount.getIban(); account.bic = bankAccount.getBic(); return account; }
private static Konto createAccount(HBCIDialog dialog, BankAccount bankAccount) { Konto account = dialog.getPassport().findAccountByAccountNumber(bankAccount.getAccountNumber()); account.iban = bankAccount.getIban(); account.bic = bankAccount.getBic(); return account; }
@Override protected AbstractSEPAGV createHbciJob(AbstractScaTransaction transaction, PinTanPassport passport, String rawData) { StandingOrder standingOrder = (StandingOrder) transaction; Konto src = getDebtorAccount(transaction, passport); Konto dst = new Konto(); dst.name = standingOrder.getOtherAccount().getOwner(); dst.iban = standingOrder.getOtherAccount().getIban(); dst.bic = standingOrder.getOtherAccount().getBic(); GVDauerSEPANew gvDauerSEPANew = new GVDauerSEPANew(passport, rawData); gvDauerSEPANew.setParam("src", src); gvDauerSEPANew.setParam("dst", dst); gvDauerSEPANew.setParam("btg", new Value(standingOrder.getAmount())); gvDauerSEPANew.setParam("usage", standingOrder.getUsage()); // standing order specific parameter if (standingOrder.getFirstExecutionDate() != null) { gvDauerSEPANew.setParam("firstdate", standingOrder.getFirstExecutionDate().toString()); } if (standingOrder.getCycle() != null) { gvDauerSEPANew.setParam("timeunit", HbciMapping.cycleToTimeunit(standingOrder.getCycle())); // M month, W week gvDauerSEPANew.setParam("turnus", HbciMapping.cycleToTurnus(standingOrder.getCycle())); // 1W = every week, 2M = every two months } gvDauerSEPANew.setParam("execday", standingOrder.getExecutionDay()); // W: 1-7, M: 1-31 if (standingOrder.getLastExecutionDate() != null) { gvDauerSEPANew.setParam("lastdate", standingOrder.getLastExecutionDate().toString()); } gvDauerSEPANew.verifyConstraints(); return gvDauerSEPANew; }
@Override protected AbstractSEPAGV createHbciJob(AbstractScaTransaction transaction, PinTanPassport passport, String rawData) { StandingOrder standingOrder = (StandingOrder) transaction; Konto src = getDebtorAccount(transaction, passport); Konto dst = new Konto(); dst.name = standingOrder.getOtherAccount().getOwner(); dst.iban = standingOrder.getOtherAccount().getIban(); dst.bic = standingOrder.getOtherAccount().getBic(); GVDauerSEPADel gvDauerSEPADel = new GVDauerSEPADel(passport, rawData); gvDauerSEPADel.setParam("src", src); gvDauerSEPADel.setParam("dst", dst); gvDauerSEPADel.setParam("btg", new Value(standingOrder.getAmount())); gvDauerSEPADel.setParam("usage", standingOrder.getUsage()); gvDauerSEPADel.setParam("orderid", standingOrder.getOrderId()); // standing order specific parameter if (standingOrder.getFirstExecutionDate() != null) { gvDauerSEPADel.setParam("firstdate", standingOrder.getFirstExecutionDate().toString()); } if (standingOrder.getCycle() != null) { gvDauerSEPADel.setParam("timeunit", HbciMapping.cycleToTimeunit(standingOrder.getCycle())); // M month, W week gvDauerSEPADel.setParam("turnus", HbciMapping.cycleToTurnus(standingOrder.getCycle())); // 1W = every week, 2M = every two months } gvDauerSEPADel.setParam("execday", standingOrder.getExecutionDay()); // W: 1-7, M: 1-31 if (standingOrder.getLastExecutionDate() != null) { gvDauerSEPADel.setParam("lastdate", standingOrder.getLastExecutionDate().toString()); } gvDauerSEPADel.verifyConstraints(); return gvDauerSEPADel; }