Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
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
12 changes: 9 additions & 3 deletions fints/client.py
Original file line number Diff line number Diff line change
Expand Up @@ -811,7 +811,7 @@ def simple_sepa_transfer(self, account: SEPAAccount, iban: str, bic: str,

:param account: SEPAAccount to start the transfer from.
:param iban: Recipient's IBAN
:param bic: Recipient's BIC
:param bic: Recipient's BIC (Can be None if domestic)
:param recipient_name: Recipient name
:param amount: Amount as a ``Decimal``
:param account_name: Sender account name
Expand All @@ -827,17 +827,23 @@ def simple_sepa_transfer(self, account: SEPAAccount, iban: str, bic: str,
"batch": False,
"currency": "EUR",
}
version = self._find_supported_sepa_version(['pain.001.001.03', 'pain.001.003.03'])

version = self._find_supported_sepa_version([
'pain.001.001.09',
'pain.001.001.03'
])

sepa = SepaTransfer(config, version)
payment = {
"name": recipient_name,
"IBAN": iban,
"BIC": bic,
"amount": round(Decimal(amount) * 100), # in cents
"execution_date": datetime.date(1999, 1, 1),
"description": reason,
"endtoend_id": endtoend_id,
}
if bic:
payment["BIC"] = bic
sepa.add_payment(payment)
xml = sepa.export().decode()
return self.sepa_transfer(account, xml, pain_descriptor="urn:iso:std:iso:20022:tech:xsd:"+version, instant_payment=instant_payment)
Expand Down
2 changes: 1 addition & 1 deletion pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ dependencies = [
"bleach",
"mt-940",
"requests",
"sepaxml~=2.1",
"sepaxml~=2.7",
"enum-tools~=0.12.0",
]
dynamic = ["version"]
Expand Down
2 changes: 1 addition & 1 deletion requirements.txt
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
requests
mt-940
sepaxml==2.1.*
sepaxml==2.7.*
enum-tools~=0.12.0
bleach