/**
  * @return string
  */
 public function asXML()
 {
     foreach ($this->payments as $payment) {
         $this->transferFile->addPaymentInformation($payment);
     }
     $this->transferFile->accept($this->domBuilder);
     return $this->domBuilder->asXml();
 }
 /**
  * Add the specific OrgId element for the format 'pain.001.001.03'
  *
  * @param  GroupHeader $groupHeader
  * @return mixed
  */
 public function visitGroupHeader(GroupHeader $groupHeader)
 {
     parent::visitGroupHeader($groupHeader);
     if ($groupHeader->getInitiatingPartyId() !== null && $this->painFormat === 'pain.001.001.03') {
         $newId = $this->createElement('Id');
         $orgId = $this->createElement('OrgId');
         $othr = $this->createElement('Othr');
         $othr->appendChild($this->createElement('Id', $groupHeader->getInitiatingPartyId()));
         // NZC
         // $SchmeNm = $this->createElement('SchmeNm');
         // $Prtry = $this->createElement('Prtry', 'SEPA');
         // $Issr = $this->createElement('Issr', 'ISO');
         // $SchmeNm->appendChild($Prtry);
         // $othr->appendChild($SchmeNm);
         // $othr->appendChild($Issr);
         $orgId->appendChild($othr);
         $newId->appendChild($orgId);
         $xpath = new \DOMXpath($this->doc);
         $items = $xpath->query('GrpHdr/InitgPty/Id', $this->currentTransfer);
         $oldId = $items->item(0);
         $oldId->parentNode->replaceChild($newId, $oldId);
     }
 }
 public function __construct($painFormat = 'pain.008.002.02')
 {
     parent::__construct($painFormat);
 }