summaryrefslogtreecommitdiff
path: root/articles
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2016-08-26 16:11:17 +0200
committerChristian Grothoff <christian@grothoff.org>2016-08-26 16:11:17 +0200
commit4370bcc9ae9339de1cf220ad0b2cd3f53e86fff2 (patch)
tree35f2a2582a1c754d7906f07ab62d523e9c130786 /articles
parenta40d42d618cbd5ea9a42f0a2ad90e0f54f914ccf (diff)
parent9cbe7a498dfe35962bc76bcde8434c2d29eb14f1 (diff)
downloadwallet-core-4370bcc9ae9339de1cf220ad0b2cd3f53e86fff2.tar.gz
wallet-core-4370bcc9ae9339de1cf220ad0b2cd3f53e86fff2.tar.bz2
wallet-core-4370bcc9ae9339de1cf220ad0b2cd3f53e86fff2.zip
merge
Diffstat (limited to 'articles')
-rw-r--r--articles/ui/ui.tex19
1 files changed, 17 insertions, 2 deletions
diff --git a/articles/ui/ui.tex b/articles/ui/ui.tex
index e06240a57..c466331ec 100644
--- a/articles/ui/ui.tex
+++ b/articles/ui/ui.tex
@@ -856,13 +856,28 @@ 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
<!DOCTYPE html>
<html>
@@ -906,7 +921,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}.