You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
My bank require the issuerID and in SEPA Direct Debit PAIN.008.001.02 XML File Structure is mandatory, it can to be the same as creditor_id
Example:
GrpHdr>
MsgId>PRE2017011213013569700001112121
CreDtTm>2017-01-12T13:01:35
NbOfTxs>1
CtrlSum>361.07
InitgPty>
Nm>JOSE PABLO PALENCIA MORCHON
Id>
OrgId>
Othr>
Id>ES84001121111111Y
/Othr>
/OrgId>
/Id>
/InitgPty>
/GrpHdr>
Solution: changes in:
private function createGroupHeader(){
//Retrieve the CstmrDrctDbtInitn node
$CstmrDrctDbtInitnNode = $this->getCstmrDrctDbtInitnNode();
//Create the required nodes
$GrpHdrNode = $this->xml->createElement("GrpHdr");
$MsgIdNode = $this->xml->createElement("MsgId");
$CreDtTmNode = $this->xml->createElement("CreDtTm");
$NbOfTxsNode = $this->xml->createElement("NbOfTxs");
$CtrlSumNode = $this->xml->createElement("CtrlSum");
$InitgPtyNode = $this->xml->createElement("InitgPty");
$NmNode = $this->xml->createElement("Nm");
$InitgPtyNode_IdNode=$this->xml->createElement("Id");
$InitgPtyNode_Id_OrgIdNode=$this->xml->createElement("OrgId");
$InitgPtyNode_Id_OrgId_OthrNode=$this->xml->createElement("Othr");
$InitgPtyNode_Id_OrgId_Othr_IdNode=$this->xml->createElement("Id");
//Set the values for the nodes
$MsgIdNode->nodeValue = $this->makeMsgId();
$CreDtTmNode->nodeValue = date('Y-m-d\TH:i:s', time());
//If using lower than PHP 5.4.0, there is no ENT_XML1
if( version_compare(PHP_VERSION, '5.4.0') >= 0){
$NmNode->nodeValue = htmlentities($this->config['name'],ENT_XML1, 'UTF-8' );
}else{
$NmNode->nodeValue = htmlentities($this->config['name'],ENT_QUOTES, 'UTF-8' );
}
if ( isset( $this->config['Issuer_id'] ) ) {
$Issuer_id=$this->config['Issuer_id'];
} else {
$Issuer_id=$this->config['creditor_id'];
}
//If using lower than PHP 5.4.0, there is no ENT_XML1
if( version_compare(PHP_VERSION, '5.4.0') >= 0){
$InitgPtyNode_Id_OrgId_Othr_IdNode->nodeValue = htmlentities($Issuer_id,ENT_XML1, 'UTF-8' );
}else{
$InitgPtyNode_Id_OrgId_Othr_IdNode->nodeValue = htmlentities($Issuer_id,ENT_QUOTES, 'UTF-8' );
}
//Append the nodes
$InitgPtyNode->appendChild($NmNode);
$InitgPtyNode->appendChild($InitgPtyNode_IdNode);
$InitgPtyNode_IdNode->appendChild($InitgPtyNode_Id_OrgIdNode);
$InitgPtyNode_Id_OrgIdNode->appendChild($InitgPtyNode_Id_OrgId_OthrNode);
$InitgPtyNode_Id_OrgId_OthrNode->appendChild($InitgPtyNode_Id_OrgId_Othr_IdNode);
$GrpHdrNode->appendChild($MsgIdNode);
$GrpHdrNode->appendChild($CreDtTmNode);
$GrpHdrNode->appendChild($NbOfTxsNode);
$GrpHdrNode->appendChild($CtrlSumNode);
$GrpHdrNode->appendChild($InitgPtyNode);
//Append the header to its parent
$CstmrDrctDbtInitnNode->appendChild($GrpHdrNode);
}//createGroupHeader
The text was updated successfully, but these errors were encountered:
My bank require the issuerID and in SEPA Direct Debit PAIN.008.001.02 XML File Structure is mandatory, it can to be the same as creditor_id
Example:
GrpHdr>
MsgId>PRE2017011213013569700001112121
CreDtTm>2017-01-12T13:01:35
NbOfTxs>1
CtrlSum>361.07
InitgPty>
Nm>JOSE PABLO PALENCIA MORCHON
Id>
OrgId>
Othr>
Id>ES84001121111111Y
/Othr>
/OrgId>
/Id>
/InitgPty>
/GrpHdr>
Solution: changes in:
private function createGroupHeader(){
//Retrieve the CstmrDrctDbtInitn node
$CstmrDrctDbtInitnNode = $this->getCstmrDrctDbtInitnNode();
The text was updated successfully, but these errors were encountered: