diff options
Diffstat (limited to 'bin')
-rwxr-xr-x | bin/WIP/taler-local | 17 |
1 files changed, 14 insertions, 3 deletions
diff --git a/bin/WIP/taler-local b/bin/WIP/taler-local index 7c495ff..e8b6df4 100755 --- a/bin/WIP/taler-local +++ b/bin/WIP/taler-local @@ -1373,7 +1373,7 @@ def prepare(x_forwarded_host, x_forwarded_proto): password=EXCHANGE_BANK_ACCOUNT_PASSWORD ) print(" OK") - print_nn("Getting exchange payto-URI from the bank.") + print_nn("Getting exchange payto-URI from the bank...") exchange_bank_account_info = get_sandbox_account_info( SANDBOX_URL, EXCHANGE_BANK_ACCOUNT_SANDBOX, @@ -1694,9 +1694,20 @@ def stop(): subprocess.run(["systemctl", "--user", "stop", "taler-local-*.service"], check=True) @cli.command() -def withdraw(): +@click.option( + "--bank-host", metavar="HOST", + help="Host serving the bank.", + default="localhost:8080" +) +@click.option( + "--bank-proto", metavar="PROTO", + help="Protocol accepred by the bank", + default="http" +) +def withdraw(bank_host, bank_proto): print_nn("Create withdrawal operation...") - resp = requests.post(REV_PROXY_URL + + bank_base_url = bank_proto + "://" + bank_host + resp = requests.post(bank_base_url + f"/sandbox/demobanks/default/access-api/accounts/{CUSTOMER_BANK_ACCOUNT}/withdrawals", json = dict(amount=CURRENCY + ":5"), auth = requests.auth.HTTPBasicAuth(CUSTOMER_BANK_ACCOUNT, CUSTOMER_BANK_PASSWORD) |