gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-merchant] branch master updated: properly construct URL inside JS


From: gnunet
Subject: [taler-merchant] branch master updated: properly construct URL inside JS
Date: Thu, 20 Aug 2020 14:19:11 +0200

This is an automated email from the git hooks/post-receive script.

dold pushed a commit to branch master
in repository merchant.

The following commit(s) were added to refs/heads/master by this push:
     new 9ed4a33  properly construct URL inside JS
9ed4a33 is described below

commit 9ed4a331019dab10c8bd37094e3dcde2efdac2e6
Author: Florian Dold <florian.dold@gmail.com>
AuthorDate: Thu Aug 20 17:49:07 2020 +0530

    properly construct URL inside JS
---
 contrib/offer_refund.en.must    | 2 +-
 contrib/request_payment.en.must | 5 +++--
 2 files changed, 4 insertions(+), 3 deletions(-)

diff --git a/contrib/offer_refund.en.must b/contrib/offer_refund.en.must
index 7961367..19af479 100644
--- a/contrib/offer_refund.en.must
+++ b/contrib/offer_refund.en.must
@@ -112,7 +112,7 @@ body {
     req.onerror = function () {
       setTimeout(check, delayMs);
     }
-    req.open("GET", checkUrl);
+    req.open("GET", checkUrl.href);
     req.send();
   }
 
diff --git a/contrib/request_payment.en.must b/contrib/request_payment.en.must
index 1d666fe..73fc455 100644
--- a/contrib/request_payment.en.must
+++ b/contrib/request_payment.en.must
@@ -90,7 +90,8 @@ body {
 <body>
 <script>
   let delayMs = 60000;
-  let checkUrl = "{{& order_status_url }}&timeout_ms=" + delayMs.toString();
+  let checkUrl = new URL("{{& order_status_url }}");
+  checkUrl.searchParams.set("timeout_ms", delayMs.toString());
   function check() {
     let req = new XMLHttpRequest();
     req.onreadystatechange = function () {
@@ -122,7 +123,7 @@ body {
       setTimeout(check, 5);
     }
     req.timeout = delayMs;
-    req.open("GET", checkUrl);
+    req.open("GET", checkUrl.href);
     req.send();
   }
   setTimeout(check, 5);

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]