Skip to content
This repository has been archived by the owner on Nov 7, 2021. It is now read-only.

Several local instruments and services by PaymentInformation #39

Open
sdespont opened this issue May 5, 2020 · 0 comments
Open

Several local instruments and services by PaymentInformation #39

sdespont opened this issue May 5, 2020 · 0 comments

Comments

@sdespont
Copy link
Contributor

sdespont commented May 5, 2020

In the PaymentInformation, local instrument and service level are deduced from the first transaction and throw an error if it is different for the nexts transactions. It means that a payment information cannot contains transactions with different local instrument.

Did I miss something?

foreach ($this->transactions as $transaction) {
if ($this->hasPaymentTypeInformation()) {
if ($transaction->getLocalInstrument() !== $localInstrument) {
throw new \LogicException('You can not set the local instrument on B- and C-level.');
}
if ($transaction->getServiceLevel() !== $serviceLevel) {
throw new \LogicException('You can not set the service level on B- and C-level.');
}
}
$root->appendChild($transaction->asDom($doc, $this));
}

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant