1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72
|
.. _transfers:
Sending SEPA transfers
======================
Simple mode
-----------
You can create a simple SEPA transfer using this convenient client method:
.. autoclass:: fints.client.FinTS3Client
:members: simple_sepa_transfer
:noindex:
You should then enter a TAN, read our chapter :ref:`tans` to find out more.
Advanced mode
-------------
If you want to use advanced methods, you can supply your own SEPA XML:
.. autoclass:: fints.client.FinTS3Client
:members: sepa_transfer
:noindex:
Full example
------------
.. code-block:: python
client = FinTS3PinTanClient(...)
minimal_interactive_cli_bootstrap(client)
with client:
if client.init_tan_response:
print("A TAN is required", client.init_tan_response.challenge)
if getattr(client.init_tan_response, 'challenge_hhduc', None):
try:
terminal_flicker_unix(client.init_tan_response.challenge_hhduc)
except KeyboardInterrupt:
pass
tan = input('Please enter TAN:')
client.send_tan(client.init_tan_response, tan)
res = client.simple_sepa_transfer(
account=accounts[0],
iban='DE12345',
bic='BIC12345',
amount=Decimal('7.00'),
recipient_name='Foo',
account_name='Test',
reason='Birthday gift',
endtoend_id='NOTPROVIDED',
)
if isinstance(res, NeedTANResponse):
print("A TAN is required", res.challenge)
if getattr(res, 'challenge_hhduc', None):
try:
terminal_flicker_unix(res.challenge_hhduc)
except KeyboardInterrupt:
pass
tan = input('Please enter TAN:')
res = client.send_tan(res, tan)
print(res.status)
print(res.responses)
|