taler-docs

Documentation for GNU Taler components, APIs and protocols
Log | Files | Refs | README | LICENSE

commit 326f27dfab220beae53a76f72cfc648830359f39
parent 623e8aa6c81d3747564b48df44c61c99b6cbe99d
Author: Christian Grothoff <christian@grothoff.org>
Date:   Sun,  2 Feb 2025 17:08:26 +0100

clarify best ways to construct taler://pay URIs

Diffstat:
Mtaler-merchant-api-tutorial.rst | 21+++++++++++++++------
1 file changed, 15 insertions(+), 6 deletions(-)

diff --git a/taler-merchant-api-tutorial.rst b/taler-merchant-api-tutorial.rst @@ -265,8 +265,21 @@ Web shop, the easiest way is to simply redirect the browser to ``https://example.com/orders/$ORDER_ID``. That page will then trigger the Taler wallet. Here the backend generates the right logic to trigger the wallet, supporting the various types of Taler wallets in existence. Instead -of constructing the above URL by hand, it is best to obtain it by checking for -the payment status as described in the next section. +of constructing the above URL by hand, it is also possible to obtain +it by checking for the payment status as described in the next section. + +When manually constructing this URL, make sure to supply the +claim token (unless it was disabled) and **if** the backend is +running without TLS to use ``taler+http://`` (note that the +latter is only supported by wallets running in debug mode). + +.. note:: + A trivial way to obtain the correct ``payment_redirect_url`` + is to check the status of the payment (see below). + So if you are still unsure how to construct it, you can simply + ask the backend to do for you. However, in production you + should probably construct it manually and avoid the extra + request to the backend. Checking Payment Status and Prompting for Payment @@ -279,10 +292,6 @@ by the customer, ``/private/orders/$ORDER_ID`` will give the frontend a URL wallet to execute the payment. This is basically the ``https://example.com/orders/$ORDER_ID`` URL we discussed above. -Note that the best way to obtain the ``payment_redirect_url`` is to check the -status of the payment, even if you know that the user did not pay yet. There -are a few corner cases to consider when constructing this URL, so asking the -backend to do it is the safest method. .. code-block:: python