Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 1 addition & 3 deletions lib/Digitick/Sepa/DomBuilder/BaseDomBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -116,9 +116,7 @@ public function visitGroupHeader(GroupHeader $groupHeader)
$groupHeaderTag->appendChild(
$this->createElement('CtrlSum', $this->intToCurrency($groupHeader->getControlSumCents()))
);
if($groupHeader->getBatchBooking() !== null) {
$groupHeaderTag->appendChild($this->createElement('BtchBookg', $groupHeader->getBatchBooking()));
}

$initiatingParty = $this->createElement('InitgPty');
$initiatingPartyName = $this->createElement('Nm', $groupHeader->getInitiatingPartyName());
$initiatingParty->appendChild($initiatingPartyName);
Expand Down
10 changes: 10 additions & 0 deletions lib/Digitick/Sepa/DomBuilder/CustomerCreditTransferDomBuilder.php
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,11 @@ public function visitPaymentInformation(PaymentInformation $paymentInformation)
$this->currentPayment = $this->createElement('PmtInf');
$this->currentPayment->appendChild($this->createElement('PmtInfId', $paymentInformation->getId()));
$this->currentPayment->appendChild($this->createElement('PmtMtd', $paymentInformation->getPaymentMethod()));

if($paymentInformation->getBatchBooking() !== null) {
$this->currentPayment->appendChild($this->createElement('BtchBookg', $paymentInformation->getBatchBooking()));
}

$this->currentPayment->appendChild(
$this->createElement('NbOfTxs', $paymentInformation->getNumberOfTransactions())
);
Expand Down Expand Up @@ -178,6 +183,11 @@ public function visitGroupHeader(GroupHeader $groupHeader)
$orgId = $this->createElement('OrgId');
$othr = $this->createElement('Othr');
$othr->appendChild($this->createElement('Id', $groupHeader->getInitiatingPartyId()));

if ($groupHeader->getIssuer()) {
$othr->appendChild($this->createElement('Issr', $groupHeader->getIssuer()));
}

$orgId->appendChild($othr);
$newId->appendChild($orgId);

Expand Down
48 changes: 24 additions & 24 deletions lib/Digitick/Sepa/GroupHeader.php
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,13 @@ class GroupHeader
*/
protected $initiatingPartyId;

/**
* The Issuer.
*
* @var string
*/
protected $issuer;

/**
* @var int
*/
Expand All @@ -66,13 +73,6 @@ class GroupHeader
*/
protected $creationDateTime;

/**
* Should the bank book multiple transaction as a batch
*
* @var int
*/
protected $batchBooking = null;

/**
* @param $messageIdentification
* @param $isTest
Expand Down Expand Up @@ -123,6 +123,22 @@ public function getInitiatingPartyId()
return $this->initiatingPartyId;
}

/**
* @return string
*/
public function getIssuer()
{
return $this->issuer;
}

/**
* @param string $issuer
*/
public function setIssuer($issuer)
{
$this->issuer = $issuer;
}

/**
* @param string $initiatingPartyName
*/
Expand Down Expand Up @@ -154,22 +170,6 @@ public function getIsTest()
{
return $this->isTest;
}

/**
* @param boolean $batchBooking
*/
public function setBatchBooking($batchBooking)
{
$this->batchBooking = $batchBooking;
}

/**
* @return int|null
*/
public function getBatchBooking()
{
return $this->batchBooking;
}

/**
* @param string $messageIdentification
Expand Down Expand Up @@ -211,4 +211,4 @@ public function getCreationDateTime()
return $this->creationDateTime;
}

}
}
24 changes: 23 additions & 1 deletion lib/Digitick/Sepa/PaymentInformation.php
Original file line number Diff line number Diff line change
Expand Up @@ -128,6 +128,13 @@ class PaymentInformation
*/
protected $sequenceType;

/**
* Should the bank book multiple transaction as a batch
*
* @var int
*/
protected $batchBooking = null;

/**
* @param string $id
* @param string $originAccountIBAN This is your IBAN
Expand Down Expand Up @@ -408,4 +415,19 @@ public function getSequenceType()
return $this->sequenceType;
}

}
/**
* @param boolean $batchBooking
*/
public function setBatchBooking($batchBooking)
{
$this->batchBooking = $batchBooking;
}

/**
* @return int|null
*/
public function getBatchBooking()
{
return $this->batchBooking;
}
}