Skip to content

Commit

Permalink
Merge pull request #460 from Cugar15/sepaDirecDepitExample
Browse files Browse the repository at this point in the history
Example for SEPADirectDebitBasic.php is broken because of changed nemiah\phpSepaXml library
  • Loading branch information
nemiah authored Jan 3, 2025
2 parents 51b5975 + 7ad259c commit 53903dd
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions Samples/directDebit_phpSepaXml.php
Original file line number Diff line number Diff line change
Expand Up @@ -26,8 +26,7 @@

$sepaDD = new SEPADirectDebitBasic([
'messageID' => time(),
'paymentID' => time(),
'type' => 'COR1',
'paymentID' => time()
]);

$sepaDD->setCreditor(new SEPACreditor([ //this is you
Expand All @@ -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
Expand All @@ -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.
Expand Down

0 comments on commit 53903dd

Please sign in to comment.