summaryrefslogtreecommitdiff
path: root/bin/taler-deployment-config-tips
diff options
context:
space:
mode:
authorFlorian Dold <florian@dold.me>2021-04-13 15:21:01 +0200
committerFlorian Dold <florian@dold.me>2021-04-13 15:21:01 +0200
commit31893ef217df8da7ebb374cf6c515211d790831f (patch)
tree2162523f997877c7756a3ea43111da9a90baae66 /bin/taler-deployment-config-tips
parent080757f0a33ec9778ca1f1b9700fd19552663483 (diff)
downloaddeployment-31893ef217df8da7ebb374cf6c515211d790831f.tar.gz
deployment-31893ef217df8da7ebb374cf6c515211d790831f.tar.bz2
deployment-31893ef217df8da7ebb374cf6c515211d790831f.zip
rename scripts, purge BB reserve topping
reserve topping is done by the systemd timer
Diffstat (limited to 'bin/taler-deployment-config-tips')
-rwxr-xr-xbin/taler-deployment-config-tips24
1 files changed, 24 insertions, 0 deletions
diff --git a/bin/taler-deployment-config-tips b/bin/taler-deployment-config-tips
new file mode 100755
index 0000000..a8bcae5
--- /dev/null
+++ b/bin/taler-deployment-config-tips
@@ -0,0 +1,24 @@
+#!/bin/bash
+
+set -eu
+
+function join_no_double_slash {
+ echo "$1$2" | sed -s 's/\([^:]\)\/\+/\1\//g'
+}
+
+BANK_URL=$(taler-config -s bank -o base_url)
+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"
+APIKEY=$(taler-config -s frontends -o backend_apikey)
+
+PAYTO_WITH_SUBJECT=$(taler-merchant-setup-reserve \
+ --amount="${CURRENCY}:20" \
+ --exchange-url=${EXCHANGE_URL} \
+ --merchant-url=$(join_no_double_slash ${MERCHANT_URL} "/instances/survey/") \
+ --wire-method=${WIRE_METHOD} \
+ --apikey="ApiKey ${APIKEY}")
+echo "Merchant generated the following tip-reserve: $PAYTO_WITH_SUBJECT"
+taler-bank-manage django wire_transfer_payto Survey x ${PAYTO_WITH_SUBJECT} "${CURRENCY}:50"
+echo Paid for tip reserve.