diff --git a/Samples/directDebit_Sephpa.php b/Samples/directDebit_Sephpa.php index a3c076de..5113dafc 100644 --- a/Samples/directDebit_Sephpa.php +++ b/Samples/directDebit_Sephpa.php @@ -49,3 +49,6 @@ if ($sendSEPADirectDebit->needsTan()) { handleStrongAuthentication($sendSEPADirectDebit); // See login.php for the implementation. } + +// Debit requests don't produce any result we could receive through a getter, but we still need to make sure it's done. +$sendSEPADirectDebit->ensureDone(); diff --git a/Samples/directDebit_phpSepaXml.php b/Samples/directDebit_phpSepaXml.php index 2748592d..ac6c1e49 100644 --- a/Samples/directDebit_phpSepaXml.php +++ b/Samples/directDebit_phpSepaXml.php @@ -65,3 +65,6 @@ if ($sendSEPADirectDebit->needsTan()) { handleStrongAuthentication($sendSEPADirectDebit); // See login.php for the implementation. } + +// Debit requests don't produce any result we could receive through a getter, but we still need to make sure it's done. +$sendSEPADirectDebit->ensureDone(); diff --git a/Samples/transfer.php b/Samples/transfer.php index 083d8e61..99d5d5af 100644 --- a/Samples/transfer.php +++ b/Samples/transfer.php @@ -21,6 +21,15 @@ /** @var \Fhp\FinTs $fints */ $fints = require_once 'login.php'; +// Just pick the first account, for demonstration purposes. You could also have the user choose, or have SEPAAccount +// hard-coded and not call getSEPAAccounts() at all. +$getSepaAccounts = \Fhp\Action\GetSEPAAccounts::create(); +$fints->execute($getSepaAccounts); +if ($getSepaAccounts->needsTan()) { + handleStrongAuthentication($getSepaAccounts); // See login.php for the implementation. +} +$oneAccount = $getSepaAccounts->getAccounts()[0]; + $dt = new \DateTime(); $dt->add(new \DateInterval('P1D')); @@ -52,3 +61,6 @@ if ($sendSEPATransfer->needsTan()) { handleStrongAuthentication($sendSEPATransfer); // See login.php for the implementation. } + +// SEPA transfers don't produce any result we could receive through a getter, but we still need to make sure it's done. +$sendSEPATransfer->ensureDone();