diff options
-rw-r--r-- | .gitignore | 1 | ||||
-rw-r--r-- | Makefile.am | 6 | ||||
-rw-r--r-- | configure.ac | 1 | ||||
-rw-r--r-- | contrib/Makefile.am | 3 | ||||
-rw-r--r-- | contrib/offer_refund.must | 28 | ||||
-rw-r--r-- | contrib/request_payment.must | 69 |
6 files changed, 105 insertions, 3 deletions
@@ -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 ab67ba64..9a85ab18 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 a57f2c3a..562ebee7 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 00000000..589b36f3 --- /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 00000000..913b6a5f --- /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 00000000..6e050d0f --- /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 %} |