From 7ad259c6b73e0774ec35e2c5bb2323bd7cdc05a5 Mon Sep 17 00:00:00 2001 From: Norbert Huemmer Date: Sun, 20 Oct 2024 22:08:01 +0200 Subject: [PATCH] 1) The used nemiah\phpSepaXml library was changed. This fix attempts to correct the example accordingly Type was move from the SEPADirectDebitBasic to the addDebitor defintion 2) Type was changed from COR1 to CORE 3) The default pain format is no longer valid and hence the call to toXML the current format pain.008.001.02 was added modified: Samples/directDebit_phpSepaXml.php --- Samples/directDebit_phpSepaXml.php | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Samples/directDebit_phpSepaXml.php b/Samples/directDebit_phpSepaXml.php index af05b413..2748592d 100644 --- a/Samples/directDebit_phpSepaXml.php +++ b/Samples/directDebit_phpSepaXml.php @@ -26,8 +26,7 @@ $sepaDD = new SEPADirectDebitBasic([ 'messageID' => time(), - 'paymentID' => time(), - 'type' => 'COR1', + 'paymentID' => time() ]); $sepaDD->setCreditor(new SEPACreditor([ //this is you @@ -49,6 +48,7 @@ 'info' => 'R20170100 vom 09.05.2017', 'requestedCollectionDate' => $dt, 'sequenceType' => 'OOFF', + 'type' => 'CORE', ])); // Just pick the first account, for demonstration purposes. You could also have the user choose, or have SEPAAccount @@ -60,7 +60,7 @@ } $oneAccount = $getSepaAccounts->getAccounts()[0]; -$sendSEPADirectDebit = \Fhp\Action\SendSEPADirectDebit::create($oneAccount, $sepaDD->toXML()); +$sendSEPADirectDebit = \Fhp\Action\SendSEPADirectDebit::create($oneAccount, $sepaDD->toXML('pain.008.001.02')); $fints->execute($sendSEPADirectDebit); if ($sendSEPADirectDebit->needsTan()) { handleStrongAuthentication($sendSEPADirectDebit); // See login.php for the implementation.