gnunet-svn
[Top][All Lists]
Advanced

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

[taler-merchant] branch master updated: start to have templates


From: gnunet
Subject: [taler-merchant] branch master updated: start to have templates
Date: Sun, 26 Jul 2020 15:29:30 +0200

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

grothoff pushed a commit to branch master
in repository merchant.

The following commit(s) were added to refs/heads/master by this push:
     new a6bc15b  start to have templates
a6bc15b is described below

commit a6bc15b77838981d705e647adb40af0a51621286
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Sun Jul 26 15:29:28 2020 +0200

    start to have templates
---
 .gitignore                   |  1 +
 Makefile.am                  |  6 ++--
 configure.ac                 |  1 +
 contrib/Makefile.am          |  3 ++
 contrib/offer_refund.must    | 28 ++++++++++++++++++
 contrib/request_payment.must | 69 ++++++++++++++++++++++++++++++++++++++++++++
 6 files changed, 105 insertions(+), 3 deletions(-)

diff --git a/.gitignore b/.gitignore
index f8fd450..14d6fd6 100644
--- a/.gitignore
+++ b/.gitignore
@@ -68,3 +68,4 @@ src/merchant-tools/taler-merchant-generate-payments
 src/merchant-tools/taler-merchant-benchmark
 uncrustify.cfg
 src/merchant-tools/taler-merchant-setup-reserve
+src/mustach/libmustach.a
diff --git a/Makefile.am b/Makefile.am
index ab67ba6..9a85ab1 100644
--- a/Makefile.am
+++ b/Makefile.am
@@ -8,9 +8,9 @@ else
 endif
 else
 if ENABLE_DOC
-  SUBDIRS = . src doc
+  SUBDIRS = . src contrib doc
 else
-  SUBDIRS = . src doc
+  SUBDIRS = . src contrib
 endif
 endif
 
@@ -23,7 +23,7 @@ EXTRA_DIST = \
  COPYING.AGPL \
  COPYING.LGPL \
  contrib/gnunet.tag \
- contrib/microhttpd.tag 
+ contrib/microhttpd.tag
 
 app:
        mkdir -p $(PACKAGE)-frontend-$(VERSION)-app
diff --git a/configure.ac b/configure.ac
index a57f2c3..562ebee 100644
--- a/configure.ac
+++ b/configure.ac
@@ -365,6 +365,7 @@ AM_CONDITIONAL([HAVE_EXPERIMENTAL], [test 
"x$enable_experimental" = "xyes"])
 
 
 AC_CONFIG_FILES([Makefile
+contrib/Makefile
 doc/Makefile
 doc/doxygen/Makefile
 src/Makefile
diff --git a/contrib/Makefile.am b/contrib/Makefile.am
new file mode 100644
index 0000000..589b36f
--- /dev/null
+++ b/contrib/Makefile.am
@@ -0,0 +1,3 @@
+dist_pkgdata_DATA = \
+  request_payment.must \
+  offer_refund.must
diff --git a/contrib/offer_refund.must b/contrib/offer_refund.must
new file mode 100644
index 0000000..913b6a5
--- /dev/null
+++ b/contrib/offer_refund.must
@@ -0,0 +1,28 @@
+{% extends "templates/base.html" %}
+
+{% block main %}
+
+<h1>Refund</h1>
+
+<div class="taler-installed-hide">
+  <p>
+  Looks like your browser doesn't support GNU Taler payments.  You can try
+  installing a <a href="https://taler.net/en/wallet.html";>wallet browser 
extension</a>.
+  </p>
+</div>
+
+<div>
+
+  <p>
+  You can use this QR code to get a refund with your mobile wallet:
+  </p>
+
+  {{ qrcode_svg | safe }}
+
+  <p>
+  Click <a href="{{ taler_refund_uri }}">this link</a> to open your system's 
Taler wallet if it exists.
+  </p>
+
+</div>
+
+{% endblock main %}
diff --git a/contrib/request_payment.must b/contrib/request_payment.must
new file mode 100644
index 0000000..6e050d0
--- /dev/null
+++ b/contrib/request_payment.must
@@ -0,0 +1,69 @@
+{% extends "templates/base.html" %}
+
+
+{% block meta %}
+<noscript>
+  <meta http-equiv="refresh" content="1">
+</noscript>
+{% endblock meta %}
+
+
+{% block scripts %}
+<script>
+  let checkUrl = decodeURIComponent("{{ check_status_url_enc }}");
+  let delayMs = 500;
+  function check() {
+    let req = new XMLHttpRequest();
+    req.onreadystatechange = function () {
+      if (req.readyState === XMLHttpRequest.DONE) {
+        if (req.status === 200) {
+          try {
+            let resp = JSON.parse(req.responseText);
+            if (resp.paid) {
+              document.location.reload(true);
+            }
+          } catch (e) {
+            console.error("could not parse response:", e);
+          }
+        }
+        setTimeout(check, delayMs);
+      }
+    };
+    req.onerror = function () {
+      setTimeout(check, delayMs);
+    }
+    req.open("GET", checkUrl);
+    req.send();
+  }
+
+  setTimeout(check, delayMs);
+</script>
+{% endblock scripts %}
+
+
+{% block main %}
+
+<h1>Payment Required</h1>
+
+<div class="taler-installed-hide">
+  <p>
+  Looks like your browser doesn't support GNU Taler payments.  You can try
+  installing a <a href="https://taler.net/en/wallet.html";>wallet browser 
extension</a>.
+  </p>
+</div>
+
+<div>
+
+  <p>
+  You can use this QR code to pay with your mobile wallet:
+  </p>
+
+  {{ qrcode_svg | safe }}
+
+  <p>
+  Click <a href="{{ taler_pay_uri }}">this link</a> to open your system's 
Taler wallet if it exists.
+  </p>
+
+</div>
+
+{% endblock main %}

-- 
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]