Closed PhoneixS closed 10 years ago
Thanks I did an update
Thanks for the fast fix.
Well, I have found that this can be more complex that I think before.
To not specify the BIC I have found that you can do two things:
I have seen that you can don't specify the block (your bank must accept it, mine accept it). With your fix, you left it empty but don't remove the block (this isn't valid). So you need to change DirectDebitTransaction->getSimpleXMLElementTransaction()
:
if ($this->getBIC()) {
$debtorAgent = $directDebitTransactionInformation->addChild('DbtrAgt')
->addChild('FinInstnId');
$debtorAgent->addChild('BIC', $this->getBIC());
}
Or you can add <Othr>
(if SEPA Direct Debit PAIN.008.001.02) or <PrtryId>
(if SEPA Credit Transfer PAIN.001.001.02, I think this isn't in your library) with <Id>NOTPROVIDED</Id>
instead of BIC. This need v04 specification, I think you are implementing v01?, but this is the more standard option:
if ($this->getBIC()) {
$debtorAgent = $directDebitTransactionInformation->addChild('DbtrAgt')
->addChild('FinInstnId');
$debtorAgent->addChild('BIC', $this->getBIC());
} else {
$debtorAgent = $directDebitTransactionInformation->addChild('DbtrAgt')
->addChild('FinInstnId')->addChild('Othr');
$debtorAgent->addChild('Id', 'NOTPROVIDED');
}
I have send a test file with the second option to see if it is validated correctly by the bank.
I have found this links that explain it in more detail:
Hi, I'm using, ISO20022 SDD V1.0, 20122009, I did some changes which you provide me, let me know if your bank accept, on SEPA more things depend of the bank.
Thanks
A validation for a transaction is that it must have a valid BIC. But it isn't required in national transactions after 1 February 2014.
From http://www.europeanpaymentscouncil.eu/index.cfm/sepa-credit-transfer/iban-and-bic/:
I think that this validation must be removed or changed to let you to not specify a BIC. For example in
SEPA/DirectDebitTransaction->checkIsValidTransaction()
remove|| !$this->getBIC()
.