diff options
author | Marcello Stanisci <stanisci.m@gmail.com> | 2017-11-30 16:43:22 +0100 |
---|---|---|
committer | Marcello Stanisci <stanisci.m@gmail.com> | 2017-11-30 16:44:04 +0100 |
commit | 8749671e927a2483019a39372e1167d66a330421 (patch) | |
tree | 21af9c50d36cae14be43bd64df8aa3dd1c817607 /bin/taler-deployment-top-reserve | |
parent | 7dfa425953d313bb765686f5f8aa635993915c71 (diff) | |
download | deployment-8749671e927a2483019a39372e1167d66a330421.tar.gz deployment-8749671e927a2483019a39372e1167d66a330421.tar.bz2 deployment-8749671e927a2483019a39372e1167d66a330421.zip |
merging reserve topping in one script
Diffstat (limited to 'bin/taler-deployment-top-reserve')
-rwxr-xr-x | bin/taler-deployment-top-reserve | 17 |
1 files changed, 15 insertions, 2 deletions
diff --git a/bin/taler-deployment-top-reserve b/bin/taler-deployment-top-reserve index 33d1fd6..b5984a2 100755 --- a/bin/taler-deployment-top-reserve +++ b/bin/taler-deployment-top-reserve @@ -1,12 +1,25 @@ #!/bin/bash -source $HOME/activate +if test -z $TALER_ENVNAME || 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_ENVNAME.taler.net/","account_number":7,"type":"test"}' \ - --transfer='ZUV321' + --transfer=$UUID # 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-uri="http://backend.$TALER_ENVNAME.taler.net/" \ + --credit-uuid=$UUID \ + --instance=default \ + --expiration=$(date --date="2 weeks" +"%Y-%m-%d") |