Skip to content

Commit 26f9249

Browse files
committed
WIP: Add VoP segments
1 parent c272ae1 commit 26f9249

3 files changed

Lines changed: 77 additions & 2 deletions

File tree

fints/client.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -793,6 +793,7 @@ def _find_supported_sepa_version(self, candidate_versions):
793793
return candidate_versions[0]
794794

795795
bank_supported = list(hispas.parameter.supported_sepa_formats)
796+
print(hispas)
796797

797798
for candidate in candidate_versions:
798799
if "urn:iso:std:iso:20022:tech:xsd:{}".format(candidate) in bank_supported:
@@ -827,7 +828,7 @@ def simple_sepa_transfer(self, account: SEPAAccount, iban: str, bic: str,
827828
"batch": False,
828829
"currency": "EUR",
829830
}
830-
version = self._find_supported_sepa_version(['pain.001.001.03', 'pain.001.003.03'])
831+
version = self._find_supported_sepa_version(['pain.001.001.03'])
831832
sepa = SepaTransfer(config, version)
832833
payment = {
833834
"name": recipient_name,

fints/fields.py

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -291,6 +291,19 @@ def _render_value(self, value):
291291
return super()._render_value(val)
292292

293293

294+
# FIXME: stub
295+
class TimestampField(DataElementField):
296+
type = 'tsp'
297+
_DOC_TYPE = bytes
298+
299+
def _render_value(self, value):
300+
retval = bytes(value)
301+
self._check_value_length(retval)
302+
303+
return retval
304+
305+
def _parse_value(self, value): return bytes(value)
306+
294307
class PasswordField(AlphanumericField):
295308
type = ''
296309
_DOC_TYPE = Password

fints/segments/auth.py

Lines changed: 62 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -97,6 +97,68 @@ class HKTAN6(FinTS3Segment):
9797
response_hhd_uc = DataElementGroupField(type=ResponseHHDUC, required=False, _d="Antwort HHD_UC")
9898

9999

100+
class PSRD1(DataElementGroup):
101+
"""Unterstütze Payment Status Reports
102+
103+
Source: FinTS Financial Transaction Services, Schnittstellenspezifikation, Messages -- Multibankfähige Geschäftsvorfälle, version 3.0 Rel 2022, FV """
104+
psrd = DataElementField(type='an', max_length=256, required=True, _d="Payment Status Report Descriptor", max_count=99)
105+
# urn:iso:std:iso:20022:tech:xsd:pain.002.001.14
106+
107+
class HKVPP(FinTS3Segment):
108+
"""Namensabgleich Prüfauftrag, version 1
109+
Source: FinTS Financial Transaction Services, Schnittstellenspezifikation, Verification of Payee"""
110+
supported_reports = DataElementField(type=PSRD1, required=True, _d="Unterstützte Payment Status Reports")
111+
polling_id = DataElementField(type='bin', required=False, _d="Polling-ID")
112+
max_queries = DataElementField(type='num', max_length=4, required=False, _d="Maximale Anzahl Einträge")
113+
aufsetzpunkt = DataElementField(type='an', max_length=35, required=False, _d="Aufsetzpunkt")
114+
115+
116+
class EVPE(DataElementGroup):
117+
"""Ergebnis VOP-Prüfung Einzeltransaktion
118+
119+
Source: FinTS Financial Transaction Services, Schnittstellenspezifikation, Verification of Payee"""
120+
recipient_IBAN = DataElementField(type='an', max_length=34, required=False, _d="IBAN Empfänger")
121+
info_IBAN = DataElementField(type='an', max_length=140, required=False, _d="IBAN-Zusatzinformationen")
122+
close_match_name = DataElementField(type='an', max_length=140, required=False, _d="Abweichender Empfängername")
123+
other_identification = DataElementField(type='an', max_length=256, required=False, _d="Anderes Identifikationmerkmal")
124+
# RVMC, RCVC, RVNM, RVNA, PDNG
125+
result = DataElementField(type='code', length=4, required=False, _d="VOP-Prüfergebnis")
126+
na_reason = DataElementField(type='an', max_length=256, required=False, _d="Grund RVNA")
127+
128+
129+
class HIVPP(FinTS3Segment):
130+
"""Namensabgleich Namensabgleich Prüfergebnis, version 1
131+
Source: FinTS Financial Transaction Services, Schnittstellenspezifikation, Verification of Payee"""
132+
vop_id = DataElementField(type='bin', required=False, _d="VOP-ID")
133+
vop_id_valid_until = DataElementField(type='tsp', required=False, _d="VOP-ID gültig bis")
134+
polling_id = DataElementField(type='bin', required=False, _d="Polling-ID")
135+
payment_status_report_descriptor = DataElementField(type='an', max_length=256, required=False, _d="Payment Status Report Descriptor")
136+
payment_status_report = DataElementField(type='bin', required=False, _d="Payment Status Report")
137+
# Only for a single transaction. Mutually exclusive with payment status report.
138+
vop_single_result = DataElementField(type=EVPE, required=False, _d="Ergebnis VOP-Prüfung Einzeltransaktion")
139+
manual_authorization_notice = DataElementField(type='an', max_length=65535, required=False, _d="Aufklärungstext Autorisierung trotz Abweichung")
140+
wait_for_seconds = DataElementField(type='num', length=1, required=False, _d="Wartezeit vor nächster Abfrage")
141+
142+
class ParameterVoP(DataElementGroup):
143+
max_trans = DataElementField(type='num', max_length=7, required=False, _d="Maximale Anzahl CreditTransferTransactionInformation OptIn")
144+
notice_is_structured = DataElementField(type='jn', required=False, _d="Aufklärungstext strukturiert")
145+
# complete: V, piecemeal: S
146+
report_complete = DataElementField(type='code', length=1, required=False, _d="Art der Lieferung Payment Status Report")
147+
batch_payment-allowed = DataElementField(type='jn', required=False, _d="Sammelzahlungen mit einem Auftrag erlaubt")
148+
multiple_allowed = DataElementField(type='jn', required=False, _d="Eingabe Anzahl Einträge erlaubt")
149+
supported_report_formats = DataElementField(type='an', max_length=1024, required=False, _d="Unterstützte Payment Status Report Daten-formate")
150+
# FIXME: count is "n"
151+
payment_order_segment = DataElementField(type='an', max_length=6, required=False, _d="VOP-pflichtiger Zahlungsverkehrsauftrag")
152+
153+
154+
class HIVPPS(ParameterSegment):
155+
"""Namensabgleich Prüfauftrag Parameter, version 1
156+
157+
Source: FinTS Financial Transaction Services, Schnittstellenspezifikation, Verification of Payee"""
158+
parameter = DataElementGroupField(type=ParameterVoP, _d="Parameter Namensabgleich Prüfauftrag")
159+
160+
161+
100162
class HKTAN7(FinTS3Segment):
101163
"""Zwei-Schritt-TAN-Einreichung, version 7
102164
@@ -114,7 +176,6 @@ class HKTAN7(FinTS3Segment):
114176
tan_medium_name = DataElementField(type='an', max_length=32, required=False, _d="Bezeichnung des TAN-Mediums")
115177
response_hhd_uc = DataElementGroupField(type=ResponseHHDUC, required=False, _d="Antwort HHD_UC")
116178

117-
118179
class HITAN2(FinTS3Segment):
119180
"""Zwei-Schritt-TAN-Einreichung Rückmeldung, version 2
120181

0 commit comments

Comments
 (0)