diff --git a/BTCPayServer/wwwroot/shopify/btcpay-shopify-checkout.js b/BTCPayServer/wwwroot/shopify/btcpay-shopify-checkout.js
index c736b9315..a4d8c494c 100644
--- a/BTCPayServer/wwwroot/shopify/btcpay-shopify-checkout.js
+++ b/BTCPayServer/wwwroot/shopify/btcpay-shopify-checkout.js
@@ -8,9 +8,6 @@
@@ -19,6 +16,10 @@
*/
! function () {
+ // extracted from shopify initialized page
+ const shopify_price = Shopify.checkout.payment_due;
+ const shopify_currency = Shopify.checkout.currency;
+
"use strict";
const pageElements = document.querySelector.bind(document),
insertElement = (document.querySelectorAll.bind(document),
@@ -81,11 +82,6 @@
pageItems.orderConfirmedDescription && (pageItems.orderConfirmedDescription.style.display = "none"),
buttonElement = document.createElement("div");
- const priceElement = pageItems.finalPrice || pageItems.price;
- var price = priceElement.innerText.replace(DEFAULT_CURRENCY_SYMBOL, "").replace(THOUSAND_DELIMITER, "");
- if (THOUSAND_DELIMITER === ".") {
- price = price.replace(",", "."); // 5.000,00 needs to become 5000.00
- }
const orderId = pageItems.orderNumber.innerText.replace("Order #", "");
const url = BTCPAYSERVER_URL + "/invoices" + "?storeId=" + STORE_ID + "&orderId=" + orderId + "&status=complete";
@@ -116,8 +112,8 @@
BTCPAYSERVER_URL,
STORE_ID,
{
- price: price,
- currency: DEFAULT_CURRENCY,
+ price: shopify_price,
+ currency: shopify_currency,
orderId: orderId
}
)