Codebase list hbci4java / a168bf7
Import upstream version 3.1.55 Debian Janitor 2 years ago
20 changed file(s) with 571 addition(s) and 214 deletion(s). Raw diff Collapse all Expand all
22 .settings/
33 target
44 /bin/
5 .idea
6 *.iml
22 <modelVersion>4.0.0</modelVersion>
33 <groupId>com.github.hbci4j</groupId>
44 <artifactId>hbci4j-core</artifactId>
5 <version>3.1.49</version>
5 <version>3.1.55</version>
66 <packaging>jar</packaging>
77 <name>${project.artifactId}</name>
88 <description>HBCI4j - Home Banking Computer Interface for Java</description>
3030 <url>scm:git:git@github.com:hbci4j/hbci4java.git</url>
3131 <connection>scm:git:git@github.com:hbci4j/hbci4java.git</connection>
3232 <developerConnection>scm:git:git@github.com:hbci4j/hbci4java.git</developerConnection>
33 <tag>hbci4j-core-3.1.49</tag>
33 <tag>hbci4j-core-3.1.55</tag>
3434 </scm>
3535 <properties>
3636 <project.build.sourceEncoding>UTF-8</project.build.sourceEncoding>
7575 addConstraint("dst.bic", "sepa.dst.bic", "", LogFilter.FILTER_MOST, true);
7676 addConstraint("dst.iban", "sepa.dst.iban", null, LogFilter.FILTER_IDS, true);
7777 addConstraint("dst.name", "sepa.dst.name", null, LogFilter.FILTER_IDS, true);
78 addConstraint("btg.value", "sepa.btg.value", null, LogFilter.FILTER_NONE, true);
78 addConstraint("dst.addr.country","sepa.dst.addr.country", "", LogFilter.FILTER_MOST, true);
79 addConstraint("dst.addr.line1", "sepa.dst.addr.line1", "", LogFilter.FILTER_MOST, true);
80 addConstraint("dst.addr.line2", "sepa.dst.addr.line2", "", LogFilter.FILTER_MOST, true);
81 addConstraint("btg.value", "sepa.btg.value", null, LogFilter.FILTER_NONE, true);
7982 addConstraint("btg.curr", "sepa.btg.curr", "EUR", LogFilter.FILTER_NONE, true);
8083 addConstraint("usage", "sepa.usage", "", LogFilter.FILTER_NONE, true);
8184
3434 import org.kapott.hbci.sepa.jaxb.pain_008_001_01.PaymentMethod2Code;
3535 import org.kapott.hbci.sepa.jaxb.pain_008_001_01.PaymentTypeInformation8;
3636 import org.kapott.hbci.sepa.jaxb.pain_008_001_01.PersonIdentification4;
37 import org.kapott.hbci.sepa.jaxb.pain_008_001_01.PostalAddress5;
3738 import org.kapott.hbci.sepa.jaxb.pain_008_001_01.RemittanceInformation3;
3839 import org.kapott.hbci.sepa.jaxb.pain_008_001_01.RestrictedIdentification1;
3940 import org.kapott.hbci.sepa.jaxb.pain_008_001_01.RestrictedIdentification2;
183184 drctDbtTxInf.getDbtrAgt().setFinInstnId(new FinancialInstitutionIdentification4());
184185 drctDbtTxInf.getDbtrAgt().getFinInstnId().setBIC(sepaParams.getProperty(SepaUtil.insertIndex("dst.bic", index)));
185186
187 //Payment Information - notwendig bei Sepa Lastschriften in Drittstaaten (CH, UK?)
188 String property = sepaParams.getProperty(SepaUtil.insertIndex("dst.addr.country", index));
189 if (property != null && property.length() > 0) {
190 drctDbtTxInf.getDbtr().setPstlAdr(new PostalAddress5());
191 // Country Code, zb DE, CH etc. [A-Z]{2,2}
192 drctDbtTxInf.getDbtr().getPstlAdr().setCtry(sepaParams.getProperty(SepaUtil.insertIndex("dst.addr.country", index)));
193 // max 2 Zeilen mit Text min 1, max 70 Zeichen
194 for (int i = 1; i <= 2; i++) {
195 String addressLine = sepaParams.getProperty(SepaUtil.insertIndex("dst.addr.line" + i, index));
196 if (addressLine != null && addressLine.length() > 0) {
197 drctDbtTxInf.getDbtr().getPstlAdr().getAdrLine().add(addressLine);
198 }
199 }
200 }
186201
187202 //Payment Information - Credit Transfer Transaction Information - Amount
188203 drctDbtTxInf.setInstdAmt(new EuroMax9Amount());
4040 import org.kapott.hbci.sepa.jaxb.pain_008_001_02.PaymentMethod2Code;
4141 import org.kapott.hbci.sepa.jaxb.pain_008_001_02.PaymentTypeInformationSDD;
4242 import org.kapott.hbci.sepa.jaxb.pain_008_001_02.PersonIdentificationSEPA2;
43 import org.kapott.hbci.sepa.jaxb.pain_008_001_02.PostalAddressSEPA;
4344 import org.kapott.hbci.sepa.jaxb.pain_008_001_02.PurposeSEPA;
4445 import org.kapott.hbci.sepa.jaxb.pain_008_001_02.RemittanceInformationSEPA1Choice;
4546 import org.kapott.hbci.sepa.jaxb.pain_008_001_02.RestrictedPersonIdentificationSEPA;
4849 import org.kapott.hbci.sepa.jaxb.pain_008_001_02.SequenceType1Code;
4950 import org.kapott.hbci.sepa.jaxb.pain_008_001_02.ServiceLevel;
5051
51
5252 /**
5353 * SEPA-Generator fuer pain.008.001.02.
5454 */
5555 public class GenLastSEPA00800102 extends AbstractSEPAGenerator<Properties>
5656 {
57 /**
58 * @see org.kapott.hbci.GV.generators.AbstractSEPAGenerator#getSepaVersion()
59 */
60 @Override
61 public SepaVersion getSepaVersion()
62 {
63 return SepaVersion.PAIN_008_001_02;
64 }
65
66 /**
67 * @see org.kapott.hbci.GV.generators.ISEPAGenerator#generate(java.lang.Object, java.io.OutputStream, boolean)
68 */
69 @Override
70 public void generate(Properties sepaParams, OutputStream os, boolean validate) throws Exception
71 {
72 Integer maxIndex = SepaUtil.maxIndex(sepaParams);
73
74 //Document
75 Document doc = new Document();
76
77
78 //Customer Credit Transfer Initiation
79 doc.setCstmrDrctDbtInitn(new CustomerDirectDebitInitiationV02());
80 doc.getCstmrDrctDbtInitn().setGrpHdr(new GroupHeaderSDD());
81
82 final String sepaId = sepaParams.getProperty("sepaid");
83 final String pmtInfId = sepaParams.getProperty("pmtinfid");
84
85 //Group Header
86 doc.getCstmrDrctDbtInitn().getGrpHdr().setMsgId(sepaId);
87 doc.getCstmrDrctDbtInitn().getGrpHdr().setCreDtTm(SepaUtil.createCalendar(null));
88 doc.getCstmrDrctDbtInitn().getGrpHdr().setNbOfTxs(String.valueOf(maxIndex != null ? maxIndex + 1 : 1));
89 doc.getCstmrDrctDbtInitn().getGrpHdr().setInitgPty(new PartyIdentificationSEPA1());
90 doc.getCstmrDrctDbtInitn().getGrpHdr().getInitgPty().setNm(sepaParams.getProperty("src.name"));
91 doc.getCstmrDrctDbtInitn().getGrpHdr().setCtrlSum(SepaUtil.sumBtgValue(sepaParams, maxIndex));
92
93
94 //Payment Information
95 ArrayList<PaymentInstructionInformationSDD> pmtInfs = (ArrayList<PaymentInstructionInformationSDD>) doc.getCstmrDrctDbtInitn().getPmtInf();
96 PaymentInstructionInformationSDD pmtInf = new PaymentInstructionInformationSDD();
97 pmtInfs.add(pmtInf);
98
99 pmtInf.setPmtInfId(pmtInfId != null && pmtInfId.length() > 0 ? pmtInfId : sepaId);
100 pmtInf.setPmtMtd(PaymentMethod2Code.DD);
101
102 pmtInf.setNbOfTxs(String.valueOf(maxIndex != null ? maxIndex + 1 : 1));
103 pmtInf.setCtrlSum(SepaUtil.sumBtgValue(sepaParams, maxIndex));
104
105 pmtInf.setReqdColltnDt(SepaUtil.createCalendar(sepaParams.getProperty("targetdate")));
106 pmtInf.setCdtr(new PartyIdentificationSEPA5());
107 pmtInf.setCdtrAcct(new CashAccountSEPA1());
108 pmtInf.setCdtrAgt(new BranchAndFinancialInstitutionIdentificationSEPA3());
109
110 //Payment Information
111 pmtInf.getCdtr().setNm(sepaParams.getProperty("src.name"));
112
113 //Payment Information
114 pmtInf.getCdtrAcct().setId(new AccountIdentificationSEPA());
115 pmtInf.getCdtrAcct().getId().setIBAN(sepaParams.getProperty("src.iban"));
116
117 //Payment Information
118 pmtInf.getCdtrAgt().setFinInstnId(new FinancialInstitutionIdentificationSEPA3());
119 String srcBic = sepaParams.getProperty("src.bic");
120 if (srcBic != null && srcBic.length() > 0) // BIC ist inzwischen optional
57 /**
58 * @see org.kapott.hbci.GV.generators.AbstractSEPAGenerator#getSepaVersion()
59 */
60 @Override
61 public SepaVersion getSepaVersion()
62 {
63 return SepaVersion.PAIN_008_001_02;
64 }
65
66 /**
67 * @see org.kapott.hbci.GV.generators.ISEPAGenerator#generate(java.lang.Object, java.io.OutputStream, boolean)
68 */
69 @Override
70 public void generate(Properties sepaParams, OutputStream os, boolean validate) throws Exception
71 {
72 Integer maxIndex = SepaUtil.maxIndex(sepaParams);
73
74 // Document
75 Document doc = new Document();
76
77 // Customer Credit Transfer Initiation
78 doc.setCstmrDrctDbtInitn(new CustomerDirectDebitInitiationV02());
79 doc.getCstmrDrctDbtInitn().setGrpHdr(new GroupHeaderSDD());
80
81 final String sepaId = sepaParams.getProperty("sepaid");
82 final String pmtInfId = sepaParams.getProperty("pmtinfid");
83
84 // Group Header
85 doc.getCstmrDrctDbtInitn().getGrpHdr().setMsgId(sepaId);
86 doc.getCstmrDrctDbtInitn().getGrpHdr().setCreDtTm(SepaUtil.createCalendar(null));
87 doc.getCstmrDrctDbtInitn().getGrpHdr().setNbOfTxs(String.valueOf(maxIndex != null ? maxIndex + 1 : 1));
88 doc.getCstmrDrctDbtInitn().getGrpHdr().setInitgPty(new PartyIdentificationSEPA1());
89 doc.getCstmrDrctDbtInitn().getGrpHdr().getInitgPty().setNm(sepaParams.getProperty("src.name"));
90 doc.getCstmrDrctDbtInitn().getGrpHdr().setCtrlSum(SepaUtil.sumBtgValue(sepaParams, maxIndex));
91
92 // Payment Information
93 ArrayList<PaymentInstructionInformationSDD> pmtInfs = (ArrayList<PaymentInstructionInformationSDD>) doc.getCstmrDrctDbtInitn().getPmtInf();
94 PaymentInstructionInformationSDD pmtInf = new PaymentInstructionInformationSDD();
95 pmtInfs.add(pmtInf);
96
97 pmtInf.setPmtInfId(pmtInfId != null && pmtInfId.length() > 0 ? pmtInfId : sepaId);
98 pmtInf.setPmtMtd(PaymentMethod2Code.DD);
99
100 pmtInf.setNbOfTxs(String.valueOf(maxIndex != null ? maxIndex + 1 : 1));
101 pmtInf.setCtrlSum(SepaUtil.sumBtgValue(sepaParams, maxIndex));
102
103 pmtInf.setReqdColltnDt(SepaUtil.createCalendar(sepaParams.getProperty("targetdate")));
104 pmtInf.setCdtr(new PartyIdentificationSEPA5());
105 pmtInf.setCdtrAcct(new CashAccountSEPA1());
106 pmtInf.setCdtrAgt(new BranchAndFinancialInstitutionIdentificationSEPA3());
107
108 // Payment Information
109 pmtInf.getCdtr().setNm(sepaParams.getProperty("src.name"));
110
111 // Payment Information
112 pmtInf.getCdtrAcct().setId(new AccountIdentificationSEPA());
113 pmtInf.getCdtrAcct().getId().setIBAN(sepaParams.getProperty("src.iban"));
114
115 // Payment Information
116 pmtInf.getCdtrAgt().setFinInstnId(new FinancialInstitutionIdentificationSEPA3());
117 String srcBic = sepaParams.getProperty("src.bic");
118 if (srcBic != null && srcBic.length() > 0) // BIC ist inzwischen optional
119 {
120 pmtInf.getCdtrAgt().getFinInstnId().setBIC(srcBic);
121 } else
122 {
123 pmtInf.getCdtrAgt().getFinInstnId().setOthr(new OthrIdentification());
124 pmtInf.getCdtrAgt().getFinInstnId().getOthr().setId(OthrIdentificationCode.NOTPROVIDED);
125 }
126
127 // Payment Information - ChargeBearer
128 pmtInf.setChrgBr(ChargeBearerTypeSEPACode.SLEV);
129
130 pmtInf.setPmtTpInf(new PaymentTypeInformationSDD());
131 pmtInf.getPmtTpInf().setSvcLvl(new ServiceLevel());
132 pmtInf.getPmtTpInf().getSvcLvl().setCd("SEPA");
133 pmtInf.getPmtTpInf().setLclInstrm(new LocalInstrumentSEPA());
134 pmtInf.getPmtTpInf().getLclInstrm().setCd(sepaParams.getProperty("type"));
135 pmtInf.getPmtTpInf().setSeqTp(SequenceType1Code.fromValue(sepaParams.getProperty("sequencetype")));
136
137 // Payment Information - Credit Transfer Transaction Information
138 ArrayList<DirectDebitTransactionInformationSDD> drctDbtTxInfs = (ArrayList<DirectDebitTransactionInformationSDD>) pmtInf.getDrctDbtTxInf();
139 if (maxIndex != null)
140 {
141 for (int tnr = 0; tnr <= maxIndex; tnr++)
142 {
143 drctDbtTxInfs.add(createDirectDebitTransactionInformationSDD(sepaParams, tnr));
144 }
145 } else
146 {
147 drctDbtTxInfs.add(createDirectDebitTransactionInformationSDD(sepaParams, null));
148 }
149
150 String batch = SepaUtil.getProperty(sepaParams, "batchbook", null);
151 if (batch != null)
152 pmtInf.setBtchBookg(batch.equals("1"));
153
154 ObjectFactory of = new ObjectFactory();
155 this.marshal(of.createDocument(doc), os, validate);
156 }
157
158 private DirectDebitTransactionInformationSDD createDirectDebitTransactionInformationSDD(Properties sepaParams, Integer index) throws Exception
159 {
160 DirectDebitTransactionInformationSDD drctDbtTxInf = new DirectDebitTransactionInformationSDD();
161 drctDbtTxInf.setDrctDbtTx(new DirectDebitTransactionSDD());
162 drctDbtTxInf.getDrctDbtTx().setCdtrSchmeId(new PartyIdentificationSEPA3());
163 drctDbtTxInf.getDrctDbtTx().getCdtrSchmeId().setId(new PartySEPA2());
164 drctDbtTxInf.getDrctDbtTx().getCdtrSchmeId().getId().setPrvtId(new PersonIdentificationSEPA2());
165 drctDbtTxInf.getDrctDbtTx().getCdtrSchmeId().getId().getPrvtId().setOthr(new RestrictedPersonIdentificationSEPA());
166 drctDbtTxInf.getDrctDbtTx().getCdtrSchmeId().getId().getPrvtId().getOthr().setId(sepaParams.getProperty(SepaUtil.insertIndex("creditorid", index)));
167 drctDbtTxInf.getDrctDbtTx().getCdtrSchmeId().getId().getPrvtId().getOthr().setSchmeNm(new RestrictedPersonIdentificationSchemeNameSEPA());
168 drctDbtTxInf.getDrctDbtTx().getCdtrSchmeId().getId().getPrvtId().getOthr().getSchmeNm().setPrtry(IdentificationSchemeNameSEPA.SEPA);
169
170 drctDbtTxInf.getDrctDbtTx().setMndtRltdInf(new MandateRelatedInformationSDD());
171 drctDbtTxInf.getDrctDbtTx().getMndtRltdInf().setMndtId(sepaParams.getProperty(SepaUtil.insertIndex("mandateid", index)));
172 drctDbtTxInf.getDrctDbtTx().getMndtRltdInf().setDtOfSgntr(SepaUtil.createCalendar(sepaParams.getProperty(SepaUtil.insertIndex("manddateofsig", index))));
173
174 boolean amend = Boolean.valueOf(sepaParams.getProperty(SepaUtil.insertIndex("amendmandindic", index)));
175 drctDbtTxInf.getDrctDbtTx().getMndtRltdInf().setAmdmntInd(amend);
176 if (amend)
177 {
178 drctDbtTxInf.getDrctDbtTx().getMndtRltdInf().setAmdmntInfDtls(new AmendmentInformationDetailsSDD());
179 drctDbtTxInf.getDrctDbtTx().getMndtRltdInf().getAmdmntInfDtls().setOrgnlDbtrAcct(new CashAccountSEPAMandate());
180 drctDbtTxInf.getDrctDbtTx().getMndtRltdInf().getAmdmntInfDtls().getOrgnlDbtrAcct().setId(new AccountIdentificationSEPAMandate());
181 drctDbtTxInf.getDrctDbtTx().getMndtRltdInf().getAmdmntInfDtls().getOrgnlDbtrAcct().getId().setOthr(new GenericAccountIdentificationSEPA());
182 drctDbtTxInf.getDrctDbtTx().getMndtRltdInf().getAmdmntInfDtls().getOrgnlDbtrAcct().getId().getOthr().setId(RestrictedSMNDACode.SMNDA);
183 }
184
185 // Payment Information - Credit Transfer Transaction Information - Payment Identification
186 drctDbtTxInf.setPmtId(new PaymentIdentificationSEPA());
187 drctDbtTxInf.getPmtId().setEndToEndId(SepaUtil.getProperty(sepaParams, SepaUtil.insertIndex("endtoendid", index), AbstractSEPAGV.ENDTOEND_ID_NOTPROVIDED)); // sicherstellen,
188 // dass
189 // "NOTPROVIDED"
190 // eingetragen
191 // wird,
192 // wenn
193 // keine
194 // ID
195 // angegeben
196 // ist
197
198 // Payment Information - Credit Transfer Transaction Information - Creditor
199 drctDbtTxInf.setDbtr(new PartyIdentificationSEPA2());
200 drctDbtTxInf.getDbtr().setNm(sepaParams.getProperty(SepaUtil.insertIndex("dst.name", index)));
201
202 // Payment Information - Credit Transfer Transaction Information - Creditor Account
203 drctDbtTxInf.setDbtrAcct(new CashAccountSEPA2());
204 drctDbtTxInf.getDbtrAcct().setId(new AccountIdentificationSEPA());
205 drctDbtTxInf.getDbtrAcct().getId().setIBAN(sepaParams.getProperty(SepaUtil.insertIndex("dst.iban", index)));
206
207 // Payment Information - Credit Transfer Transaction Information - Creditor Agent
208 drctDbtTxInf.setDbtrAgt(new BranchAndFinancialInstitutionIdentificationSEPA3());
209 drctDbtTxInf.getDbtrAgt().setFinInstnId(new FinancialInstitutionIdentificationSEPA3());
210
211 String bic = sepaParams.getProperty(SepaUtil.insertIndex("dst.bic", index));
212 if (bic != null && bic.length() > 0)
213 {
214 drctDbtTxInf.getDbtrAgt().getFinInstnId().setBIC(bic);
215 } else
216 {
217 drctDbtTxInf.getDbtrAgt().getFinInstnId().setOthr(new OthrIdentification());
218 drctDbtTxInf.getDbtrAgt().getFinInstnId().getOthr().setId(OthrIdentificationCode.NOTPROVIDED);
219 }
220
221 // Payment Information - notwendig bei Sepa Lastschriften in Drittstaaten (CH, UK?)
222 String property = sepaParams.getProperty(SepaUtil.insertIndex("dst.addr.country", index));
223 if (property != null && property.length() > 0)
224 {
225 drctDbtTxInf.getDbtr().setPstlAdr(new PostalAddressSEPA());
226 // Country Code, zb DE, CH etc. [A-Z]{2,2}
227 drctDbtTxInf.getDbtr().getPstlAdr().setCtry(sepaParams.getProperty(SepaUtil.insertIndex("dst.addr.country", index)));
228 // max 2 Zeilen mit Text min 1, max 70 Zeichen
229 for (int i = 1; i <= 2; i++)
230 {
231 String addressLine = sepaParams.getProperty(SepaUtil.insertIndex("dst.addr.line" + i, index));
232 if (addressLine != null && addressLine.length() > 0)
121233 {
122 pmtInf.getCdtrAgt().getFinInstnId().setBIC(srcBic);
234 drctDbtTxInf.getDbtr().getPstlAdr().getAdrLine().add(addressLine);
123235 }
124 else
125 {
126 pmtInf.getCdtrAgt().getFinInstnId().setOthr(new OthrIdentification());
127 pmtInf.getCdtrAgt().getFinInstnId().getOthr().setId(OthrIdentificationCode.NOTPROVIDED);
128 }
129
130
131 //Payment Information - ChargeBearer
132 pmtInf.setChrgBr(ChargeBearerTypeSEPACode.SLEV);
133
134 pmtInf.setPmtTpInf(new PaymentTypeInformationSDD());
135 pmtInf.getPmtTpInf().setSvcLvl(new ServiceLevel());
136 pmtInf.getPmtTpInf().getSvcLvl().setCd("SEPA");
137 pmtInf.getPmtTpInf().setLclInstrm(new LocalInstrumentSEPA());
138 pmtInf.getPmtTpInf().getLclInstrm().setCd(sepaParams.getProperty("type"));
139 pmtInf.getPmtTpInf().setSeqTp(SequenceType1Code.fromValue(sepaParams.getProperty("sequencetype")));
140
141 //Payment Information - Credit Transfer Transaction Information
142 ArrayList<DirectDebitTransactionInformationSDD> drctDbtTxInfs = (ArrayList<DirectDebitTransactionInformationSDD>) pmtInf.getDrctDbtTxInf();
143 if (maxIndex != null)
144 {
145 for (int tnr = 0; tnr <= maxIndex; tnr++)
146 {
147 drctDbtTxInfs.add(createDirectDebitTransactionInformationSDD(sepaParams, tnr));
148 }
149 }
150 else
151 {
152 drctDbtTxInfs.add(createDirectDebitTransactionInformationSDD(sepaParams, null));
153 }
154
155 String batch = SepaUtil.getProperty(sepaParams,"batchbook",null);
156 if (batch != null)
157 pmtInf.setBtchBookg(batch.equals("1"));
158
159 ObjectFactory of = new ObjectFactory();
160 this.marshal(of.createDocument(doc), os, validate);
161 }
162
163 private DirectDebitTransactionInformationSDD createDirectDebitTransactionInformationSDD(Properties sepaParams, Integer index) throws Exception
164 {
165 DirectDebitTransactionInformationSDD drctDbtTxInf = new DirectDebitTransactionInformationSDD();
166 drctDbtTxInf.setDrctDbtTx(new DirectDebitTransactionSDD());
167 drctDbtTxInf.getDrctDbtTx().setCdtrSchmeId(new PartyIdentificationSEPA3());
168 drctDbtTxInf.getDrctDbtTx().getCdtrSchmeId().setId(new PartySEPA2());
169 drctDbtTxInf.getDrctDbtTx().getCdtrSchmeId().getId().setPrvtId(new PersonIdentificationSEPA2());
170 drctDbtTxInf.getDrctDbtTx().getCdtrSchmeId().getId().getPrvtId().setOthr(new RestrictedPersonIdentificationSEPA());
171 drctDbtTxInf.getDrctDbtTx().getCdtrSchmeId().getId().getPrvtId().getOthr().setId(sepaParams.getProperty(SepaUtil.insertIndex("creditorid", index)));
172 drctDbtTxInf.getDrctDbtTx().getCdtrSchmeId().getId().getPrvtId().getOthr().setSchmeNm(new RestrictedPersonIdentificationSchemeNameSEPA());
173 drctDbtTxInf.getDrctDbtTx().getCdtrSchmeId().getId().getPrvtId().getOthr().getSchmeNm().setPrtry(IdentificationSchemeNameSEPA.SEPA);
174
175 drctDbtTxInf.getDrctDbtTx().setMndtRltdInf(new MandateRelatedInformationSDD());
176 drctDbtTxInf.getDrctDbtTx().getMndtRltdInf().setMndtId(sepaParams.getProperty(SepaUtil.insertIndex("mandateid", index)));
177 drctDbtTxInf.getDrctDbtTx().getMndtRltdInf().setDtOfSgntr(SepaUtil.createCalendar(sepaParams.getProperty(SepaUtil.insertIndex("manddateofsig", index))));
178
179
180 boolean amend = Boolean.valueOf(sepaParams.getProperty(SepaUtil.insertIndex("amendmandindic", index)));
181 drctDbtTxInf.getDrctDbtTx().getMndtRltdInf().setAmdmntInd(amend);
182 if (amend)
183 {
184 drctDbtTxInf.getDrctDbtTx().getMndtRltdInf().setAmdmntInfDtls(new AmendmentInformationDetailsSDD());
185 drctDbtTxInf.getDrctDbtTx().getMndtRltdInf().getAmdmntInfDtls().setOrgnlDbtrAcct(new CashAccountSEPAMandate());
186 drctDbtTxInf.getDrctDbtTx().getMndtRltdInf().getAmdmntInfDtls().getOrgnlDbtrAcct().setId(new AccountIdentificationSEPAMandate());
187 drctDbtTxInf.getDrctDbtTx().getMndtRltdInf().getAmdmntInfDtls().getOrgnlDbtrAcct().getId().setOthr(new GenericAccountIdentificationSEPA());
188 drctDbtTxInf.getDrctDbtTx().getMndtRltdInf().getAmdmntInfDtls().getOrgnlDbtrAcct().getId().getOthr().setId(RestrictedSMNDACode.SMNDA);
189 }
190
191 //Payment Information - Credit Transfer Transaction Information - Payment Identification
192 drctDbtTxInf.setPmtId(new PaymentIdentificationSEPA());
193 drctDbtTxInf.getPmtId().setEndToEndId(SepaUtil.getProperty(sepaParams,SepaUtil.insertIndex("endtoendid", index),AbstractSEPAGV.ENDTOEND_ID_NOTPROVIDED)); // sicherstellen, dass "NOTPROVIDED" eingetragen wird, wenn keine ID angegeben ist
194
195
196 //Payment Information - Credit Transfer Transaction Information - Creditor
197 drctDbtTxInf.setDbtr(new PartyIdentificationSEPA2());
198 drctDbtTxInf.getDbtr().setNm(sepaParams.getProperty(SepaUtil.insertIndex("dst.name", index)));
199
200
201
202 //Payment Information - Credit Transfer Transaction Information - Creditor Account
203 drctDbtTxInf.setDbtrAcct(new CashAccountSEPA2());
204 drctDbtTxInf.getDbtrAcct().setId(new AccountIdentificationSEPA());
205 drctDbtTxInf.getDbtrAcct().getId().setIBAN(sepaParams.getProperty(SepaUtil.insertIndex("dst.iban", index)));
206
207 //Payment Information - Credit Transfer Transaction Information - Creditor Agent
208 drctDbtTxInf.setDbtrAgt(new BranchAndFinancialInstitutionIdentificationSEPA3());
209 drctDbtTxInf.getDbtrAgt().setFinInstnId(new FinancialInstitutionIdentificationSEPA3());
210
211 String bic = sepaParams.getProperty(SepaUtil.insertIndex("dst.bic", index));
212 if (bic != null && bic.length() > 0)
213 {
214 drctDbtTxInf.getDbtrAgt().getFinInstnId().setBIC(bic);
215 }
216 else
217 {
218 drctDbtTxInf.getDbtrAgt().getFinInstnId().setOthr(new OthrIdentification());
219 drctDbtTxInf.getDbtrAgt().getFinInstnId().getOthr().setId(OthrIdentificationCode.NOTPROVIDED);
220 }
221
222
223 //Payment Information - Credit Transfer Transaction Information - Amount
224 drctDbtTxInf.setInstdAmt(new ActiveOrHistoricCurrencyAndAmountSEPA());
225 drctDbtTxInf.getInstdAmt().setValue(new BigDecimal(sepaParams.getProperty(SepaUtil.insertIndex("btg.value", index))));
226
227 drctDbtTxInf.getInstdAmt().setCcy(ActiveOrHistoricCurrencyCodeEUR.EUR);
228
229 //Payment Information - Credit Transfer Transaction Information - Usage
230 String usage = sepaParams.getProperty(SepaUtil.insertIndex("usage", index));
231 if (usage != null && usage.length() > 0)
232 {
233 drctDbtTxInf.setRmtInf(new RemittanceInformationSEPA1Choice());
234 drctDbtTxInf.getRmtInf().setUstrd(usage);
235 }
236
237 String purposeCode = sepaParams.getProperty(SepaUtil.insertIndex("purposecode", index));
238 if (purposeCode != null && purposeCode.length() > 0)
239 {
240 PurposeSEPA p = new PurposeSEPA();
241 p.setCd(purposeCode);
242 drctDbtTxInf.setPurp(p);
243 }
244
245 return drctDbtTxInf;
246 }
236 }
237 }
238
239 // Payment Information - Credit Transfer Transaction Information - Amount
240 drctDbtTxInf.setInstdAmt(new ActiveOrHistoricCurrencyAndAmountSEPA());
241 drctDbtTxInf.getInstdAmt().setValue(new BigDecimal(sepaParams.getProperty(SepaUtil.insertIndex("btg.value", index))));
242
243 drctDbtTxInf.getInstdAmt().setCcy(ActiveOrHistoricCurrencyCodeEUR.EUR);
244
245 // Payment Information - Credit Transfer Transaction Information - Usage
246 String usage = sepaParams.getProperty(SepaUtil.insertIndex("usage", index));
247 if (usage != null && usage.length() > 0)
248 {
249 drctDbtTxInf.setRmtInf(new RemittanceInformationSEPA1Choice());
250 drctDbtTxInf.getRmtInf().setUstrd(usage);
251 }
252
253 String purposeCode = sepaParams.getProperty(SepaUtil.insertIndex("purposecode", index));
254 if (purposeCode != null && purposeCode.length() > 0)
255 {
256 PurposeSEPA p = new PurposeSEPA();
257 p.setCd(purposeCode);
258 drctDbtTxInf.setPurp(p);
259 }
260
261 return drctDbtTxInf;
262 }
247263
248264 }
4040 import org.kapott.hbci.sepa.jaxb.pain_008_002_01.PaymentMethod2Code;
4141 import org.kapott.hbci.sepa.jaxb.pain_008_002_01.PaymentTypeInformationSDD;
4242 import org.kapott.hbci.sepa.jaxb.pain_008_002_01.PersonIdentificationSDD2;
43 import org.kapott.hbci.sepa.jaxb.pain_008_002_01.PostalAddressSDD;
4344 import org.kapott.hbci.sepa.jaxb.pain_008_002_01.PurposeSDD;
4445 import org.kapott.hbci.sepa.jaxb.pain_008_002_01.RemittanceInformationSDDChoice;
4546 import org.kapott.hbci.sepa.jaxb.pain_008_002_01.RestrictedIdentificationSDD;
7980 //Customer Credit Transfer Initiation
8081 doc.setPain00800101(new Pain00800101());
8182 doc.getPain00800101().setGrpHdr(new GroupHeaderSDD());
82
83
8384 String batch = SepaUtil.getProperty(sepaParams,"batchbook",null);
8485 if (batch != null)
8586 doc.getPain00800101().getGrpHdr().setBtchBookg(batch.equals("1"));
130131 pmtInf.getPmtTpInf().setSvcLvl(new ServiceLevelSDD());
131132 pmtInf.getPmtTpInf().getSvcLvl().setCd(ServiceLevelSDDCode.SEPA);
132133 pmtInf.getPmtTpInf().setLclInstrm(new LocalInstrumentSDD());
133
134
134135 String type = sepaParams.getProperty("type");
135136 try
136137 {
140141 {
141142 throw new HBCI_Exception("Lastschrift-Art " + type + " wird in der SEPA-Version 008.002.01 Ihrer Bank noch nicht unterstützt",e);
142143 }
143
144
144145 //Payment Information - Credit Transfer Transaction Information
145146 ArrayList<DirectDebitTransactionInformationSDD> drctDbtTxInfs = (ArrayList<DirectDebitTransactionInformationSDD>) pmtInf.getDrctDbtTxInf();
146147 if (maxIndex != null)
209210 drctDbtTxInf.getDbtrAgt().setFinInstnId(new FinancialInstitutionIdentificationSDD1());
210211 drctDbtTxInf.getDbtrAgt().getFinInstnId().setBIC(sepaParams.getProperty(SepaUtil.insertIndex("dst.bic", index)));
211212
213 //Payment Information - notwendig bei Sepa Lastschriften in Drittstaaten (CH, UK?)
214 String property = sepaParams.getProperty(SepaUtil.insertIndex("dst.addr.country", index));
215 if (property != null && property.length() > 0) {
216 drctDbtTxInf.getDbtr().setPstlAdr(new PostalAddressSDD());
217 // Country Code, zb DE, CH etc. [A-Z]{2,2}
218 drctDbtTxInf.getDbtr().getPstlAdr().setCtry(sepaParams.getProperty(SepaUtil.insertIndex("dst.addr.country", index)));
219 // max 2 Zeilen mit Text min 1, max 70 Zeichen
220 for (int i = 1; i <= 2; i++) {
221 String addressLine = sepaParams.getProperty(SepaUtil.insertIndex("dst.addr.line" + i, index));
222 if (addressLine != null && addressLine.length() > 0) {
223 drctDbtTxInf.getDbtr().getPstlAdr().getAdrLine().add(addressLine);
224 }
225 }
226 }
212227
213228 //Payment Information - Credit Transfer Transaction Information - Amount
214229 drctDbtTxInf.setInstdAmt(new CurrencyAndAmountSDD());
223238 drctDbtTxInf.setRmtInf(new RemittanceInformationSDDChoice());
224239 drctDbtTxInf.getRmtInf().setUstrd(usage);
225240 }
226
241
227242 String purposeCode = sepaParams.getProperty(SepaUtil.insertIndex("purposecode", index));
228243 if (purposeCode != null && purposeCode.length() > 0)
229244 {
231246 p.setCd(purposeCode);
232247 drctDbtTxInf.setPurp(p);
233248 }
234
249
235250
236251 return drctDbtTxInf;
237252 }
3939 import org.kapott.hbci.sepa.jaxb.pain_008_002_02.PaymentMethod2Code;
4040 import org.kapott.hbci.sepa.jaxb.pain_008_002_02.PaymentTypeInformationSDD;
4141 import org.kapott.hbci.sepa.jaxb.pain_008_002_02.PersonIdentificationSEPA2;
42 import org.kapott.hbci.sepa.jaxb.pain_008_002_02.PostalAddressSEPA;
4243 import org.kapott.hbci.sepa.jaxb.pain_008_002_02.PurposeSEPA;
4344 import org.kapott.hbci.sepa.jaxb.pain_008_002_02.RemittanceInformationSEPA1Choice;
4445 import org.kapott.hbci.sepa.jaxb.pain_008_002_02.RestrictedFinancialIdentificationSEPA;
128129 pmtInf.getPmtTpInf().setSvcLvl(new ServiceLevelSEPA());
129130 pmtInf.getPmtTpInf().getSvcLvl().setCd(ServiceLevelSEPACode.SEPA);
130131 pmtInf.getPmtTpInf().setLclInstrm(new LocalInstrumentSEPA());
131
132
132133 String type = sepaParams.getProperty("type");
133134 try
134135 {
209210 drctDbtTxInf.getDbtrAgt().setFinInstnId(new FinancialInstitutionIdentificationSEPA1());
210211 drctDbtTxInf.getDbtrAgt().getFinInstnId().setBIC(sepaParams.getProperty(SepaUtil.insertIndex("dst.bic", index)));
211212
213 //Payment Information - notwendig bei Sepa Lastschriften in Drittstaaten (CH, UK?)
214 String property = sepaParams.getProperty(SepaUtil.insertIndex("dst.addr.country", index));
215 if (property != null && property.length() > 0) {
216 drctDbtTxInf.getDbtr().setPstlAdr(new PostalAddressSEPA());
217 // Country Code, zb DE, CH etc. [A-Z]{2,2}
218 drctDbtTxInf.getDbtr().getPstlAdr().setCtry(sepaParams.getProperty(SepaUtil.insertIndex("dst.addr.country", index)));
219 // max 2 Zeilen mit Text min 1, max 70 Zeichen
220 for (int i = 1; i <= 2; i++) {
221 String addressLine = sepaParams.getProperty(SepaUtil.insertIndex("dst.addr.line" + i, index));
222 if (addressLine != null && addressLine.length() > 0) {
223 drctDbtTxInf.getDbtr().getPstlAdr().getAdrLine().add(addressLine);
224 }
225 }
226 }
212227
213228 //Payment Information - Credit Transfer Transaction Information - Amount
214229 drctDbtTxInf.setInstdAmt(new ActiveOrHistoricCurrencyAndAmountSEPA());
3939 import org.kapott.hbci.sepa.jaxb.pain_008_003_02.PaymentMethod2Code;
4040 import org.kapott.hbci.sepa.jaxb.pain_008_003_02.PaymentTypeInformationSDD;
4141 import org.kapott.hbci.sepa.jaxb.pain_008_003_02.PersonIdentificationSEPA2;
42 import org.kapott.hbci.sepa.jaxb.pain_008_003_02.PostalAddressSEPA;
4243 import org.kapott.hbci.sepa.jaxb.pain_008_003_02.PurposeSEPA;
4344 import org.kapott.hbci.sepa.jaxb.pain_008_003_02.RemittanceInformationSEPA1Choice;
4445 import org.kapott.hbci.sepa.jaxb.pain_008_003_02.RestrictedFinancialIdentificationSEPA;
219220 drctDbtTxInf.getDbtrAgt().getFinInstnId().getOthr().setId(OthrIdentificationCode.NOTPROVIDED);
220221 }
221222
223 //Payment Information - notwendig bei Sepa Lastschriften in Drittstaaten (CH, UK?)
224 String property = sepaParams.getProperty(SepaUtil.insertIndex("dst.addr.country", index));
225 if (property != null && property.length() > 0) {
226 drctDbtTxInf.getDbtr().setPstlAdr(new PostalAddressSEPA());
227 // Country Code, zb DE, CH etc. [A-Z]{2,2}
228 drctDbtTxInf.getDbtr().getPstlAdr().setCtry(sepaParams.getProperty(SepaUtil.insertIndex("dst.addr.country", index)));
229 // max 2 Zeilen mit Text min 1, max 70 Zeichen
230 for (int i = 1; i <= 2; i++) {
231 String addressLine = sepaParams.getProperty(SepaUtil.insertIndex("dst.addr.line" + i, index));
232 if (addressLine != null && addressLine.length() > 0) {
233 drctDbtTxInf.getDbtr().getPstlAdr().getAdrLine().add(addressLine);
234 }
235 }
236 }
222237
223238 //Payment Information - Credit Transfer Transaction Information - Amount
224239 drctDbtTxInf.setInstdAmt(new ActiveOrHistoricCurrencyAndAmountSEPA());
169169 // ditto
170170 EntryTransaction2 tx = txList.get(0);
171171
172 // Ist es eine Rueckbuchung?
173 boolean rueckbuchung = tx.getRtrInf() != null && tx.getRtrInf().getRsn() != null && tx.getRtrInf().getRsn().getCd() != null && tx.getRtrInf().getRsn().getCd().length() > 0;
174 if (rueckbuchung) // Bei Rueckbuchung tauschen wir Creditor und Debitor
175 haben = !haben;
176
172177 ////////////////////////////////////////////////////////////////////////
173178 // Buchungs-ID
174179 TransactionReferences2 ref = tx.getRefs();
168168
169169 // ditto
170170 EntryTransaction3 tx = txList.get(0);
171
171
172 // Ist es eine Rueckbuchung?
173 boolean rueckbuchung = tx.getRtrInf() != null && tx.getRtrInf().getRsn() != null && tx.getRtrInf().getRsn().getCd() != null && tx.getRtrInf().getRsn().getCd().length() > 0;
174 if (rueckbuchung) // Bei Rueckbuchung tauschen wir Creditor und Debitor
175 haben = !haben;
176
172177 ////////////////////////////////////////////////////////////////////////
173178 // Buchungs-ID
174179 TransactionReferences3 ref = tx.getRefs();
168168
169169 // ditto
170170 EntryTransaction4 tx = txList.get(0);
171
171
172 // Ist es eine Rueckbuchung?
173 boolean rueckbuchung = tx.getRtrInf() != null && tx.getRtrInf().getRsn() != null && tx.getRtrInf().getRsn().getCd() != null && tx.getRtrInf().getRsn().getCd().length() > 0;
174 if (rueckbuchung) // Bei Rueckbuchung tauschen wir Creditor und Debitor
175 haben = !haben;
176
172177 ////////////////////////////////////////////////////////////////////////
173178 // Buchungs-ID
174179 TransactionReferences3 ref = tx.getRefs();
168168
169169 // ditto
170170 EntryTransaction7 tx = txList.get(0);
171
172 // Ist es eine Rueckbuchung?
173 boolean rueckbuchung = tx.getRtrInf() != null && tx.getRtrInf().getRsn() != null && tx.getRtrInf().getRsn().getCd() != null && tx.getRtrInf().getRsn().getCd().length() > 0;
174 if (rueckbuchung) // Bei Rueckbuchung tauschen wir Creditor und Debitor
175 haben = !haben;
171176
172177 ////////////////////////////////////////////////////////////////////////
173178 // Buchungs-ID
169169 // ditto
170170 EntryTransaction8 tx = txList.get(0);
171171
172 // Ist es eine Rueckbuchung?
173 boolean rueckbuchung = tx.getRtrInf() != null && tx.getRtrInf().getRsn() != null && tx.getRtrInf().getRsn().getCd() != null && tx.getRtrInf().getRsn().getCd().length() > 0;
174 if (rueckbuchung) // Bei Rueckbuchung tauschen wir Creditor und Debitor
175 haben = !haben;
176
172177 ////////////////////////////////////////////////////////////////////////
173178 // Buchungs-ID
174179 TransactionReferences3 ref = tx.getRefs();
168168
169169 // ditto
170170 EntryTransaction9 tx = txList.get(0);
171
172 // Ist es eine Rueckbuchung?
173 boolean rueckbuchung = tx.getRtrInf() != null && tx.getRtrInf().getRsn() != null && tx.getRtrInf().getRsn().getCd() != null && tx.getRtrInf().getRsn().getCd().length() > 0;
174 if (rueckbuchung) // Bei Rueckbuchung tauschen wir Creditor und Debitor
175 haben = !haben;
171176
172177 ////////////////////////////////////////////////////////////////////////
173178 // Buchungs-ID
5858 * dass dann nicht Matrix-Code ist.
5959 * Generell unterstuetzen wir nur server-seitig generierte Matrix-Codes.
6060 */
61 MS_1(Type.PHOTOTAN,"MS1.*",null,-1,"hhd14"),
61 MS_1(Type.PHOTOTAN,"MS1.*|photoTAN.*",null,-1,"hhd14"),
6262
6363 /**
6464 * HHD-Version 1.2.
7373 76010085=Postbank|Nürnberg, Mittelfr|PBNKDEFF760|24||https://hbci.postbank.de/banking/hbci.do|220|300|
7474 60069463=Raiffeisenbank Geislingen-Rosenfeld|Rosenfeld, Württ|GENODES1RKH|10|hbci01.fiducia.de|https://hbci11.fiducia.de/cgi-bin/hbciservlet|300|300|
7575 72250000=Sparkasse Nördlingen|Nördlingen|BYLADEM1NLG|00|i094.by.s-hbci.de|https://banking-by5.s-fints-pt-by.de/fints30|220|300|
76 83094495=EthikBank, Zndl der Volksbank Eisenberg|Eisenberg, Thür|GENODEF1ETK|32|||||
76 83094495=EthikBank, Zndl der Volksbank Eisenberg|Eisenberg, Thür|GENODEF1ETK|32||https://hbci-pintan.gad.de/cgi-bin/hbciservlet||300|
7777 20730023=UniCredit Bank - HVB Settlement EAC23|Hamburg|HYVEDEMME23|99|||||
7878 26251425=Sparkasse Einbeck|Einbeck|NOLADE21EIN|00|i071.s-fints-ni.de|https://banking-ni2.s-fints-pt-ni.de/fints30|220|300|
7979 74191000=VR-Bank Landau|Landau a.d.Isar|GENODEF1LND|88|hbci01.fiducia.de|https://hbci11.fiducia.de/cgi-bin/hbciservlet|300|300|
112112 31080015=Commerzbank vormals Dresdner Bank|Mönchengladbach|DRESDEFF310|76|hbci.dresdner-bank.de|https://hbci.dresdner-bank.de|300|300|
113113 62070081=Deutsche Bank|Heilbronn, Neckar|DEUTDESS620|63|193.150.167.7|https://fints.deutsche-bank.de/|300|300|
114114 20120600=Goyer & Göppel|Hamburg|GOGODEH1XXX|09|hbci01.fiducia.de|https://hbci11.fiducia.de/cgi-bin/hbciservlet|300|300|
115 33030000=GEFA|Wuppertal|GGABDE31XXX|06|||||
115 33030000=GEFA|Wuppertal|GGABDE31XXX|06||https://hbci11.fiducia.de/cgi-bin/hbciservlet||300|
116116 49061298=Volksbank Bad Oeynhausen -alt-|Bad Oeynhausen|GENODEM1UBO|34|||||
117117 30160213=Volksbank Düsseldorf Neuss|Düsseldorf|GENODED1DNE|06|hbci.gad.de|https://hbci-pintan.gad.de/cgi-bin/hbciservlet|300|300|
118118 60220030=Baden-Württembergische Bank|Waiblingen, Rems|SOLADEST602|65|||||
996996 61140071=Commerzbank|Esslingen am Neckar|COBADEFF611|13|hbci.commerzbank.de||300||
997997 20730019=UniCredit Bank - HVB Settlement EAC19|Hamburg|HYVEDEMME19|09|||||
998998 26040030=Commerzbank|Göttingen, Niedersachs|COBADEFF260|13|hbci.commerzbank.de||300||
999 70012600=Südtiroler Sparkasse Niederlassung München|München|SUSKDEM1XXX|06|||||
999 70012600=Südtiroler Sparkasse Niederlassung München|München|SUSKDEM1XXX|06||https://hbci11.fiducia.de/cgi-bin/hbciservlet||300|
10001000 76090500=Sparda-Bank Nürnberg|Nürnberg, Mittelfr|GENODEF1S06|81||https://fints.bankingonline.de/fints/FinTs30PinTanHttpGate||300|
10011001 34070093=Deutsche Bank|Remscheid|DEUTDEDW340|63|193.150.167.7|https://fints.deutsche-bank.de/|300|300|
10021002 25040061=Commerzbank CC|Hannover|COBADEFF077|09|||||
15661566 33070024=Deutsche Bank Privat und Geschäftskunden|Wuppertal|DEUTDEDBWUP|63|193.150.167.8|https://fints.deutsche-bank.de/|300|300|
15671567 59010042=ZVC Postbank Gf FK 42|Rhens|PBNKDEFF042|09|||||
15681568 37069429=Volksbank Köln-Nord|Köln|GENODED1KNL|06|||||
1569 70120600=Salzburg München Bank|München|AGBMDEMMXXX|30|||||
1569 70120600=Salzburg München Bank|München|AGBMDEMMXXX|30||https://hbci-pintan.gad.de/cgi-bin/hbciservlet||300|
15701570 72091800=Volksbank Günzburg|Günzburg|GENODEF1GZ1|10|hbci01.fiducia.de|https://hbci11.fiducia.de/cgi-bin/hbciservlet|300|300|
15711571 74391400=Rottaler Volksbank-Raiffeisenbank Eggenfelden|Eggenfelden|GENODEF1EGR|88|hbci01.fiducia.de|https://hbci11.fiducia.de/cgi-bin/hbciservlet|300|300|
15721572 70169459=Raiffeisenbank|Mittenwald|GENODEF1MTW|88|hbci01.fiducia.de|https://hbci11.fiducia.de/cgi-bin/hbciservlet|300|300|
19391939 51640043=Commerzbank|Dillenburg|COBADEFF516|13|hbci.commerzbank.de||300||
19401940 10220500=Bank of Scotland Ndl Berlin|Berlin|BOFSDEB1XXX|00|||||
19411941 45451060=Sparkasse Ennepetal-Breckerfeld|Ennepetal|WELADED1ENE|00|w036.s-hbci.de|https://banking-wl6.s-fints-pt-wl.de/fints30|220|300|
1942 57069806=VR-Bank Hunsrück-Mosel|Morbach, Hunsrück|GENODED1MBA|38|||||
1942 57069806=VR-Bank Hunsrück-Mosel|Morbach, Hunsrück|GENODED1MBA|38||https://hbci-pintan.gad.de/cgi-bin/hbciservlet||300|
19431943 75090000=Volksbank Regensburg|Regensburg|GENODEF1R01|88|hbci01.fiducia.de|https://hbci11.fiducia.de/cgi-bin/hbciservlet|300|300|
19441944 51250000=Taunus-Sparkasse|Bad Homburg v d Höhe|HELADEF1TSK|06|h022.s-hbci.de|https://banking-hs3.s-fints-pt-hs.de/fints30|220|300|
19451945 50210186=SEB TZN MB Frankfurt|Frankfurt am Main|ESSEDE5FXXX|09|||||
23572357 81063238=Volksbank Jerichower Land|Burg b Magdeburg|GENODEF1BRG|32|hbci.gad.de|https://hbci-pintan.gad.de/cgi-bin/hbciservlet|300|300|
23582358 73351635=Sparkasse Riezlern, Kleinwalsertal|Riezlern, Kleinwalsertal|BYLADEM1ALR|00|i073.by.s-hbci.de|https://banking-by5.s-fints-pt-by.de/fints30|220|300|
23592359 70169614=Freisinger Bank Volksbank-Raiffeisenbank|Freising, Oberbay|GENODEF1FSR|88|hbci01.fiducia.de|https://hbci11.fiducia.de/cgi-bin/hbciservlet|300|300|
2360 51230800=Wirecard Bank|Aschheim|WIREDEMMXXX|09|||||
2360 51230800=Wirecard Bank|Aschheim|WIREDEMMXXX|09||https://hbci-pintan.gad.de/cgi-bin/hbciservlet||300|
23612361 25491273=Volksbank Aerzen|Aerzen|GENODED1AEZ|28|hbci.gad.de|https://hbci-pintan.gad.de/cgi-bin/hbciservlet|300|300|
23622362 45000000=Bundesbank|Hagen, Westf|MARKDEF1450|09|||||
23632363 26060184=Bankhaus Hallbaum|Göttingen, Niedersachs|HALLDE2HGOE|C3|ebanking.bankhaus-hallbaum.de |https://ebanking.bankhaus-hallbaum.de/fints|300|300|
26292629 60069251=Raiffeisenbank Donau-Iller|Erbach, Donau|GENODES1RDI|10|hbci01.fiducia.de|https://hbci11.fiducia.de/cgi-bin/hbciservlet|300|300|
26302630 52270012=Deutsche Bank|Eschwege|DEUTDEFF522|63|193.150.167.7|https://fints.deutsche-bank.de/|300|300|
26312631 85050100=Sparkasse Oberlausitz-Niederschlesien|Zittau|WELADED1GRL|20|i046.s-fints-sn.de|https://banking-sn5.s-fints-pt-sn.de/fints30|220|300|
2632 72030227=Bankhaus Anton Hafner|Augsburg, Bay|ANHODE77XXX|00||https://fints.hafnerbank.de||300|
2632 72030227=Bankhaus Anton Hafner|Augsburg, Bay|ANHODE77XXX|00||https://hbci11.fiducia.de/cgi-bin/hbciservlet||300|
26332633 40351060=Kreissparkasse Steinfurt|Ibbenbüren|WELADED1STF|00|w002.s-hbci.de|https://banking-wl5.s-fints-pt-wl.de/fints30|220|300|
26342634 25250001=Kreissparkasse Peine|Peine|NOLADE21PEI|00|i121.s-fints-ni.de|https://banking-ni2.s-fints-pt-ni.de/fints30|220|300|
26352635 44070024=Deutsche Bank Privat und Geschäftskunden|Dortmund|DEUTDEDB440|63|193.150.167.8|https://fints.deutsche-bank.de/|300|300|
29422942 50050000=Landesbank Hessen-Thür Girozentrale|Frankfurt am Main|HELADEFFXXX|00|||||
29432943 50310400=Barclays Bank Frankfurt|Frankfurt am Main|BARCDEFFXXX|46|||||
29442944 25030000=UniCredit Bank - HypoVereinsbank (ex VereinWest)|Hannover|HYVEDEMM210|68|hbci.hypovereinsbank.de|https://hbci-01.hypovereinsbank.de/bank/hbci|300|300|
2945 70013500=Bankhaus Herzogpark|München|HERZDEM1XXX|06|||||
2945 70013500=Bankhaus Herzogpark|München|HERZDEM1XXX|06||https://hbci11.fiducia.de/cgi-bin/hbciservlet||300|
29462946 47267216=Volksbank Borgentreich -alt-|Borgentreich|GENODEM1BOT|34|||||
29472947 80000000=Bundesbank eh Halle|Magdeburg|MARKDEF1800|09|||||
29482948 50320191=UniCredit Bank - HypoVereinsbank|Frankfurt am Main|HYVEDEMM430|99|hbci.hypovereinsbank.de|https://hbci-01.hypovereinsbank.de/bank/hbci|300|300|
30383038 68020460=UniCredit Bank - HypoVereinsbank Ndl 405 Frb|Aschheim|HYVEDEM1082|99|hbci.hypovereinsbank.de|https://hbci-01.hypovereinsbank.de/bank/hbci|300|300|
30393039 36570024=Deutsche Bank Privat und Geschäftskunden|Oberhausen, Rheinl|DEUTDEDB365|63|193.150.167.8|https://fints.deutsche-bank.de/|300|300|
30403040 66010075=Postbank|Karlsruhe, Baden|PBNKDEFF660|24||https://hbci.postbank.de/banking/hbci.do|220|300|
3041 72012300=Bank für Tirol und Vorarlberg Deutschland|Memmingen|BTVADE61XXX|26|||||
3041 72012300=Bank für Tirol und Vorarlberg Deutschland|Memmingen|BTVADE61XXX|26||https://hbci-pintan.gad.de/cgi-bin/hbciservlet||300|
30423042 30080080=Commerzbank vormals Dresdner Bank, PCC DCC-ITGK 3|Düsseldorf|DRESDEFFI76|09|||||
30433043 16000000=Bundesbank eh Potsdam|Berlin|MARKDEF1160|09|||||
30443044 29200000=Bundesbank eh Bremerhaven|Bremen|MARKDEF1292|09|||||
30683068 51230805=Wirecard Bank|Aschheim| |09|||||
30693069 46262456=Volksbank Bigge-Lenne -alt-|Lennestadt|GENODEM1HUL|34|hbci.gad.de|https://hbci-pintan.gad.de/cgi-bin/hbciservlet|300|300|
30703070 85020030=ZV Landesbank Baden-Württemberg|Dresden|SOLADEST850|65|||||
3071 21520100=Union-Bank Flensburg|Flensburg|UNBNDE21XXX|06|||||
3071 21520100=Union-Bank Flensburg|Flensburg|UNBNDE21XXX|06||https://hbci-pintan.gad.de/cgi-bin/hbciservlet||300|
30723072 40069600=Volksbank Amelsbüren|Münster, Westf|GENODEM1MAB|34|hbci.gad.de|https://hbci-pintan.gad.de/cgi-bin/hbciservlet|300|300|
30733073 71151020=Sparkasse Altötting-Mühldorf|Mühldorf a. Inn|BYLADEM1MDF|00|i049.by.s-hbci.de|https://banking-by2.s-fints-pt-by.de/fints30|220|300|
30743074 44040060=Commerzbank CC|Dortmund|COBADEFF080|09|||||
32823282 77069746=Raiffeisenbank|Emtmannsberg|GENODEF1ETB|88|hbci01.fiducia.de|https://hbci11.fiducia.de/cgi-bin/hbciservlet|300|300|
32833283 31080061=Commerzbank vormals Dresdner Bank Zw 61|Mönchengladbach|DRESDEFFI34|76|||||
32843284 64150020=Kreissparkasse Tübingen|Tübingen|SOLADES1TUB|01|i008.bw.s-hbci.de|https://banking-bw5.s-fints-pt-bw.de/fints30|220|300|
3285 50020500=Landwirtschaftliche Rentenbank|Frankfurt am Main|LAREDEFFXXX|09|||||
3285 50020500=Landwirtschaftliche Rentenbank|Frankfurt am Main|LAREDEFFXXX|09||https://hbci11.fiducia.de/cgi-bin/hbciservlet||300|
32863286 68390000=Volksbank Dreiländereck|Lörrach|VOLODE66XXX|06|hbci01.fiducia.de|https://hbci11.fiducia.de/cgi-bin/hbciservlet|300|300|
32873287 55190000=Mainzer Volksbank|Mainz a Rhein|MVBMDE55XXX|00|hbci01.fiducia.de|https://hbci11.fiducia.de/cgi-bin/hbciservlet|300|300|
32883288 81093044=Volksbank Osterburg-Lüchow-Dannenberg -alt-|Osterburg (Altmark)|GENODEF1OBG|32|||||
34893489 68270033=Deutsche Bank|Lahr, Schwarzwald|DEUTDE6F682|63|193.150.167.7|https://fints.deutsche-bank.de/|300|300|
34903490 58560103=Volksbank Trier|Trier|GENODED1TVB|38|hbci.gad.de|https://hbci-pintan.gad.de/cgi-bin/hbciservlet|300|300|
34913491 50863906=Volksbank Modautal Modau|Ober-Ramstadt|GENODE51ORM|32|hbci01.fiducia.de|https://hbci11.fiducia.de/cgi-bin/hbciservlet|300|300|
3492 61030000=Bankhaus Gebr. Martin|Göppingen|MARBDE6GXXX|09|||||
3492 61030000=Bankhaus Gebr. Martin|Göppingen|MARBDE6GXXX|09||https://hbci11.fiducia.de/cgi-bin/hbciservlet||300|
34933493 50069477=Raiffeisenbank Kirtorf|Kirtorf|GENODE51KIF|32|hbci01.fiducia.de|https://hbci11.fiducia.de/cgi-bin/hbciservlet|300|300|
34943494 15061698=Raiffeisenbank Malchin|Malchin|GENODEF1MAL|32|hbci.gad.de|https://hbci-pintan.gad.de/cgi-bin/hbciservlet|300|300|
34953495 79330111=Bankhaus Max Flessa|Schweinfurt|FLESDEMMXXX|09|hbci01.fiducia.de|https://hbci11.fiducia.de/cgi-bin/hbciservlet|300|300|
36783678 47264367=Vereinigte Volksbank|Brakel, Westf|GENODEM1STM|34|hbci.gad.de|https://hbci-pintan.gad.de/cgi-bin/hbciservlet|300|300|
36793679 38060186=Volksbank Bonn Rhein-Sieg|Bonn|GENODED1BRS|06|hbci.gad.de|https://hbci-pintan.gad.de/cgi-bin/hbciservlet|300|300|
36803680 52063550=Raiffeisenbank|Wolfhagen|GENODEF1WOH|32|hbci01.fiducia.de|https://hbci11.fiducia.de/cgi-bin/hbciservlet|300|300|
3681 51410600=Merrill Lynch International Bank Limited Zndl Frankfurt|Frankfurt am Main|MELBDEF1XXX|09|||||
3681 51410600=Merrill Lynch International Bank Limited Zndl Frankfurt|Frankfurt am Main|BOFADEFFXXX|09|||||
36823682 54240032=Commerzbank|Pirmasens|COBADEFF542|13|hbci.commerzbank.de||300||
36833683 40164901=Volksbank Gescher|Gescher|GENODEM1GE1|34|hbci.gad.de|https://hbci-pintan.gad.de/cgi-bin/hbciservlet|300|300|
36843684 72069789=Raiffeisenbank Pfaffenhausen|Pfaffenhausen, Schwab|GENODEF1PFA|88|hbci01.fiducia.de|https://hbci11.fiducia.de/cgi-bin/hbciservlet|300|300|
81718171 <!-- Das TAN2StepRes6 steht hier mehrfach, weil die Banken das nicht einheitlich an der selben Stelle senden -->
81728172 <SEG type="RetGlob"/>
81738173 <SEG type="RetSeg" minnum="0" maxnum="0"/>
8174
8175 <!-- Degussa sendet unaufgefordert HITAB, obwohl wir gar kein HKTAB gesendet haben -->
8176 <SEG type="TANMediaListRes1" minnum="0" maxnum="1"/>
8177 <SEG type="TANMediaListRes2" minnum="0" maxnum="1"/>
8178 <SEG type="TANMediaListRes3" minnum="0" maxnum="1"/>
8179 <SEG type="TANMediaListRes4" minnum="0" maxnum="1"/>
8180 <SEG type="TANMediaListRes5" minnum="0" maxnum="1"/>
8181
81748182 <SEG type="TAN2StepRes6" minnum="0" maxnum="1"/>
81758183 <SF type="BPD" minnum="0"/>
81768184 <SF type="UPD" minnum="0"/>
82638271 <!-- Das TAN2StepRes6 steht hier mehrfach, weil die Banken das nicht einheitlich an der selben Stelle senden -->
82648272 <SEG type="RetGlob"/>
82658273 <SEG type="RetSeg" minnum="0" maxnum="0"/>
8274
8275 <!-- Degussa sendet unaufgefordert HITAB, obwohl wir gar kein HKTAB gesendet haben -->
8276 <SEG type="TANMediaListRes1" minnum="0" maxnum="1"/>
8277 <SEG type="TANMediaListRes2" minnum="0" maxnum="1"/>
8278 <SEG type="TANMediaListRes3" minnum="0" maxnum="1"/>
8279 <SEG type="TANMediaListRes4" minnum="0" maxnum="1"/>
8280 <SEG type="TANMediaListRes5" minnum="0" maxnum="1"/>
8281
82668282 <SEG type="TAN2StepRes6" minnum="0" maxnum="1"/>
82678283 <SF type="BPD" minnum="0"/>
82688284 <SF type="UPD" minnum="0"/>
9090 Assert.assertEquals("Matrix-Code-Verfahren nicht erkannt", HHDVersion.MS_1, version);
9191 }
9292
93
94 /**
95 * @throws Exception
96 */
97 @Test
98 public void test006() throws Exception
99 {
100 // Testet die Erkennung des Matrix-Code-Verfahrens aus dem Secmech.
101 Properties props = new Properties();
102 props.put("id", "photoTAN");
103 props.put("name", "photoTAN QRcode");
104 props.put("segversion", "6");
105
106 HHDVersion version = HHDVersion.find(props);
107 Assert.assertEquals("Matrix-Code-Verfahren nicht erkannt", HHDVersion.MS_1, version);
108 }
109
93110 }
241241 is2.close();
242242 }
243243 }
244
245 /**
246 * Testet das Lesen einer Ruecklastschrift.
247 * @throws Exception
248 */
249 @Test
250 public void test005() throws Exception
251 {
252 final String file = "test-camt-ruecklastschrift.xml";
253 InputStream is1 = null;
254 InputStream is2 = null;
255 try
256 {
257 is1 = this.getStream(file);
258 SepaVersion version = SepaVersion.autodetect(is1);
259 ISEPAParser<List<BTag>> parser = SEPAParserFactory.get(version);
260
261 is2 = this.getStream(file);
262 GVRKUms ums = new GVRKUms();
263 parser.parse(is2, ums.getDataPerDay());
264
265 List<BTag> days = ums.getDataPerDay();
266 Assert.assertEquals("Anzahl Buchungstage falsch", 1, days.size());
267
268 BTag day = days.get(0);
269 List<UmsLine> lines = day.lines;
270
271
272 {
273 UmsLine l = lines.get(0);
274 Assert.assertEquals("Gegenkonto IBAN falsch","DES1234567890",l.other.iban);
275 Assert.assertEquals("Gegenkonto BIC falsch","TESTS1234",l.other.bic);
276 Assert.assertEquals("Gegenkonto Name falsch","Sven Schuldner",l.other.name);
277 }
278 }
279 finally
280 {
281 if (is1 != null)
282 is1.close();
283 if (is2 != null)
284 is2.close();
285 }
286 }
287
244288 }
0 <?xml version="1.0" encoding="UTF-8"?>
1 <Document
2 xmlns="urn:iso:std:iso:20022:tech:xsd:camt.052.001.02"
3 xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
4 xsi:schemaLocation="urn:iso:std:iso:20022:tech:xsd:camt.052.001.02 camt.052.001.02.xsd">
5 <BkToCstmrAcctRpt>
6 <GrpHdr>
7 <MsgId>camt52_20210326134456__ONLINEBA</MsgId>
8 <CreDtTm>2021-03-26T13:44:56+01:00</CreDtTm>
9 <MsgPgntn>
10 <PgNb>1</PgNb>
11 <LastPgInd>true</LastPgInd>
12 </MsgPgntn>
13 </GrpHdr>
14 <Rpt>
15 <Id>camt052_ONLINEBA</Id>
16 <ElctrncSeqNb>00000</ElctrncSeqNb>
17 <CreDtTm>2021-03-26T13:44:56+01:00</CreDtTm>
18 <Acct>
19 <Id>
20 <IBAN>DE1234567890</IBAN>
21 </Id>
22 <Ccy>EUR</Ccy>
23 <Svcr>
24 <FinInstnId>
25 <BIC>TEST12345</BIC>
26 <Nm>Testbank</Nm>
27 <Othr>
28 <Id>DE12345</Id>
29 <Issr>UmsStId</Issr>
30 </Othr>
31 </FinInstnId>
32 </Svcr>
33 </Acct>
34 <Bal>
35 <Tp>
36 <CdOrPrtry>
37 <Cd>PRCD</Cd>
38 </CdOrPrtry>
39 </Tp>
40 <Amt Ccy="EUR">100.00</Amt>
41 <CdtDbtInd>CRDT</CdtDbtInd>
42 <Dt>
43 <Dt>2021-03-25</Dt>
44 </Dt>
45 </Bal>
46 <Bal>
47 <Tp>
48 <CdOrPrtry>
49 <Cd>CLBD</Cd>
50 </CdOrPrtry>
51 </Tp>
52 <Amt Ccy="EUR">100.00</Amt>
53 <CdtDbtInd>CRDT</CdtDbtInd>
54 <Dt>
55 <Dt>2021-03-26</Dt>
56 </Dt>
57 </Bal>
58 <Ntry>
59 <Amt Ccy="EUR">53.00</Amt>
60 <CdtDbtInd>DBIT</CdtDbtInd>
61 <Sts>BOOK</Sts>
62 <BookgDt>
63 <Dt>2021-03-26</Dt>
64 </BookgDt>
65 <ValDt>
66 <Dt>2021-03-26</Dt>
67 </ValDt>
68 <AcctSvcrRef>NONREF</AcctSvcrRef>
69 <BkTxCd />
70 <NtryDtls>
71 <TxDtls>
72 <Refs>
73 <MndtId>TEST1234</MndtId>
74 <Prtry>
75 <Tp>FIUMSATZ-ID</Tp>
76 <Ref>2021-03-26-09-12345</Ref>
77 </Prtry>
78 </Refs>
79 <AmtDtls>
80 <InstdAmt>
81 <Amt Ccy="EUR">50.00</Amt>
82 </InstdAmt>
83 </AmtDtls>
84 <BkTxCd>
85 <Prtry>
86 <Cd></Cd>
87 <Issr>DK</Issr>
88 </Prtry>
89 </BkTxCd>
90 <Chrgs>
91 <Amt Ccy="EUR">3.00</Amt>
92 <Pty>
93 <FinInstnId>
94 <BIC>TEST1234</BIC>
95 </FinInstnId>
96 </Pty>
97 </Chrgs>
98 <Chrgs>
99 <Amt Ccy="EUR">0.00</Amt>
100 <Pty>
101 <FinInstnId>
102 <BIC>TEST1234</BIC>
103 </FinInstnId>
104 </Pty>
105 </Chrgs>
106 <RltdPties>
107 <Dbtr>
108 <Nm>Sven Schuldner</Nm>
109 </Dbtr>
110 <DbtrAcct>
111 <Id>
112 <IBAN>DES1234567890</IBAN>
113 </Id>
114 </DbtrAcct>
115 <Cdtr>
116 <Nm>Erwin Einzieher</Nm>
117 <Id>
118 <PrvtId>
119 <Othr>
120 <Id>DEE1234567890</Id>
121 </Othr>
122 </PrvtId>
123 </Id>
124 </Cdtr>
125 <CdtrAcct>
126 <Id>
127 <IBAN>DEE1234567890</IBAN>
128 </Id>
129 </CdtrAcct>
130 <UltmtCdtr>
131 <Nm>Erwin Einzieher</Nm>
132 </UltmtCdtr>
133 </RltdPties>
134 <RltdAgts>
135 <DbtrAgt>
136 <FinInstnId>
137 <BIC>TESTS1234</BIC>
138 </FinInstnId>
139 </DbtrAgt>
140 <CdtrAgt>
141 <FinInstnId>
142 <BIC>TESTE1234</BIC>
143 </FinInstnId>
144 </CdtrAgt>
145 </RltdAgts>
146 <RmtInf>
147 <Ustrd>RUECKLASTSCHRIFT Sonstige Gruende</Ustrd>
148 </RmtInf>
149 <RtrInf>
150 <Orgtr>
151 <Id>
152 <OrgId>
153 <BICOrBEI>TEST1234</BICOrBEI>
154 </OrgId>
155 </Id>
156 </Orgtr>
157 <Rsn>
158 <Cd>MS03</Cd>
159 </Rsn>
160 <AddtlInf>RUECKLASTSCHRIFT Sonstige Gruende</AddtlInf>
161 </RtrInf>
162 </TxDtls>
163 </NtryDtls>
164 <AddtlNtryInf>LS RUECKBELASTUNG</AddtlNtryInf>
165 </Ntry>
166 </Rpt>
167 </BkToCstmrAcctRpt>
168 </Document>