jerebtw / Sepa-JS-XML

This is a library to generate SEPA xml files
https://www.npmjs.com/package/sepa-js-xml
MIT License
7 stars 2 forks source link

[Feature request] When using the library It doesn't pass online validator #172

Closed gilles-bertrand closed 1 year ago

gilles-bertrand commented 1 year ago

Online validator not passed When i try the xml file generated by the library in this validator tool https://www.mesfluxdepaiement.fr/testez-vos-fichiers-sepa/, the validation fails. This is the javascript object used :

const sepaData : SepaData = {
  painVersion: 'pain.001.001.03 ',
  batchBooking: false,
  id: 'BGL Virement',
  creationDate: new Date(2022, 5, 16, 0, 0),
  initiatorName: 'KRS Logistics Lux Sarl',

positions: [
  {
    id: 'krs id position',
    iban: 'LU190030179801940000',
    bic: 'BGLLLULL',
    requestedExecutionDate: new Date(2022, 5, 16, 0, 0),
    name: 'KRS name position',
    payments: [
      {
        id: '2022-03-00097',
        amount: 230,
        currency: 'EUR',
        bic: 'UNCBMEPG',
        name: 'EUROMONT SPED D O O  PODGORICA',
        iban: 'ME25560005010000353578',
        remittanceInformation: '22-ZZ012000219'
      }
    ]
  }
]

}

And the XML generated don't pass ;(

Thanks for your help

jerebtw commented 1 year ago

Should be fixed in v2.0.4

gilles-bertrand commented 1 year ago

Thank you for reactivy and yes it does work !!! Great Job