From 0e53ead14e69755dc8a8bf2a714b242bef5a398b Mon Sep 17 00:00:00 2001 From: rockstardev Date: Wed, 16 Sep 2020 23:44:21 -0500 Subject: [PATCH] Adding another state for detection of invoice paid --- BTCPayServer/wwwroot/shopify/btcpay-browser-client.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/BTCPayServer/wwwroot/shopify/btcpay-browser-client.js b/BTCPayServer/wwwroot/shopify/btcpay-browser-client.js index fca171372..77d2978ff 100644 --- a/BTCPayServer/wwwroot/shopify/btcpay-browser-client.js +++ b/BTCPayServer/wwwroot/shopify/btcpay-browser-client.js @@ -21,7 +21,8 @@ var BtcPayServerModal = (function () { var interval = setInterval(function () { getBtcPayInvoice(btcPayServerUrl, invoiceId, storeId) .then(function (invoice) { - if (invoice.status === "complete" || invoice.status === "paid") { + // in most cases this will be triggered by paid, but we put other statuses just in case + if (invoice.status === "paid" || invoice.status === "complete" || invoice.status === "confirmed") { clearInterval(interval); resolve(invoice); }