mirror of
https://github.com/juspay/hyperswitch.git
synced 2025-11-02 04:04:43 +08:00
fix(payment_link): move redirection fn to global scope for open links (#5494)
This commit is contained in:
@ -68,15 +68,15 @@ function initializeSDK() {
|
|||||||
setTimeout(() => {
|
setTimeout(() => {
|
||||||
document.body.removeChild(shimmer);
|
document.body.removeChild(shimmer);
|
||||||
}, 500);
|
}, 500);
|
||||||
|
}
|
||||||
/**
|
|
||||||
* Use - redirect to /payment_link/status
|
/**
|
||||||
*/
|
* Use - redirect to /payment_link/status
|
||||||
function redirectToStatus() {
|
*/
|
||||||
var arr = window.location.pathname.split("/");
|
function redirectToStatus() {
|
||||||
arr.splice(0, 2);
|
var arr = window.location.pathname.split("/");
|
||||||
arr.unshift("status");
|
arr.splice(0, 2);
|
||||||
arr.unshift("payment_link");
|
arr.unshift("status");
|
||||||
window.location.href = window.location.origin + "/" + arr.join("/");
|
arr.unshift("payment_link");
|
||||||
}
|
window.location.href = window.location.origin + "/" + arr.join("/");
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user