dmitrirussu / php-sepa-xml-generator

SEPA SDD XML Generator recommended to see. PHP SEPA XML Generator, (Single Euro Payments Area ISO20022 SDD V1_0 20122009) (SEPA)(PHP5)
https://github.com/dmitrirussu/PHP-SEPA-XML-GENERATOR
MIT License
53 stars 36 forks source link

Specify diferent local instrument code #22

Closed PhoneixS closed 9 years ago

PhoneixS commented 9 years ago

The local instrument code is specified as a constant that can't be configured. I need to change it from its default value CORE to COR1.

Exactly is coded in line 845 of PaymentInfo.php (the last line of this fragment of code):

        protected function addPaymentTypeInfoToXml(\SimpleXMLElement $paymentInfo) {
            $paymentTypeInfo = $paymentInfo->addChild('PmtTpInf');
            $serviceLevel = $paymentTypeInfo->addChild('SvcLvl');
            $serviceLevel->addChild('Cd', self::SERVICE_LEVEL_CODE);

            $localInstrument = $paymentTypeInfo->addChild('LclInstrm');
            $localInstrument->addChild('Cd', self::LOCAL_INSTRUMENT_CODE);

I think it can be like other properties.

dmitrirussu commented 9 years ago

I have accepted your improvement

Thanks