From 824aa7a80b4c2e63d23985751f34c9492d396a36 Mon Sep 17 00:00:00 2001 From: Sebastian Date: Tue, 31 Aug 2021 00:43:59 -0300 Subject: remove qr javascript from body and add contract terms info --- OfferRefund.html | 139 +- OfferTip.html | 4539 +++++++++++++++++++++++++------------------------ RequestPayment.html | 137 +- ShowOrderDetails.html | 2652 +++++++++++++++++++++++++++-- 4 files changed, 4972 insertions(+), 2495 deletions(-) diff --git a/OfferRefund.html b/OfferRefund.html index e6f0f6a..6f121e5 100644 --- a/OfferRefund.html +++ b/OfferRefund.html @@ -2,11 +2,72 @@ - Refund available for {{ order_summary }} + Refund available for {{ order_summary }} + @@ -3419,7 +3419,7 @@ body { */ function Head({ order_summary }) { return a$2(y$1, null, - a$2("meta", { "http-equiv": "content-type", content: "text/html; UTF-8" }), + a$2("meta", { charSet: "UTF-8" }), a$2("meta", { name: "viewport", content: "width=device-width, initial-scale=1.0" }), a$2("noscript", null, a$2("meta", { "http-equiv": "refresh", content: "1" })), @@ -3427,7 +3427,7 @@ body { "Refund available for ", order_summary ? order_summary : `{{ order_summary }}`)); } - function OfferRefund({ refundURI, order_status_url }) { + function OfferRefund({ refundURI, qr_code, order_status_url }) { y(() => { let checkUrl; try { @@ -3453,7 +3453,7 @@ body { try { const resp = JSON.parse(req.responseText); if (!resp.refund_pending) { - window.location.reload(true); + window.location.reload(); } } catch (e) { @@ -3476,7 +3476,7 @@ body { a$2("h1", { style: { textAlign: 'center' } }, "Collect Taler refund"), a$2("div", { style: { textAlign: 'center' }, class: "taler-installed-hide" }, a$2("p", null, "Scan this QR code with your Taler mobile wallet:"), - a$2("div", { class: "qr" }, refundURI ? a$2(QR, { text: refundURI }) : `{{{ taler_refund_qrcode_svg }}}`), + a$2("div", { class: "qr", dangerouslySetInnerHTML: { __html: qr_code ? qr_code : `{{{ taler_refund_qrcode_svg }}}` } }), a$2("p", null, a$2("a", { class: "pure-button pure-button-active success", href: refundURI ? refundURI : `{{ taler_refund_uri }}` }, "Or open your Taller wallet")), a$2("p", null, @@ -3491,9 +3491,10 @@ body { if (os) { N(a$2(Head, { order_summary: os }), document.head); } - const ru = fromLocation.get('refund_uri') || undefined; + const uri = fromLocation.get('refund_uri') || undefined; const osu = fromLocation.get('order_status_url') || undefined; - N(a$2(OfferRefund, { refundURI: ru, order_status_url: osu }), document.body); + const qr_code = uri ? m$1(a$2(QR, { text: uri })) : undefined; + N(a$2(OfferRefund, { refundURI: uri, order_status_url: osu, qr_code: qr_code }), document.body); } catch (e) { console.error("got error", e); diff --git a/OfferTip.html b/OfferTip.html index 5ca82ec..64bbddb 100644 --- a/OfferTip.html +++ b/OfferTip.html @@ -2,11 +2,72 @@ - Tip available + Tip available + -

Order details

This is the default status page for your order for {{ order_summary }}.

Refund status

The merchant has granted you refunds on the purchase of {{ refund_amount }}.

Full contract details


+    

Order details

This is the default status page for your order for {{ order_summary }}.

Refund status

The merchant has granted you refunds on the purchase of {{ refund_amount }}.

Full contract details

amount{{ contract_terms.amount }}
summary{{ contract_terms.summary }}
pay deadline{{ contract_terms.pay_deadline.t_ms }}
merchant name{{ contract_terms.merchant.name }}
{{{contract_terms!stringify }}}
@@ -3419,7 +3419,7 @@ body { */ function Head({ order_summary }) { return a$2(y$1, null, - a$2("meta", { "http-equiv": "content-type", content: "text/html; UTF-8" }), + a$2("meta", { charSet: "UTF-8" }), a$2("meta", { name: "viewport", content: "width=device-width, initial-scale=1.0" }), a$2("noscript", null, a$2("meta", { "http-equiv": "refresh", content: "1" })), @@ -3427,7 +3427,7 @@ body { "Payment requested for ", order_summary ? order_summary : `{{ order_summary }}`)); } - function RequestPayment({ payURI, order_status_url }) { + function RequestPayment({ payURI, qr_code, order_status_url }) { y(() => { const longpollDelayMs = 60 * 1000; let checkUrl; @@ -3502,7 +3502,7 @@ body { a$2("h1", { style: { textAlign: 'center' } }, "Pay with Taler"), a$2("div", { style: { textAlign: 'center' }, class: "taler-installed-hide" }, a$2("p", null, "Scan this QR code with your mobile wallet:"), - a$2("div", { class: "qr" }, payURI ? a$2(QR, { text: payURI }) : `{{{ taler_pay_qrcode_svg }}}`), + a$2("div", { class: "qr", dangerouslySetInnerHTML: { __html: qr_code ? qr_code : `{{{ taler_pay_qrcode_svg }}}` } }), a$2("p", null, a$2("a", { class: "pure-button pure-button-active success", href: payURI ? payURI : `{{ taler_pay_uri }}` }, "Or open your Taller wallet")), a$2("p", null, @@ -3517,9 +3517,10 @@ body { if (os) { N(a$2(Head, { order_summary: os }), document.head); } - const pu = fromLocation.get('pay_uri') || undefined; + const uri = fromLocation.get('pay_uri') || undefined; const osu = fromLocation.get('order_status_url') || undefined; - N(a$2(RequestPayment, { payURI: pu, order_status_url: osu }), document.body); + const qr_code = uri ? m$1(a$2(QR, { text: uri })) : undefined; + N(a$2(RequestPayment, { payURI: uri, order_status_url: osu, qr_code: qr_code }), document.body); } catch (e) { console.error("got error", e); diff --git a/ShowOrderDetails.html b/ShowOrderDetails.html index b511f5b..f80e866 100644 --- a/ShowOrderDetails.html +++ b/ShowOrderDetails.html @@ -2,11 +2,72 @@ - Status of your order for {{ order_summary }} + Status of your order for {{ order_summary }} + -

Order details

This is the default status page for your order for {{ order_summary }}.

Refund status

The merchant has granted you refunds on the purchase of {{ refund_amount }}.

Full contract details


+    

Order details

This is the default status page for your order for {{ order_summary }}.

Refund status

The merchant has granted you refunds on the purchase of {{ refund_amount }}.

Full contract details

amount{{ contract_terms.amount }}
summary{{ contract_terms.summary }}
pay deadline{{ contract_terms.pay_deadline.t_ms }}
merchant name{{ contract_terms.merchant.name }}
{{{contract_terms!stringify }}}
-- cgit v1.2.3