This code implements a bank Web portal that tightly integrates with the GNU Taler payment system. The bank it primarily meant be used as part of a demonstrator for the Taler system. ================== HOW TO INSTALL THE BANK ================= From the repository's top directory, run $ ./bootstrap this operation will fetch additional libraries needed by the bank (mostly JavaScript includes), and create the configure script. The next step is to specify the install prefix, run $ export PREFIX=$HOME/local # Adapt to your needs. $ ./configure --prefix=$PREFIX NOTE: some systems, notably Debians, might need the extra DEBIAN_PIP3_SYSTEM environment variable to be set to "--system" and passed along the configuration step. In that case, the configuration should be invoked as follows: $ ./configure --prefix=$PREFIX DEBIAN_PIP3_SYSTEM=--system Then the usual GNU-compatible commands, that are # this will download all dependencies $ make install and optionally $ export PYTHONPATH=$PREFIX/lib/python3.5/site-packages/ $ make check # run the tests ================== HOW TO CONFIGURE THE BANK ================= The bank obeys to the INI syntax for configuration files. When launched, the bank will by default look for a configuration file located at ~/.config/taler.conf. To overide this behaviour, give the -c option when launching the bank. In order to properly run, the bank needs the following parts to be configured * Database name: connection string for the database to be used, currently Postgresql. * Serving: whether we want the bank accessible via TCP or unix domain sockets. * Fractional precision: precision of the fractional part of Taler objects. * Fractional length: how many digits after the floating point we want to be shown in HTML pages. * Debt thresholds * Suggested exchange # Mandatory section name [bank] # We accept requests via unix domain sockets UWSGI_SERVE = unix # If we want serve the bank via TCP, just replace the statement # above with the following one: # UWSGI_SERVE = tcp # And also give the port to listen to # UWSGI_PORT = 8585 # The path below indicates where to create the unix domain socket UWSGI_UNIXPATH = /deployment/sockets/bank.uwsgi # The mode to assign to the unix domain socket when # creating it (automatically done by the bank) UWSGI_UNIXPATH_MODE = 660 # We want at most two fractional digits shown for amounts # throughout the page pages NDIGITS = 2 # The fractional part of Taler amount objects is 100000000. # This value needs to be changed ONLY IF there is a change # protocol-wise. In other words, its value it's not up to the # bank FRACTION = 100000000 # The bank will try to connect to a database called 'talerlocal' # running under Postgresql. The sysadmin will have to make sure # that the bank has all the rights to work on that database. # NOTE, this value is optional, and the bank will fallback to sqlite3 # if not given. DATABASE = postgres:///talerlocal # Maximum debt allowed for normal users. The notation # used for amounts is: CURRENCY:x.y. Note, at least one # digit in the fractional part is required. MAX_DEBT = KUDOS:60.0 # Maximum debt allowed for the bank itself. MAX_DEBT_BANK = KUDOS:0.0 # Infinite debt allowed. # The following option lets the bank suggest a default exchange # when the customer withdraws Taler coins. SUGGESTED_EXCHANGE = http://exchange.example.com/ ================== HOW TO LAUNCH THE BANK ================= The bank can accept connections via the UWSGI protocol and HTTP. To launch it for the UWSGI protocol, issue $ taler-bank-manage serve-uwsgi To launch it for HTTP, issue $ taler-bank-manage serve-http the port the bank will listen to, can be either specified on the command line (option -p), or in the configuration file with the HTTP_PORT option. Note, launching the bank with 'serve-http', will make the UWSGI_SERVE option to be ignored. ================== HOW TO RUN YOUR TESTS ================= From the repository's top directory, just issue $ make check in order to have test cases run. A previous 'make install' is NOT required. NOTE: as tests do create a database (tipically named test_XYZ), the user launching those must have some "write permissions" on the DMBS. ================= HOW TO FORCE MIGRATIONS ================= https://simpleisbetterthancomplex.com/tutorial/2016/07/26/how-to-reset-migrations.html