merchant-frontend-examples

ZZZ: Inactive/Deprecated
Log | Files | Refs

commit f1d757ab32672cc4a84cc8d832c84fc478695e76
parent 47b1bdaefb0e3e5dc1e5b3a3f7f813f86f02167b
Author: Marcello Stanisci <marcello.stanisci@inria.fr>
Date:   Tue, 28 Mar 2017 21:26:54 +0200

"contract" gone from python tutorial, plus explanation
of proposal vs order vs contract.

Diffstat:
Mpython/doc/tutorial.texi | 24+++++++++++++++++++-----
1 file changed, 19 insertions(+), 5 deletions(-)

diff --git a/python/doc/tutorial.texi b/python/doc/tutorial.texi @@ -92,7 +92,7 @@ Taler with Web shops. It describes how to create a Web shop that processes payments with the help of a GNU Taler merchant @emph{backend}. In the second chapter, you will learn how to trigger the payment process from the Web site, how to communicate with the -backend, how to generate a contract and process the payment. +backend, how to generate a proposal and process the payment. @cindex examples @cindex git @@ -248,13 +248,27 @@ If the wallet is not present, the error message ``No wallet installed!'' will be shown and the Taler ``X-Taler-Contract-Url'' header and the 402 status code ought to be ignored by the browser. -@section A helper function to generate the proposed contract -The next step is to generate a proposal whenever the -wallet makes a GET @code{/generate-proposal} request. In our example, -this logic is implemented by the function @code{generate_proposal()}: +@section A helper function to generate the order + +We make distinction between @emph{three} different stages of what it +informally called "contract". + +In a very first stage, we call it the @emph{order}: that occurs when +the frontend generates the first JSON that misses some information +that the backend is supposed to add. When the backend completes the +order and signs it, we have a @emph{proposal}. The proposal is what +the user is prompted with, and allows them to confirm the purchase. +Once the user confirms the purchase, the wallet makes a signature over +the proposal, turning it into a @emph{contract}. + +The next step is to generate a proposal whenever the wallet makes a GET +@code{/generate-proposal} request. In our example, this logic is implemented +by the function @code{generate_proposal()}: @c FIXME: rename package to just 'taler' or 'gnu.taler'? (Check with Florian) @cindex contract +@cindex proposal +@cindex order @smallexample .. from pytaler import amount