From 8f8562705a75f3ea8de0e474cab843e8aa94f47d Mon Sep 17 00:00:00 2001 From: Kukks Date: Mon, 28 Sep 2020 10:39:26 +0200 Subject: [PATCH] Pass due amount from shopify UI in case of partial payments --- BTCPayServer/wwwroot/shopify/btcpay-shopify.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/BTCPayServer/wwwroot/shopify/btcpay-shopify.js b/BTCPayServer/wwwroot/shopify/btcpay-shopify.js index 3e8c7c507..1a2ff14ef 100644 --- a/BTCPayServer/wwwroot/shopify/btcpay-shopify.js +++ b/BTCPayServer/wwwroot/shopify/btcpay-shopify.js @@ -65,7 +65,7 @@ window.BTCPayShopifyIntegrationModule = function () { } function getOrCheckInvoice(backgroundCheck) { - const url = btcPayServerUrl + "/stores/" + storeId + "/integrations/shopify/" + shopify_order_id + (backgroundCheck ? "?checkonly=true" : ""); + const url = btcPayServerUrl + "/stores/" + storeId + "/integrations/shopify/" + shopify_order_id+"?amount="+Shopify.checkout.payment_due+ (backgroundCheck ? "&checkonly=true" : ""); return fetch(url, { method: "GET", mode: "cors", // no-cors, cors, *same-origin, @@ -155,7 +155,7 @@ window.BTCPayShopifyIntegrationModule = function () { insertElement(buttonElement, pageItems.orderConfirmed); } - if (["bitcoin", "btc", "btcpayserver", "btcpay server"].filter(value => pageItems.paymentMethod.innerText.toLowerCase().indexOf(value) !== -1).length === 0) { + if (["bitcoin", "btc"].filter(value => pageItems.paymentMethod.innerText.toLowerCase().indexOf(value) !== -1).length === 0) { return; } showPaymentInstructions();