codebude / QRCoder

A pure C# Open Source QR Code implementation
MIT License
4.46k stars 1.09k forks source link

SwissQRCode - Additional Info #93

Closed mHCio closed 6 years ago

mHCio commented 6 years ago

Hi,

is it possible to set the additional Info inside the QRCode ?

Thank you very much

codebude commented 6 years ago

Hi @mHCio ,

yes it is. When you use the SwissQRCode payload generator, then you have to pass an object of type "SwissQRCode.Reference" as shown here: https://github.com/codebude/QRCoder/wiki/Advanced-usage---Payload-generators#316-swissqrcode-iso-20022 The reference class has field/property called "unstructuredMessage". This is the additional information field.

If you want to know why it's named "unstructuredMessage" instead of "additional information" have a look at the SwissQRCode specification: https://www.paymentstandards.ch/dam/downloads/ig-qr-bill-de.pdf

On page 21 (Table 6) the field is labeled "Ustrd" or "Unstrukturierte Mitteilung". (Additional info/Zusätzliche Information is just the "description", but not the technical fieldname. See page 17, second half.)

I hope this is the information you searched for. If not, let me know.

codebude commented 6 years ago

If you want to give a reference you have to choose either "SCOR" or "QRR". Non can only be used when you don't want to send a reference text. If you want to generate a "QR Rechnung" than you should use reference type "QRR". As I understood "SCOR" shall only be used for creditor references.

mHCio commented 6 years ago

Yes, it works !

Thank you very much

hosseinGanjyar commented 6 years ago

@mHCio please send me a contact mail?