commit bb5eb320aae1db61601fa4651710fa41f4bbbadf
parent 72258194adaad44f6ada1207f365aa9842a6bf44
Author: Christian Grothoff <christian@grothoff.org>
Date: Thu, 26 Dec 2024 16:25:41 +0100
fix AML helper progs
Diffstat:
2 files changed, 9 insertions(+), 12 deletions(-)
diff --git a/src/kyclogic/taler-exchange-helper-measure-enable-deposits b/src/kyclogic/taler-exchange-helper-measure-enable-deposits
@@ -34,8 +34,8 @@ while getopts 'ac:hirvV' OPTION;
do
case "$OPTION" in
a)
- # Phone number is required.
- echo "CONTACT_PHONE"
+ # Terms of service status is required.
+ echo "ACCEPTED_TERMS_OF_SERVICE"
exit 0
;;
c)
@@ -63,13 +63,12 @@ do
;;
r)
# What to do next?
- echo "custom_measures"
echo "expiration_time"
echo "successor_measure"
exit 0
;;
v)
- echo "$0 v0.0.0"
+ echo "$0 v0.0.1"
exit 0
;;
V)
@@ -99,7 +98,6 @@ CURRENT_RULES=$(echo "$INPUTS" | jq '.current_rules // null')
# Get context values.
EXPIRATION_TIME=$(echo "$INPUTS" | jq '.context.expiration_time // .current_rules.expiration_time // null')
SUCCESSOR_MEASURE=$(echo "$INPUTS" | jq '.context.successor_measure // .current_rules.successor_measure // null')
-CUSTOM_MEASURES=$(echo "$INPUTS" | jq '.context.custom_measures // null')
# FIXME: maybe do this via systemd once instead of in every script run?
. /etc/taler-exchange/taler-exchange.env
@@ -122,8 +120,7 @@ fi
jq \
--argjson et "$EXPIRATION_TIME" \
--argjson sm "$SUCCESSOR_MEASURE" \
- --argjson cm "$CUSTOM_MEASURES" \
--argjson nr "$NEW_RULES" \
- '{"new_rules":$nr+{"expiration_time":$et,"successor_measure":$sm,"custom_measures":($nr.custom_measures+$cm)}}|del(..|nulls)'
+ '{"new_rules":$nr+{"expiration_time":$et,"successor_measure":$sm)}}|del(..|nulls)'
exit 0
diff --git a/src/kyclogic/taler-exchange-helper-measure-tops-postal-check b/src/kyclogic/taler-exchange-helper-measure-tops-postal-check
@@ -35,9 +35,9 @@ do
a)
# Address details are required.
echo "ADDRESS_STREET"
- echo "ADDRESS_CITY"
+ echo "ADDRESS_TOWN_LOCATION"
echo "ADDRESS_ZIPCODE"
- echo "ADDRESS_COUNTRY"
+ echo "ADDRESS_COUNTRY_CC"
exit 0
;;
c)
@@ -70,7 +70,7 @@ do
exit 0
;;
v)
- echo "$0 v0.0.1"
+ echo "$0 v0.0.2"
exit 0
;;
V)
@@ -93,8 +93,8 @@ fi
# First, extract inputs we need
INPUTS=$(jq '{"current_rules":.current_rules,"attributes":.attributes,"context":.context}')
-# Get phone number.
-COUNTRY=$(echo "$INPUTS" | jq '.attributes.COUNTRY // null')
+# Get country number.
+COUNTRY=$(echo "$INPUTS" | jq '.attributes.ADDRESS_COUNTRY_CC // null')
# Get current rules.
CURRENT_RULES=$(echo "$INPUTS" | jq '.current_rules // null')
# Get context values.