From 02b99d2b06e490d78ece3d19ac92a4d75e3a8a39 Mon Sep 17 00:00:00 2001 From: rockstardev Date: Fri, 25 Sep 2020 16:55:28 -0500 Subject: [PATCH] Injecting payment button, wasn't displaying when invoice already present Also button was not getting refresh on modal close --- BTCPayServer/wwwroot/shopify/btcpay-shopify.js | 2 ++ 1 file changed, 2 insertions(+) diff --git a/BTCPayServer/wwwroot/shopify/btcpay-shopify.js b/BTCPayServer/wwwroot/shopify/btcpay-shopify.js index ec5f47a78..2aab348e6 100644 --- a/BTCPayServer/wwwroot/shopify/btcpay-shopify.js +++ b/BTCPayServer/wwwroot/shopify/btcpay-shopify.js @@ -126,6 +126,7 @@ window.BTCPayShopifyIntegrationModule = function () { window.btcpay.onModalWillLeave(function () { modalShown = false; getOrCheckInvoice(true).then(function (d) { + buttonElement.innerHTML = payButtonHtml; handleInvoiceData(d, {backgroundCheck: true}) }); }); @@ -158,6 +159,7 @@ window.BTCPayShopifyIntegrationModule = function () { showPaymentInstructions(); window.onPayButtonClicked = onPayButtonClicked.bind(this); getOrCheckInvoice(true).then(function (d) { + injectPaymentButtonHtml(); handleInvoiceData(d, {backgroundCheck: true}) });