Skip to content

Add pain message version 001.001.09 to simple instant payment method #189

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

Open
wants to merge 2 commits into
base: master
Choose a base branch
from
Open
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
13 changes: 10 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,24 @@ 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.003.03',
'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
Loading