From da1061969ce72a4062276ffebb413abe37832bd3 Mon Sep 17 00:00:00 2001 From: Andrey Fadeev Date: Mon, 6 Apr 2020 12:13:28 +0300 Subject: [PATCH] Fix session status detectin in make-invoice-capture-success script (#73) Also fix logging --- scripts/make-invoice-capture-success.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/scripts/make-invoice-capture-success.sh b/scripts/make-invoice-capture-success.sh index b35ab62..9cccbf3 100755 --- a/scripts/make-invoice-capture-success.sh +++ b/scripts/make-invoice-capture-success.sh @@ -8,6 +8,8 @@ set -e CWD="$(dirname $0)" +source "${CWD}/lib/logging" + INVOICE="${1}" case ${INVOICE} in @@ -38,7 +40,7 @@ TARGET=$(echo "${SESSION}" | jq -r '.target') if [ \ "${PAYMENT}" = "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 err "Last seen change looks wrong for this repair scenario" fi