fix(payment_link): move redirection fn to global scope for open links (#5494)

This commit is contained in:
Kashif
2024-07-31 21:11:39 +05:30
committed by GitHub
parent 540ef071cb
commit 7ddfbf51c3

View File

@ -68,15 +68,15 @@ function initializeSDK() {
setTimeout(() => {
document.body.removeChild(shimmer);
}, 500);
}
/**
/**
* Use - redirect to /payment_link/status
*/
function redirectToStatus() {
function redirectToStatus() {
var arr = window.location.pathname.split("/");
arr.splice(0, 2);
arr.unshift("status");
arr.unshift("payment_link");
window.location.href = window.location.origin + "/" + arr.join("/");
}
}