Skip to content

Commit

Permalink
hbci4j 3.5.46
Browse files Browse the repository at this point in the history
  • Loading branch information
age-77 committed Jul 11, 2023
1 parent 1a7d59f commit b8da866
Show file tree
Hide file tree
Showing 13 changed files with 23 additions and 15 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,6 +27,7 @@ public abstract class AbstractRequest {
private BankApiUser bankApiUser;
private BankAccess bankAccess;
private Bank bank;
private String sepaVersion;

private Object bankApiConsentData;

Expand Down
2 changes: 1 addition & 1 deletion onlinebanking-hbci4java/pom.xml
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
<dependency>
<groupId>de.adorsys</groupId>
<artifactId>hbci4j-adorsys</artifactId>
<version>3.5.44</version>
<version>3.5.46</version>
<exclusions>
<exclusion>
<groupId>org.projectlombok</groupId>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ GVUebSEPA createHbciJob() {

GVUebSEPA hbciJob;
if (bulkPayment instanceof FutureBulkPayment) {
hbciJob = new GVTermMultiUebSEPA(dialog.getPassport(), GVTermMultiUebSEPA.getLowlevelName());
hbciJob = new GVTermMultiUebSEPA(dialog.getPassport(), GVTermMultiUebSEPA.getLowlevelName(), getSepaVersion());
hbciJob.setParam("date", ((FutureBulkPayment) bulkPayment).getExecutionDate().toString());
} else {
hbciJob = new GVMultiUebSEPA(dialog.getPassport(), GVMultiUebSEPA.getLowlevelName());
hbciJob = new GVMultiUebSEPA(dialog.getPassport(), GVMultiUebSEPA.getLowlevelName(), getSepaVersion());
}

hbciJob.setParam("src", src);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ GVTermUebSEPADel createHbciJob() {

jobName = GVTermUebSEPADel.getLowlevelName();

GVTermUebSEPADel hbciJob = new GVTermUebSEPADel(dialog.getPassport(), jobName, null);
GVTermUebSEPADel hbciJob = new GVTermUebSEPADel(dialog.getPassport(), jobName, getSepaVersion(), null);

hbciJob.setParam("orderid", singlePayment.getOrderId());
hbciJob.setParam("date", singlePayment.getExecutionDate().toString());
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ GVDauerSEPADel createHbciJob() {
dst.iban = standingOrder.getOtherAccount().getIban();
dst.bic = standingOrder.getOtherAccount().getBic();

GVDauerSEPADel hbciJob = new GVDauerSEPADel(dialog.getPassport());
GVDauerSEPADel hbciJob = new GVDauerSEPADel(dialog.getPassport(), getSepaVersion());

hbciJob.setParam("src", src);
hbciJob.setParam("dst", dst);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,7 +46,7 @@ public LoadStandingOrdersJob(TransactionRequest<LoadStandingOrders> transactionR

@Override
GVDauerSEPAList createHbciJob() {
GVDauerSEPAList hbciJob = new GVDauerSEPAList(dialog.getPassport());
GVDauerSEPAList hbciJob = new GVDauerSEPAList(dialog.getPassport(), getSepaVersion());
hbciJob.setParam("src", getHbciKonto());
return hbciJob;
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -126,14 +126,14 @@ private AbstractHBCIJob createBookingsJobInternal() {
return Optional.ofNullable(rawResponseType)
.map(format -> {
if (format == CAMT) {
return new GVKUmsAllCamt(passport, true);
return new GVKUmsAllCamt(passport, getSepaVersion(), true);
} else {
return new GVKUmsAll(passport);
}
})
.orElseGet(() -> {
if (passport.jobSupported(GVKUmsAllCamt.getLowlevelName())) {
return new GVKUmsAllCamt(passport, false);
return new GVKUmsAllCamt(passport, getSepaVersion(), false);
} else if (passport.jobSupported(GVKUmsAll.getLowlevelName())) {
return new GVKUmsAll(passport);
} else {
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,7 +45,7 @@ GVDauerSEPANew createHbciJob() {
dst.iban = standingOrder.getOtherAccount().getIban();
dst.bic = standingOrder.getOtherAccount().getBic();

GVDauerSEPANew hbciJob = new GVDauerSEPANew(dialog.getPassport());
GVDauerSEPANew hbciJob = new GVDauerSEPANew(dialog.getPassport(), getSepaVersion());

hbciJob.setParam("src", src);
hbciJob.setParam("dst", dst);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,7 @@ GVRawSEPA createHbciJob() {
}

private GVRawSEPA createRawSepaJob(RawSepaPayment sepaPayment, String jobName) {
GVRawSEPA rawSEPAJob = new GVRawSEPA(dialog.getPassport(), jobName, sepaPayment.getRawRequestData());
GVRawSEPA rawSEPAJob = new GVRawSEPA(dialog.getPassport(), jobName, getSepaVersion(), sepaPayment.getRawRequestData());
rawSEPAJob.setParam("src", getHbciKonto());

String creditorIban = "";
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,7 @@
import org.kapott.hbci.dialog.HBCIJobsDialog;
import org.kapott.hbci.manager.*;
import org.kapott.hbci.passport.PinTanPassport;
import org.kapott.hbci.sepa.SepaVersion;
import org.kapott.hbci.status.HBCIExecStatus;
import org.kapott.hbci.status.HBCIMsgStatus;
import org.kapott.hbci.structures.Konto;
Expand Down Expand Up @@ -365,6 +366,12 @@ private Optional<AbstractHBCIJob> checkVeu() {
return Optional.empty();
}

SepaVersion getSepaVersion() {
return Optional.ofNullable(transactionRequest.getSepaVersion())
.map(s -> SepaVersion.byFileName(transactionRequest.getSepaVersion() + ".xsd"))
.orElse(null);
}

private HbciConsent getConsent() {
return (HbciConsent) transactionRequest.getBankApiConsentData();
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -40,13 +40,13 @@ AbstractHBCIJob createHbciJob() {

AbstractSEPAGV paymentJob;
if (singlePayment instanceof FutureSinglePayment) {
paymentJob = new GVTermUebSEPA(dialog.getPassport(), GVTermUebSEPA.getLowlevelName());
paymentJob = new GVTermUebSEPA(dialog.getPassport(), GVTermUebSEPA.getLowlevelName(), getSepaVersion());
paymentJob.setParam("date", ((FutureSinglePayment) singlePayment).getExecutionDate().toString());
} else {
if (singlePayment.isInstantPayment()) {
paymentJob = new GVInstantUebSEPA(dialog.getPassport(), GVInstantUebSEPA.getLowlevelName());
paymentJob = new GVInstantUebSEPA(dialog.getPassport(), GVInstantUebSEPA.getLowlevelName(), getSepaVersion());
} else {
paymentJob = new GVUebSEPA(dialog.getPassport(), GVUebSEPA.getLowlevelName());
paymentJob = new GVUebSEPA(dialog.getPassport(), GVUebSEPA.getLowlevelName(), getSepaVersion());
}
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ GVUmbSEPA createHbciJob() {
dst.iban = singlePayment.getReceiverIban();
dst.bic = singlePayment.getReceiverBic() != null ? singlePayment.getReceiverBic() : src.bic; //internal transfer, same bic

GVUmbSEPA hbciJob = new GVUmbSEPA(dialog.getPassport(), GVUmbSEPA.getLowlevelName(), null);
GVUmbSEPA hbciJob = new GVUmbSEPA(dialog.getPassport(), GVUmbSEPA.getLowlevelName(), getSepaVersion(), null);

hbciJob.setParam("src", src);
hbciJob.setParam("dst", dst);
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -64,7 +64,7 @@ public void update(AbstractHbciDialog dialog, AbstractHBCIJob hbciJob, String or
throw new MultibankingException(INTERNAL_ERROR, 500, e.getMessage());
}

Optional.ofNullable(hbciJob.getPainVersion())
Optional.ofNullable(hbciJob.getSepaVersion())
.ifPresent(version -> setPainVersion(version.getURN()));
setOriginLowLevelName(hbciJob.getJobName());
setOriginSegVersion(hbciJob.getSegVersion());
Expand Down

0 comments on commit b8da866

Please sign in to comment.