From 7d31c03da1dc3c4862c6d23c428aa0db12537560 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Fri, 26 Aug 2016 16:04:12 +0200 Subject: reorder figs --- articles/ui/ui.tex | 100 +++++++++++++++++++++++++---------------------------- 1 file changed, 48 insertions(+), 52 deletions(-) (limited to 'articles') diff --git a/articles/ui/ui.tex b/articles/ui/ui.tex index 1743937e3..63f7ddb0f 100644 --- a/articles/ui/ui.tex +++ b/articles/ui/ui.tex @@ -697,7 +697,7 @@ customers, and may help create a competitive market. \subsection{Spending coins} % \tinyskip -\begin{figure}[t!] +\begin{figure}[p!] \subfloat[Select article][Select article. \\ Generated by Web shop.]{ \includegraphics[width=0.30\textwidth]{figs/cart.png} \label{subfig:cart}} \hfill @@ -743,7 +743,7 @@ merchant, the customer may choose to cover them. morestring=[b]" } -\begin{figure*}[t!] +\begin{figure*}[p!] \lstset{language=HTML5} \lstinputlisting{figs/taler-presence-js.html} \caption{Sample code to detect the Taler wallet. Allowing the @@ -754,10 +754,27 @@ merchant, the customer may choose to cover them. \end{figure*} -\begin{figure*}[t!] +\begin{figure*}[p!] + \lstset{language={}} +\begin{lstlisting} +HTTP/1.1 402 Payment Required +Content-Type: text/html; charset=UTF-8 +X-Taler-Contract-Url: https://shop/generate-contract/42 + + + + + You do not seem to have Taler installed, here are other payment options ... + +\end{lstlisting} + \caption{Sample HTTP response to prompt the wallet to show an offer.} + \label{listing:http-contract} +\end{figure*} + +\begin{figure*}[p!] \lstset{language=HTML5} \lstinputlisting{figs/taler-contract.html} - \caption{Sample code to pass a contract to the Taler wallet. + \caption{Sample JavaScript code to prompt the wallet to show an offer. Here, the contract is fetched on-demand from the server. The {\tt taler\_pay()} function needs to be invoked when the user triggers the checkout.} @@ -804,27 +821,6 @@ a Taler wallet is installed (as it is in Figure~\ref{fig:shopping}). \label{listing:json-contract} \end{figure*} -\begin{figure*}[t!] - \lstset{language={}} -\begin{lstlisting} -HTTP/1.1 402 Payment Required -Content-Type: text/html; charset=UTF-8 -X-Taler-Contract-Url: https://shop/generate-contract/42 -... - - - - ... - - You do not seem to have Taler installed, here are - other payment options: - ... - -\end{lstlisting} - \caption{Sample HTTP response for a Web resource that requires a payment.} - \label{listing:http-contract} -\end{figure*} - \subsubsection{Offer} The offer URL of the Web shop can then initiate payments by sending a @@ -859,6 +855,33 @@ the {\em fulfillment} URL provided by the merchant in the contract \subsubsection{Fulfillment} +\begin{figure*}[t!] + \lstset{language={}} +\begin{lstlisting} +HTTP/1.1 402 Payment Required +Content-Type: text/html; charset=UTF-8 +X-Taler-Contract-Hash: 2BAH2AT4GSG5JRM2W4YWTSYGY66EK4X8CX2V69D5VF7XV703AJMG +X-Taler-Offer-Url: https://shop/article/42 +X-Taler-Pay-Url: https://shop/pay +... + + + + ... + + You do not seem to have Taler installed, here are + other payment options: + ... + +\end{lstlisting} +\caption{Sample HTTP response when the user agent navigates to a fulfillment + URL without the session state that indicates they have paid for the resource. + Note that unlike in Listing~\ref{listing:http-contract}, the response + references a contract that typically is already known to the wallet via its + hash code.} + \label{listing:http-execute} +\end{figure*} + The fulfillment URL uniquely identifies a purchase by some customer, while the offer URL identifies a generic offer that is not specific to a customer. The purchase identified by a fulfillment URL may have @@ -907,33 +930,6 @@ already approved, for example because the user obtained the link from another user, the wallet navigates to the offer URL included in the header. -\begin{figure*}[t!] - \lstset{language={}} -\begin{lstlisting} -HTTP/1.1 402 Payment Required -Content-Type: text/html; charset=UTF-8 -X-Taler-Contract-Hash: 2BAH2AT4GSG5JRM2W4YWTSYGY66EK4X8CX2V69D5VF7XV703AJMG -X-Taler-Offer-Url: https://shop/article/42 -X-Taler-Pay-Url: https://shop/pay -... - - - - ... - - You do not seem to have Taler installed, here are - other payment options: - ... - -\end{lstlisting} -\caption{Sample HTTP response when the user agent navigates to a fulfillment - URL without the session state that indicates they have paid for the resource. - Note that unlike in Listing~\ref{listing:http-contract}, the response - references a contract that typically is already known to the wallet via its - hash code.} - \label{listing:http-execute} -\end{figure*} - \subsubsection{Discussion} Various failure modes are considered in this design: -- cgit v1.2.3 From 9cbe7a498dfe35962bc76bcde8434c2d29eb14f1 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Fri, 26 Aug 2016 16:10:28 +0200 Subject: js payment execution --- articles/ui/ui.tex | 19 +++++++++++++++++-- 1 file changed, 17 insertions(+), 2 deletions(-) (limited to 'articles') diff --git a/articles/ui/ui.tex b/articles/ui/ui.tex index 63f7ddb0f..bac62d80b 100644 --- a/articles/ui/ui.tex +++ b/articles/ui/ui.tex @@ -855,14 +855,29 @@ the {\em fulfillment} URL provided by the merchant in the contract \subsubsection{Fulfillment} +\begin{figure*}[t!] + \lstset{language=HTML5} +\begin{lstlisting} + taler.executePayment("2BAH2AT4GSG5JRM2W4YWTSYGY66EK4X8CX2V69D5VF7XV703AJMG", + "https://shop/pay", + "https://shop/article/42", + (err) => { + alert("Sending payment failed"); + }); +\end{lstlisting} +\caption{Sample JavaScript code to trigger (re-)sending a payment to the merchant.} + \label{listing:javascript-execute} +\end{figure*} + + \begin{figure*}[t!] \lstset{language={}} \begin{lstlisting} HTTP/1.1 402 Payment Required Content-Type: text/html; charset=UTF-8 X-Taler-Contract-Hash: 2BAH2AT4GSG5JRM2W4YWTSYGY66EK4X8CX2V69D5VF7XV703AJMG -X-Taler-Offer-Url: https://shop/article/42 X-Taler-Pay-Url: https://shop/pay +X-Taler-Offer-Url: https://shop/article/42 ... @@ -910,7 +925,7 @@ lost,\footnote{This can happen when when privacy conscious users browser) do not support persistent (non-session) cookies.} the Web store responds by (again) triggering a payment process (either via JavaScript or using {\tt 402 Payment Required}, see -Figure~\ref{listing:http-execute}). However, unlike the response from +Figures~\ref{listing:javascript-execute} and~\ref{listing:http-execute}). However, unlike the response from the offer URL, the 402 response from the fulfillment page includes the headers {\tt X-Taler-Contract-Hash}, {\tt X-Taler-Pay-Url} and {\tt X-Taler-Offer-Url}. -- cgit v1.2.3 From a40d42d618cbd5ea9a42f0a2ad90e0f54f914ccf Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Fri, 26 Aug 2016 16:10:48 +0200 Subject: cut --- articles/ui/ui.tex | 8 ++------ 1 file changed, 2 insertions(+), 6 deletions(-) (limited to 'articles') diff --git a/articles/ui/ui.tex b/articles/ui/ui.tex index 63f7ddb0f..e06240a57 100644 --- a/articles/ui/ui.tex +++ b/articles/ui/ui.tex @@ -860,18 +860,14 @@ the {\em fulfillment} URL provided by the merchant in the contract \begin{lstlisting} HTTP/1.1 402 Payment Required Content-Type: text/html; charset=UTF-8 -X-Taler-Contract-Hash: 2BAH2AT4GSG5JRM2W4YWTSYGY66EK4X8CX2V69D5VF7XV703AJMG +X-Taler-Contract-Hash: 2BAH2AT4GSG5JRM2W4YWTSYGY66EK4X8CX2V69D5VF7XV703AJMG... X-Taler-Offer-Url: https://shop/article/42 X-Taler-Pay-Url: https://shop/pay -... - ... - You do not seem to have Taler installed, here are - other payment options: - ... + You do not seem to have Taler installed, here are other payment options ... \end{lstlisting} \caption{Sample HTTP response when the user agent navigates to a fulfillment -- cgit v1.2.3 From 64373e23adb2094a02f8e0f20bfdf73939a6c01a Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Fri, 26 Aug 2016 16:16:48 +0200 Subject: put an actual fulfillment URL in the contract --- articles/ui/ui.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'articles') diff --git a/articles/ui/ui.tex b/articles/ui/ui.tex index c466331ec..9a0038755 100644 --- a/articles/ui/ui.tex +++ b/articles/ui/ui.tex @@ -804,7 +804,7 @@ a Taler wallet is installed (as it is in Figure~\ref{fig:shopping}). "exchanges":[{"master_pub":"1T5FA8VQHMMKBHDMYPRZA2ZFK2S63AKF0YTHJZWFKF45K2JGC8H0", "url":"https://exchange/"}], "expiry":"/Date(1480119270)/", - "fulfillment_url": "https://shop/essay/42", + "fulfillment_url": "https://shop/article/42?tid=249960194066269?time=1471479270", "max_fee":{"currency":"EUR","fraction":01,"value":0}, "merchant":{"address":"Mailbox 4242","jurisdiction":"Jersey","name":"Shop Inc."}, "merchant_pub":"Y1ZAR5346J3ZTEXJCHQY9NJN78EZ2HSKZK8M0MYTNRJG5N0HD520", -- cgit v1.2.3 From 2f4aaca8502a60cabdfec6d011141d2604f08a0b Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Fri, 26 Aug 2016 16:17:11 +0200 Subject: compress --- articles/ui/ui.tex | 9 +++------ 1 file changed, 3 insertions(+), 6 deletions(-) (limited to 'articles') diff --git a/articles/ui/ui.tex b/articles/ui/ui.tex index c466331ec..1ec74dbf9 100644 --- a/articles/ui/ui.tex +++ b/articles/ui/ui.tex @@ -859,13 +859,10 @@ the {\em fulfillment} URL provided by the merchant in the contract \lstset{language=HTML5} \begin{lstlisting} taler.executePayment("2BAH2AT4GSG5JRM2W4YWTSYGY66EK4X8CX2V69D5VF7XV703AJMG", - "https://shop/pay", - "https://shop/article/42", - (err) => { - alert("Sending payment failed"); - }); + "https://shop/pay", "https://shop/article/42", + (err) => { alert("Sending payment failed"); }); \end{lstlisting} -\caption{Sample JavaScript code to trigger (re-)sending a payment to the merchant.} +\caption{Sample JavaScript code to trigger transmission of a payment to the merchant.} \label{listing:javascript-execute} \end{figure*} -- cgit v1.2.3 From 8258db6b55d7672d8174b7da53be7e933eeb7fd8 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Fri, 26 Aug 2016 16:17:50 +0200 Subject: url syntax --- articles/ui/ui.tex | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'articles') diff --git a/articles/ui/ui.tex b/articles/ui/ui.tex index edbd02149..5060de2ee 100644 --- a/articles/ui/ui.tex +++ b/articles/ui/ui.tex @@ -804,7 +804,7 @@ a Taler wallet is installed (as it is in Figure~\ref{fig:shopping}). "exchanges":[{"master_pub":"1T5FA8VQHMMKBHDMYPRZA2ZFK2S63AKF0YTHJZWFKF45K2JGC8H0", "url":"https://exchange/"}], "expiry":"/Date(1480119270)/", - "fulfillment_url": "https://shop/article/42?tid=249960194066269?time=1471479270", + "fulfillment_url": "https://shop/article/42?tid=249960194066269&time=1471479270", "max_fee":{"currency":"EUR","fraction":01,"value":0}, "merchant":{"address":"Mailbox 4242","jurisdiction":"Jersey","name":"Shop Inc."}, "merchant_pub":"Y1ZAR5346J3ZTEXJCHQY9NJN78EZ2HSKZK8M0MYTNRJG5N0HD520", -- cgit v1.2.3 From 9d8ee1719114b02b14184bdc450fff8a6cdcd0a0 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Fri, 26 Aug 2016 16:25:33 +0200 Subject: plantuml / autonumber --- articles/ui/figs/paypal.pdf | Bin 24305 -> 182405 bytes articles/ui/figs/paypal.pml | 2 +- articles/ui/figs/taler-pay.pdf | Bin 169595 -> 172900 bytes articles/ui/figs/taler-pay.pml | 1 + articles/ui/figs/taler-withdraw.pdf | Bin 123645 -> 126620 bytes articles/ui/figs/taler-withdraw.pml | 1 + 6 files changed, 3 insertions(+), 1 deletion(-) (limited to 'articles') diff --git a/articles/ui/figs/paypal.pdf b/articles/ui/figs/paypal.pdf index 1145b50c4..d1ee29218 100644 Binary files a/articles/ui/figs/paypal.pdf and b/articles/ui/figs/paypal.pdf differ diff --git a/articles/ui/figs/paypal.pml b/articles/ui/figs/paypal.pml index 040bf6208..2820f2742 100644 --- a/articles/ui/figs/paypal.pml +++ b/articles/ui/figs/paypal.pml @@ -1,7 +1,7 @@ # FROM: https://github.com/w3c/webpayments/tree/gh-pages/PaymentFlows @startuml -!includeurl https://raw.githubusercontent.com/w3c/webpayments/gh-pages/PaymentFlows/skin.ipml +autonumber Participant "Payee (Merchant) Site" as Payee Actor "Payer (Shopper) Browser" as Payer diff --git a/articles/ui/figs/taler-pay.pdf b/articles/ui/figs/taler-pay.pdf index 546e2b7e2..0856fa859 100644 Binary files a/articles/ui/figs/taler-pay.pdf and b/articles/ui/figs/taler-pay.pdf differ diff --git a/articles/ui/figs/taler-pay.pml b/articles/ui/figs/taler-pay.pml index 46d0602d3..93b21f856 100644 --- a/articles/ui/figs/taler-pay.pml +++ b/articles/ui/figs/taler-pay.pml @@ -1,4 +1,5 @@ @startuml +autonumber Actor "Payer (Shopper) Browser" as Payer Participant "Payee (Merchant) Site" as Payee diff --git a/articles/ui/figs/taler-withdraw.pdf b/articles/ui/figs/taler-withdraw.pdf index 334a021f3..d1cd720d2 100644 Binary files a/articles/ui/figs/taler-withdraw.pdf and b/articles/ui/figs/taler-withdraw.pdf differ diff --git a/articles/ui/figs/taler-withdraw.pml b/articles/ui/figs/taler-withdraw.pml index 8984c4b80..33f5dac0b 100644 --- a/articles/ui/figs/taler-withdraw.pml +++ b/articles/ui/figs/taler-withdraw.pml @@ -1,4 +1,5 @@ @startuml +autonumber Actor "Customer Browser" as Customer Participant "Bank Site" as Bank -- cgit v1.2.3