diff options
author | Christian Grothoff <christian@grothoff.org> | 2017-10-15 17:13:58 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2017-10-15 17:13:58 +0200 |
commit | fbd4260ef9d26c017462de0c61a1148886e77c65 (patch) | |
tree | 7bca90b340fde36bea81520718e15ce779efe9e5 /php/doc/inline-proposals.texi | |
parent | 39074ad2b66370599396fbb1e4a1835ec7c9d5fe (diff) | |
download | merchant-frontend-examples-fbd4260ef9d26c017462de0c61a1148886e77c65.tar.gz merchant-frontend-examples-fbd4260ef9d26c017462de0c61a1148886e77c65.tar.bz2 merchant-frontend-examples-fbd4260ef9d26c017462de0c61a1148886e77c65.zip |
clean up tutorials
Diffstat (limited to 'php/doc/inline-proposals.texi')
-rw-r--r-- | php/doc/inline-proposals.texi | 22 |
1 files changed, 22 insertions, 0 deletions
diff --git a/php/doc/inline-proposals.texi b/php/doc/inline-proposals.texi new file mode 100644 index 0000000..3613e9a --- /dev/null +++ b/php/doc/inline-proposals.texi @@ -0,0 +1,22 @@ +@node Inlining proposals in HTTP headers +@section Inlining proposals in HTTP headers +@cindex optimization +@cindex contract + +In the example in @ref{Prompting for payment}, we told the wallet the URL +from where it should fetch the proposal. Instead of specifying the proposal +via an URL, it is also possible to inline short proposals directly. + +That may be accomplished by the frontend including the @code{X-Taler-Proposal} +HTTP header, whenever the requested page is meant to trigger a payment. +The example shown below may be an alternative version of @code{/donate.php}, +which implements inline contracts. + +@smallexample +// ../inline.php +@verbatiminclude ../inline.php +@end smallexample + +The wallet will then look for the @code{X-Taler-Proposal} header, and fetch the +inlined contract if this header is found. Please note that this feature is not +yet implemented in the wallet. |