diff options
author | Florian Dold <florian.dold@gmail.com> | 2020-10-08 20:54:23 +0530 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2020-10-08 20:54:23 +0530 |
commit | 3577c4d18830219d83ec1ba4ef9d35480a2db787 (patch) | |
tree | 1ded0d101dd933c5a82510f0ced77852181947d8 /contrib/request_payment.en.must | |
parent | 7d81706ca0d905a2d7e8c7c18a6e2d48d0a67bae (diff) | |
download | merchant-3577c4d18830219d83ec1ba4ef9d35480a2db787.tar.gz merchant-3577c4d18830219d83ec1ba4ef9d35480a2db787.tar.bz2 merchant-3577c4d18830219d83ec1ba4ef9d35480a2db787.zip |
replace location to avoid history loop
Diffstat (limited to 'contrib/request_payment.en.must')
-rw-r--r-- | contrib/request_payment.en.must | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/contrib/request_payment.en.must b/contrib/request_payment.en.must index 253c7d48..ca5ac637 100644 --- a/contrib/request_payment.en.must +++ b/contrib/request_payment.en.must @@ -98,7 +98,7 @@ body { if (req.readyState === XMLHttpRequest.DONE) { if (req.status === 200) { try { - document.location.reload(true); + window.location.reload(true); } catch (e) { console.error("could not parse response:", e); } @@ -107,7 +107,7 @@ body { try { let resp = JSON.parse(req.responseText); if (resp.fulfillment_url) { - window.location = resp.fulfillment_url; + window.location.replace(resp.fulfillment_url); } } catch (e) { console.error("could not parse response:", e); @@ -117,7 +117,7 @@ body { try { let resp = JSON.parse(req.responseText); if (resp.already_paid_order_id && resp.fulfillment_url) { - window.location = resp.fulfillment_url; + window.location.replace(resp.fulfillment_url); } } catch (e) { console.error("could not parse response:", e); |