#!/bin/bash if test -z $TALER_ENV_NAME || test -z $TALER_CONFIG_CURRENCY; then echo "Please source ~/activate" exit 1 fi # %N is current nanoseconds. UUID=$(date +"uuid-%N") taler-exchange-reservemod \ --add="$TALER_CONFIG_CURRENCY:100.0" \ --reserve=S98FEXHW3VJ93EA73CRAQ5E8E4DJE96Z9JXYFHFD169FWS9NS8A0 \ --sender='{"bank_uri":"https://bank.$TALER_ENV_NAME.taler.net/","account_number":7,"type":"test"}' \ --transfer="{\"uuid\":\"$UUID\"}" if ! test 0 = $?; then echo Topping reserve failed! exit 1 fi # note: account number (7) is hardcoded, as tipping # is only being tested against the 'default' instance. taler-merchant-tip-enable \ --amount="$TALER_CONFIG_CURRENCY:100.00" \ --backend="http://backend.$TALER_ENV_NAME.taler.net/" \ --credit-uuid=$UUID \ --instance=default \ --expiration=$(date --date="2 weeks" +"%Y-%m-%d")