Having to Generate SEPA Credit Transfer's XMLs, I ran into some structure issues when I tried to validate them:
CstmrDrctDbtInitn not recognised, I had to replace this tag by pain.001.001.02,
BtchBookg part of GrpHdr and not of PmtInf,
NbOfTxs and CtrlSum shouldn't be part of PmtInf,
Grpg mandatory (with the value of MIXD) (inside GrpHdr)
order of tags in GrpHdr:
MsgId
CreDtTm
BtchBookg
NbOfTxs
CtrlSum
Grpg
InitgPty > Nm
SeqTp Not recognised, and besides I couldn't find it in the iso-20022.
CreditInvoice not mandatory, but you check in your code its existence (SEPA/CreditTransferTransactions.php), creating an empty CdtTrfTxInf when a value is not given.
Finally, I found very usefull the possibility to save the xml generated as a text, by modifying XMLGenerator::save() as such:
/*
* Save Xml File
* @param string $stream
* @param null $fileName
* @return bool|mixed
/
public function save($stream, $fileName = null) {
$dom = new \DOMDocument('1.0');
$dom->preserveWhiteSpace = false;
$dom->formatOutput = true;
Having to Generate SEPA Credit Transfer's XMLs, I ran into some structure issues when I tried to validate them:
Finally, I found very usefull the possibility to save the xml generated as a text, by modifying XMLGenerator::save() as such: /* * Save Xml File * @param string $stream * @param null $fileName * @return bool|mixed / public function save($stream, $fileName = null) { $dom = new \DOMDocument('1.0'); $dom->preserveWhiteSpace = false; $dom->formatOutput = true;