[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-deployment] branch master updated: reserve authorization
From: |
gnunet |
Subject: |
[taler-deployment] branch master updated: reserve authorization |
Date: |
Mon, 27 Jul 2020 10:41:49 +0200 |
This is an automated email from the git hooks/post-receive script.
ms pushed a commit to branch master
in repository deployment.
The following commit(s) were added to refs/heads/master by this push:
new 1b41f4b reserve authorization
1b41f4b is described below
commit 1b41f4bd64c7b0aadce56028761f3c902c6b9710
Author: MS <ms@taler.net>
AuthorDate: Mon Jul 27 10:41:43 2020 +0200
reserve authorization
---
bin/taler-config-tips | 41 ++++++++++++-----------------------------
1 file changed, 12 insertions(+), 29 deletions(-)
diff --git a/bin/taler-config-tips b/bin/taler-config-tips
index 494ebe7..2c0d684 100755
--- a/bin/taler-config-tips
+++ b/bin/taler-config-tips
@@ -1,33 +1,16 @@
-#!/usr/bin/env python3
+#!/bin/bash
-from requests import post
-from os import environ
-from sys import exit
-from urllib.parse import urljoin
+set -eo
-def expectResponse(response, expected_status_codes):
- if response.status_code not in expected_status_codes:
- print("Configuration failed on URL: {}".format(response.url))
- print(response.text)
- exit(1)
- # Allows for finer grained checks.
- return response
+MERCHANT_URL=$(taler-config -s frontends -o backend)
+CURRENCY=$(taler-config -s taler -o currency)
+EXCHANGE_URL=$(taler-config -s exchange -o base_url)
+WIRE_METHOD="x-taler-bank"
-TALER_ENV_NAME = environ.get("TALER_ENV_NAME")
-if not TALER_ENV_NAME:
- print("TALER_ENV_NAME not defined. Please source the ~/activate file.")
- exit(1)
-MERCHANT_BACKEND = f"https://backend.{TALER_ENV_NAME}.taler.net/"
-TALER_CONFIG_CURRENCY = environ.get("TALER_CONFIG_CURRENCY", "EUR")
+# Call merchant tool for reserve authorization.
+taler-merchant-setup-reserve --amount="${CURRENCY}:50" \
+ --exchange-url=${EXCHANGE_URL} \
+ --merchant-url=${MERCHANT_URL} \
+ --wire-method=${WIRE_METHOD}
-expectResponse(
- post(
- urljoin(MERCHANT_BACKEND, "instances/survey/private/reserves"),
- json=dict(
- initial_balance=f"{TALER_CONFIG_CURRENCY}:50",
- exchange_url=f"https://exchange.{TALER_ENV_NAME}.taler.net/",
- wire_method="x-taler-bank"
- )
- ),
- [200]
-)
+# Call exchange tool for money transfer.
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-deployment] branch master updated: reserve authorization,
gnunet <=