Closed Schlagadiguenflu closed 3 years ago
Where is the error message from? From PostFinance's test platform for business customers (https://isotest.postfinance.ch/corporates/qrbill/validation)?
I've tried it myself and the test platform says "No errors were found during validation". So I can't reproduce the problem.
I would expect that the error message occurs if there is a newline character after the StrdBkgInf
field and thus before the AltPmt
field. But that's not the case.
For my test, I have used the code from the GitHub home page and slightly modified it to generate a PNG instead of an SVG file:
...
Format = new BillFormat
{
GraphicsFormat = GraphicsFormat.PNG,
Resolution = 300
}
};
// Generate QR bill
byte[] png = QRBill.Generate(bill);
// Save generated PNG file
const string path = "qrbill.png";
File.WriteAllBytes(path, png);
}
}
}
Can you provide a minimal, complete and reproducible example? And can you better explain how and where you have unsuccessfully validated the QR bill?
So... I did the same thing again this morning (I imported EXACTLY the same file with the QRCode). And now it works. Maybe Postfinance changed something... So the issue seems not to be your library. Thank you for your reply. :)
It seems that even if I don't specify an AlternativeSchemes, the qr is invalid by postfinance (see below). Strangely by UBS it does work. Any Idea why ? I tried also to put AlternativeSchemes =null.
// Setup bill data Bill bill = new Bill { // creditor data Account = qriban, Creditor = new Address { Name = values[10], AddressLine1 = values[12], AddressLine2 = values[13], CountryCode = "CH" },
19/05/2021 13.28.14 Compte-rendu
================================================================================