libeufin

Integration and sandbox testing for FinTech APIs and data formats
Log | Files | Refs | Submodules | README | LICENSE

commit da2aa56eaf8ad545746eb7c8520b665980127523
parent ed968c407b9a029fd5aeaf06cf97678cee38e631
Author: MS <ms@taler.net>
Date:   Sun, 10 Dec 2023 17:20:00 +0100

Drop leading + before POSTing to Telesign.

Diffstat:
Mcontrib/libeufin-tan-sms.sh | 5+++--
1 file changed, 3 insertions(+), 2 deletions(-)

diff --git a/contrib/libeufin-tan-sms.sh b/contrib/libeufin-tan-sms.sh @@ -1,4 +1,5 @@ #!/bin/sh + # This file is in the public domain. set -eu @@ -8,13 +9,13 @@ set -eu MESSAGE=`cat -` TMPFILE=`mktemp /tmp/sms-loggingXXXXXX` - +PHONE_NUMBER=$(echo $1 | sed 's/^+//') # Telesign refuses the leading + STATUS=$(curl --request POST \ --user "$CUSTOMER_ID:$API_KEY" \ --url https://rest-api.telesign.com/v1/messaging \ --data "message_type=OTP" \ --data "message=$MESSAGE" \ - --data "phone_number=$1" \ + --data "phone_number=$PHONE_NUMBER" \ -w "%{http_code}" -s -o $TMPFILE) echo `cat $TMPFILE` >> $HOME/sms.log rm -f $TMPFILE