]> git.ipfire.org Git - thirdparty/python-fints.git/commitdiff
Use code examples in docs that might actually work
authorRaphael Michel <mail@raphaelmichel.de>
Fri, 7 Dec 2018 16:00:40 +0000 (17:00 +0100)
committerRaphael Michel <mail@raphaelmichel.de>
Fri, 7 Dec 2018 16:00:40 +0000 (17:00 +0100)
docs/debits.rst
docs/tans.rst
docs/tested.rst
docs/transfers.rst

index d9eec205c0ca9c230dc65b65fd07781795a728ef..73bc44e88e66a4ef6816010538479655e1051311 100644 (file)
@@ -53,25 +53,26 @@ You can easily generate XML using the ``sepaxml`` python library:
 
         client.set_tan_medium(media[0])
 
-    res = client.sepa_debit(
-        account=accounts[0],
-        data=pain_message,
-        multiple=False,
-        control_sum=Decimal('1.00'),
-        pain_descriptor='urn:iso:std:iso:20022:tech:xsd:pain.008.002.02'
-    )
-
-    if isinstance(res, NeedTANResponse):
-        print(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)
+    with client:
+        res = client.sepa_debit(
+            account=accounts[0],
+            data=pain_message,
+            multiple=False,
+            control_sum=Decimal('1.00'),
+            pain_descriptor='urn:iso:std:iso:20022:tech:xsd:pain.008.002.02'
+        )
+
+        if isinstance(res, NeedTANResponse):
+            print(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)
index fa5990cb835e01d1422b20c7aa8dfc779e37c6c0..e8e8dcf5719f75c0a933bd10dd8ee10850b5d86f 100644 (file)
@@ -21,7 +21,7 @@ The returned dictionary maps identifiers (generally: three-digit numerals) to in
 :func:`~fints.formals.TwoStepParametersCommon` subclass with varying fields, depending on the
 version of the two-step process and the bank.
 
-The `name` field of theese objects provides a user-friendly name of the TAN mechanism that you
+The `name` field of these objects provides a user-friendly name of the TAN mechanism that you
 can display to the user to choose from. To select a TAN mechanism, you can use
 :func:`~fints.client.FinTS3PinTanClient.set_tan_mechanism`, which takes the identifier used as
 key in the :func:`~fints.client.FinTS3PinTanClient.get_tan_mechanisms` return value.
@@ -112,6 +112,9 @@ You SHOULD use this facility together with the client and dialog state restorati
    :caption: First step
 
     client = FinTS3PinTanClient(...)
+    # Optionally: choose a tan mechanism with
+    # client.set_tan_mechanism(…)
+
     with client:
         response = client.sepa_transfer(...)
     
index ea4ea6fa00cb7d729a749461b8bbf56506397769..215ff9f55a3dccff17dbb022f2ff2013e3b82918 100644 (file)
@@ -1,7 +1,34 @@
 Tested banks
 ============
 
-The following libraries have been tested with this library:
+The following banks have been tested with version 2.x of this library:
+
+======================================== ============ ======== ======== ======
+Bank                                     Transactions Holdings Transfer Debits
+                                         and Balance
+======================================== ============ ======== ======== ======
+GLS Bank eG                              Yes                   Yes      Yes
+Postbank                                 Yes
+Triodos Bank                             Yes                   Yes
+Volksbank Darmstadt-Südhessen            Yes                   Yes
+Deutsche Skatbank                        Yes                   Yes
+BBBank eG                                Yes                   Yes
+MLP Banking AG                           Yes
+======================================== ============ ======== ======== ======
+
+Tested security functions
+-------------------------
+
+* ``942`` "mobile TAN"
+* ``962`` "Smart-TAN plus manuell"
+* ``972`` "Smart-TAN plus optisch"
+
+
+
+Legacy results
+---------------
+
+The following banks have been tested with the old version 1.x of this library:
 
 ======================================== ============  ======== ======== ======
 Bank                                     Statements    Holdings Transfer Debits
index 4e56dfce39def69df7db148caf018273d11deb3e..9e0447b8738b0fb851a6ab7a1f08110f03a83b81 100644 (file)
@@ -1,3 +1,5 @@
+.. _transfers:
+
 Sending SEPA transfers
 ======================
 
@@ -38,29 +40,30 @@ Full example
 
         client.set_tan_medium(media[0])
 
-    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(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)
+    with client:
+        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(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)