Repair payment those session is suspended (#75)

This commit is contained in:
Boris 2020-04-23 11:43:29 +03:00 committed by GitHub
parent c69e4a6531
commit 55702a4047
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -61,6 +61,8 @@ LAST_CHANGE=$(
jq '.[-1].payload.invoice_changes[-1].invoice_payment_change'
)
SESSION=$(echo "${LAST_CHANGE}" | jq -r '.payload.invoice_payment_session_change')
if [ "${LAST_CHANGE}" = "null" ]; then
err "Last seen change looks wrong for this repair scenario"
fi
@ -93,12 +95,12 @@ END
else
if [ "$(echo "${LAST_CHANGE}" | jq -r '.payload.invoice_payment_session_change.payload | has("session_started")')" == "true" ]; then
if [ $SESSION != "null" ] &&
[ "$(echo "${SESSION}" | jq -r '.payload | has("session_finished")')" != "true" ]; then
SESSION_CHANGE=""
else
else
err "Last seen change looks wrong for this repair scenario"
fi
fi
fi
TRXCHANGE=""