diff options
author | Florian Dold <florian.dold@gmail.com> | 2020-09-07 11:13:51 +0530 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2020-09-07 11:13:51 +0530 |
commit | f58fd14035cd10fff43ce08e79109438928d03b8 (patch) | |
tree | 9b411fcf03b226e0b5f1ccc461c145f2baa55f00 /contrib | |
parent | 388de375560063c882c71edfd3f2818556745a31 (diff) | |
download | merchant-f58fd14035cd10fff43ce08e79109438928d03b8.tar.gz merchant-f58fd14035cd10fff43ce08e79109438928d03b8.tar.bz2 merchant-f58fd14035cd10fff43ce08e79109438928d03b8.zip |
respect already_paid_order_id in order status page JS
Diffstat (limited to 'contrib')
-rw-r--r-- | contrib/request_payment.en.must | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/contrib/request_payment.en.must b/contrib/request_payment.en.must index 73fc455e..253c7d48 100644 --- a/contrib/request_payment.en.must +++ b/contrib/request_payment.en.must @@ -113,6 +113,16 @@ body { console.error("could not parse response:", e); } } + if (req.status === 402) { + try { + let resp = JSON.parse(req.responseText); + if (resp.already_paid_order_id && resp.fulfillment_url) { + window.location = resp.fulfillment_url; + } + } catch (e) { + console.error("could not parse response:", e); + } + } setTimeout(check, delayMs); } }; |