Comments (5)
SwissQRBill uses the npm module iban to verify the provided IBAN.
Unlike the web page you have mentioned, the module verifies not only if the checksum is valid, but also whether the structure of the IBAN matches country specific specifications. Based on the source code of the iban module, letters in the account number should be supported. Therefore I think the error is more likely to be found in these structure checks.
Since only IBAN numbers from Switzerland and Lichtenstein are allowed, and both have the same structure, this additional checks could be simplified.
I have made a branch, which removes the iban dependency and implements the simplified IBAN checks directly into the library. You can install it using
npm i https://github.com/schoero/SwissQRBill.git#Fix-#215-iban-validation
Please let me know if your IBAN passes the simplified checks.
from swissqrbill.
I've just tested this, but I'm still getting an error:
/usr/local/bin/node ./RechnungMedlist.js
(node:89421) UnhandledPromiseRejectionWarning: Error: Creditor Reference requires the use of a conventional IBAN.
at PDF._validateData (.../node_modules/swissqrbill/lib/swissqrbill.js:416:27)
at new PDF (.../node_modules/swissqrbill/lib/swissqrbill.js:47:14)
at new PDF (.../node_modules/swissqrbill/lib/node.js:42:13)
at .../my.js:270:21
at new Promise (<anonymous>)
at generateQrInovice (.../my.js:269:12)
at /my.js:317:17
from swissqrbill.
Thank you for testing.
I just realized that I messed up the error messages there. The correct error message would be QR-Reference requires the use of a QR-IBAN (and vice versa).
I'm guessing you are trying to use a 27-digit QR-Reference in conjunction with your normal IBAN?
This is not allowed according the specifications (page 32, "Customer references"). If you want to continue using a 27-digit reference number (as in the orange ISR), you must request a QR-IBAN from your bank.
from swissqrbill.
Thanks for the hint. I did not know that. I will check this with my bank.
from swissqrbill.
I'm going to close this issue for now.
I have released v2.3.1 on npm including the changes regarding the iban checks and the wrong error messages.
If you need any further assistance, feel free to comment or create a new issue.
from swissqrbill.
Related Issues (20)
- Twint payment slip ? HOT 2
- Create a library for Angular HOT 2
- Invoice with different currencies HOT 4
- How to directly access pdf stream instead of writing file HOT 2
- How to use the pre-bundled version. HOT 1
- swissqrbill not working with Angular 14 HOT 2
- SwissQRBill.PDF options Request HOT 2
- SourceMapping included in minified Bundle HOT 1
- Issue when trying to create a QR-bill with a QR-IBAN that ends with an alphabetical letter at the end HOT 8
- Create pdf without npm HOT 1
- Pdf size issue HOT 2
- How can I right-align text in a table? HOT 2
- Roadmap to v4 HOT 3
- Additional Information is Not showing properly HOT 2
- Add option to exclude scissors in SVG HOT 1
- swissqrbill 4 With typescript projects HOT 6
- [BUG] Multi-page HTML leaves some marker elements on every pages HOT 5
- New SIX specification from 21.11.2025 HOT 1
- SwissQR not working anymore (PostFinance) HOT 2
- Add the QR slip in an A4 pages HOT 2
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from swissqrbill.