Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Verständlichkeit erhöht in GVTAN2Step und HBCIJobImpl #66

Open
wants to merge 15 commits into
base: master
Choose a base branch
from
Open
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Prev Previous commit
Next Next commit
Konstanten für Status-Objekte aus HBCIMsgStatus für bessere Lesbarkeit
ruderphilipp committed Feb 2, 2022

Verified

This commit was created on GitHub.com and signed with GitHub’s verified signature.
commit 6e347b6ff03faf711bd41295bf9fb837b1465553
7 changes: 5 additions & 2 deletions src/main/java/org/kapott/hbci/GV/GVTAN2Step.java
Original file line number Diff line number Diff line change
@@ -32,6 +32,7 @@
import org.kapott.hbci.passport.AbstractPinTanPassport;
import org.kapott.hbci.passport.HBCIPassportInternal;
import org.kapott.hbci.status.HBCIMsgStatus;
import org.kapott.hbci.status.HBCIStatus;

import static org.kapott.hbci.dialog.KnownReturncode.W3040;
import static org.kapott.hbci.dialog.KnownReturncode.W3076;
@@ -191,6 +192,8 @@ public boolean haveTan()

protected void extractResults(HBCIMsgStatus msgstatus,String header,int idx)
{
final HBCIStatus segS = msgstatus.segStatus;
final HBCIStatus globS = msgstatus.globStatus;
final Properties result = msgstatus.getData();
final String segCode = result.getProperty(header+".SegHead.code"); // HITAN oder das HI** des GV
HBCIUtils.log("found HKTAN response with segcode " + segCode,HBCIUtils.LOG_DEBUG);
@@ -202,7 +205,7 @@ protected void extractResults(HBCIMsgStatus msgstatus,String header,int idx)
// Pruefen, ob die Bank eventuell ein 3040 gesendet hat - sie also noch weitere Daten braucht.
// Das 3040 bezieht sich dann aber nicht auf unser HKTAN, sondern auf den eigentlichen GV.
// In dem Fall muessen wir uns den eigentlichen Task für die erneute Ausfuehrung merken.
if (segCode.equals(toInsCode(this.getHBCICode())) && W3040.isIn(msgstatus.segStatus.getWarnings()) && this.task.redoAllowed())
if (segCode.equals(toInsCode(this.getHBCICode())) && W3040.isIn(segS.getWarnings()) && this.task.redoAllowed())
{
HBCIUtils.log("found status code 3040, need to repeat task " + this.task.getHBCICode(),HBCIUtils.LOG_DEBUG);
HBCIUtils.log("Weitere Daten folgen",HBCIUtils.LOG_INFO);
@@ -225,7 +228,7 @@ protected void extractResults(HBCIMsgStatus msgstatus,String header,int idx)

// SCA-Ausnahme checken. Wenn wir in der Auswertung des ersten HKTAN sind, pruefen wir, ob die Bank einen 3076 geschickt
// hat. Wenn das der Fall ist, koennen wir das zweite HKTAN weglassen und muessen auch beim User keine TAN erfragen
if ((this.process == PROCESS1 || this.process == PROCESS2_STEP1) && (W3076.isIn(msgstatus.segStatus.getWarnings()) || W3076.isIn(msgstatus.globStatus.getWarnings())))
if ((this.process == PROCESS1 || this.process == PROCESS2_STEP1) && (W3076.isIn(segS.getWarnings()) || W3076.isIn(globS.getWarnings())))
{
HBCIUtils.log("found status code 3076, no SCA required",HBCIUtils.LOG_DEBUG);
p.setPersistentData(AbstractPinTanPassport.KEY_PD_SCA,"true"); // Bewirkt, dass die TAN-Abfrage nicht erscheint