From 7ad91a76cde9aad9b89e437b95a2455ef34be137 Mon Sep 17 00:00:00 2001 From: d11n Date: Tue, 14 Feb 2023 00:56:00 +0100 Subject: [PATCH] Checkout v2: FIx automatic redirect after paid (#4633) --- BTCPayServer/wwwroot/checkout-v2/checkout.js | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/BTCPayServer/wwwroot/checkout-v2/checkout.js b/BTCPayServer/wwwroot/checkout-v2/checkout.js index c9879cdb2..cb323a7c3 100644 --- a/BTCPayServer/wwwroot/checkout-v2/checkout.js +++ b/BTCPayServer/wwwroot/checkout-v2/checkout.js @@ -252,12 +252,12 @@ function initApp() { eventBus.$emit('data-fetched', this.srvModel); const self = this; - if (this.isPaid && data.redirectAutomatically && data.merchantRefLink) { + if (self.isPaid && data.redirectAutomatically && self.storeLink) { setTimeout(function () { - if (self.isModal && window.top.location === data.merchantRefLink){ + if (self.isModal && window.top.location === self.storeLink){ self.close(); } else { - window.top.location = data.merchantRefLink; + window.top.location = self.storeLink; } }, 2000); }