Checkout v2: FIx automatic redirect after paid (#4633)

This commit is contained in:
d11n
2023-02-14 00:56:00 +01:00
committed by GitHub
parent a62b674722
commit 7ad91a76cd

View File

@@ -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);
}