execute($getSepaAccounts); if ($getSepaAccounts->needsTan()) { handleStrongAuthentication($getSepaAccounts); // See login.php for the implementation. } $oneAccount = $getSepaAccounts->getAccounts()[0]; // generate a SepaDirectDebit object (pain.008.003.02). $directDebitFile = new \AbcAeffchenSephpa\SephpaDirectDebit( 'Name of Application', 'Message Identifier', \AbcAeffchenSephpa\SephpaDirectDebit::SEPA_PAIN_008_003_02 ); /* * * Configure the Direct Debit File * $directDebitCollection = $directDebitFile->addCollection([...]); * $directDebitCollection->addPayment([...]); * * See documentation: * https://github.com/AbcAeffchen/Sephpa * */ $xml = $directDebitFile->generateOutput(['zipToOneFile' => false])[0]['data']; $sendSEPADirectDebit = \Fhp\Action\SendSEPADirectDebit::create($oneAccount, $xml); $fints->execute($sendSEPADirectDebit); require_once 'vop.php'; handleVopAndAuthentication($sendSEPADirectDebit); // 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();