IBAN verification for cheapskates
Table of Contents
IBAN Beaver is a webapp that verifies an IBAN upon request. The response is a json object with information about the associated bank (if any). It is free to use, but keep in mind that this is just a project to learn about webby things and databases. Don't sue me if you use this for billing and something goes wrong.
- Austria
- Belgium
- Germany
- Netherlands
Only tested on GNU Linux.
- rust / cargo
- base-devel / build-essential / your distros dev meta-package
- diesel_cli, needed for diesel migrations. See their doc.
- sqlite3-dev
cargo install diesel_cli # generic sudo pacman -S diesel-cli sqlite3-dev # arch
- Clone the repo
git clone https://github.com/rmsthebest/iban_beaver.git
- Run!
diesel setup # creates db diesel migration run # create the tables. can use redo to drop table first cargo run --release
There's also a docker container now, if you prefer that.
See step 2 in Installation By default a resources directory is expected to exist from where you are running iban_beaver. If you install it somewhere else like /usr/local/bin you may want to run it like this:
mkdir -p ~/.local/share/iban_beaver/resources
mv /path/to/db.sqlite ~/.local/share/iban_beaver/resources
env IBAN_BEAVER_RESOURCES=~/.local/share/iban_beaver/resources iban_beaver
Interface is exposed at http://localhost:3030/swagger-ui
Verify IBAN
curl 0.0.0.0:3030/verify/<iban>
curl 0.0.0.0:3030/verify/DE27100777770209299700
Update database
curl 0.0.0.0:3030/update/<country>
curl 0.0.0.0:3030/update/DE
Blacklist IBAN
curl 0.0.0.0:3030/db/blacklist/<iban>/<add or remove>
curl 0.0.0.0:3030/db/blacklist/DE27100777770209299700/add
Fill database without downloading new data, you should never have to do this.
curl 0.0.0.0:3030/re-fill/<country>
curl 0.0.0.0:3030/re-fill/DE
I'm not that ambitious. If you assume current status is all you're going to get you are most likely right. If someone opens an issue I might work on that.
This is a best effort project, I might move on with my life and never see your contribution.
- Fork the Project
- Create your Feature Branch (
git checkout -b feature/AmazingFeature
) - Commit your Changes (
git commit -m 'Add some AmazingFeature'
) - Push to the Branch (
git push origin feature/AmazingFeature
) - Open a Pull Request
- Create
src/country/<countrycode>.rs
- Satisfy the country trait (copy a similar country and fix what needs to be fixed)
- Add country to match statement in
src/country/mod.rs
- Test the update/fill/iban commands. Valid ibans for testing can be found here
Distributed under the AGPL-v3 License. See LICENSE
for more information.