Fix session status detectin in make-invoice-capture-success script (#73)

Also fix logging
This commit is contained in:
Andrey Fadeev 2020-04-06 12:13:28 +03:00 committed by GitHub
parent dccf24de3f
commit da1061969c
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -8,6 +8,8 @@ set -e
CWD="$(dirname $0)" CWD="$(dirname $0)"
source "${CWD}/lib/logging"
INVOICE="${1}" INVOICE="${1}"
case ${INVOICE} in case ${INVOICE} in
@ -38,7 +40,7 @@ TARGET=$(echo "${SESSION}" | jq -r '.target')
if [ \ if [ \
"${PAYMENT}" = "null" -o \ "${PAYMENT}" = "null" -o \
"$(echo "${TARGET}" | jq -r '.captured')" = "null" -o \ "$(echo "${TARGET}" | jq -r '.captured')" = "null" -o \
"$(echo "${SESSION}" | jq -r '.payload.session_started')" = "null" \ "$(echo "${SESSION}" | jq -r '.payload.session_finished')" != "null" \
]; then ]; then
err "Last seen change looks wrong for this repair scenario" err "Last seen change looks wrong for this repair scenario"
fi fi