[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Taler] Cashdesk with GNU Taler?
From: |
Christian Grothoff |
Subject: |
Re: [Taler] Cashdesk with GNU Taler? |
Date: |
Fri, 9 Dec 2022 10:42:59 +0100 |
User-agent: |
Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101 Thunderbird/102.5.0 |
On 12/6/22 01:09, Florian Jung via Taler wrote:
Hi Christian,
On 12/5/22 00:49, Christian Grothoff wrote:
You need to create another (non-exchange) bank account with
credentials in the libeufin-sandbox, and then give the respective
username/password to the cashier app, using
"$ENDPOINT/demobanks/default" for the URL (yes, a bit awkward, on my
list to get fixed).
I tried this, but the cashier app only says "Fehler beim Abrufen der
Konfiguration: %s" (yes, with the %s part. I'd love to see the reason :D)
Using superuser credentials instead of normal ones also does not help.
Superuser credentials never work, they are ONLY for the CLI (for some
reason, maybe for a bad reason, but at least that is normal).
(The API address i used was: http://myhostname:5016/demobanks/default,
which is accessible (but 403) from my phone's browser.)
Maybe first try to deploy the WebUI (see below), and then see if you can
setup a user and _then_ see if the Cashier App works with that ;-).
Additionally, you either need to have configured the sandbox to allow
negative balances OR make a 'fake' wire transfer to that user's bank
account to get money into the system to withdraw.
I didn't do that, though. But that shouldn't cause the above problem,
should it?
Last but not least, if you enable self-registration in
libeufin-sandbox, you could also use the $ENDPOINT/webui/ to create
accounts and initiate withdrawals.
How do I enable this? I have "allowRegistrations" set to true, is that
what you mean?
Yes.
curl -u admin:ZRLTTikeUbIJjAB6C7pS --basic
localhost:5016/demobanks/default
{
"currency" : "MANA",
"name" : "default",
"userDebtLimit" : 1000,
"bankDebtLimit" : 1000000,
"allowRegistrations" : true <--- does that mean it's enabled?
However, the /webui endpoint 404s for me. Is my sandbox version (built
from git ~2 weeks ago) too old?
Maybe rather too new ;-). In the latest versions, the /webui is no
longer part of libeufin and needs to be installed (static file)
separately and is (usually) injected via reverse proxy, something I
forgot about ;-). This is the relevant part of my nginx configuration:
server {
server_name bank.chf.taler.net;
# redirect '/' to /webui;
rewrite ^/$ /webui/ redirect;
# everything usually goes to the proxy
location / {
proxy_set_header Host $host;
proxy_set_header X-Forwarded-Host "bank.chf.taler.net";
proxy_set_header X-Forwarded-Proto "https";
proxy_set_header X-Forwarded-Prefix "/";
proxy_pass http://localhost:9941/;
}
location ~ ^/webui/.*$ {
root /var/www/demobank-ui;
index index.html;
expires max;
add_header Cache-Control "public";
}
}
We then have:
# ls /var/www/demobank-ui/webui/
demobank-ui-settings.js index.css index.html index.js.map
index.css.map index.js
# cat webui/demobank-ui-settings.js
localStorage.setItem("bank-base-url",
"https://bank.chf.taler.net/demobanks/default/");
globalThis.talerDemobankSettings = {
allowRegistrations: false,
bankName: "BFH TI Bank",
// Show explainer text and navbar to other demo sites
showDemoNav: false,
// Names and links for other demo sites to show in the navbar
demoSites: [
["Landing", "https://demo.taler.net/"],
["Bank", "https://bank.demo.taler.net/"],
["Essay Shop", "https://shop.demo.taler.net/"],
["Donations", "https://donations.demo.taler.net/"],
["Survey", "https://donations.demo.taler.net/"],
],
};
The 'demobank-ui' is generated via the
wallet-core.git/packages/demobank-ui/.
We still need to create a proper Debian package for libeufin that sets
this up automatically...
I hope this helps!
-Christian