[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-docs] branch master updated: use sandbox instance
From: |
gnunet |
Subject: |
[taler-docs] branch master updated: use sandbox instance |
Date: |
Mon, 09 Sep 2024 17:50:15 +0200 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository docs.
The following commit(s) were added to refs/heads/master by this push:
new 86be2dcc use sandbox instance
86be2dcc is described below
commit 86be2dcc9e8e1a448ef9b7b87b4c75670a470d38
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Mon Sep 9 17:50:04 2024 +0200
use sandbox instance
---
taler-merchant-api-tutorial.rst | 22 ++++++++++++----------
1 file changed, 12 insertions(+), 10 deletions(-)
diff --git a/taler-merchant-api-tutorial.rst b/taler-merchant-api-tutorial.rst
index 15e21e21..06534f98 100644
--- a/taler-merchant-api-tutorial.rst
+++ b/taler-merchant-api-tutorial.rst
@@ -123,14 +123,14 @@ Public Sandbox Backend and Authentication
How the frontend authenticates to the Taler backend depends on the
configuration. See :doc:`taler-merchant-manual`.
-The public sandbox backend https://backend.demo.taler.net/ uses an API
-key in the ``Authorization`` header. The value of this header must be
-``Bearer secret-token:sandbox`` for the public sandbox backend.
+The public sandbox backend https://backend.demo.taler.net/instances/sandbox/
+uses an API key in the ``Authorization`` header. The value of this header must
+be ``Bearer secret-token:sandbox`` for the public sandbox backend.
.. code-block:: python
>>> import requests
- >>> requests.get("https://backend.demo.taler.net/private/orders",
+ >>>
requests.get("https://backend.demo.taler.net/instances/sandbox/private/orders",
... headers={"Authorization": "Bearer secret-token:sandbox"})
<Response [200]>
@@ -138,9 +138,9 @@ If an HTTP status code other than 200 is returned,
something went wrong.
You should figure out what the problem is before continuing with this
tutorial.
-The sandbox backend https://backend.demo.taler.net/ uses ``KUDOS`` as an
-imaginary currency. Coins denominated in ``KUDOS`` can be withdrawn from
-https://bank.demo.taler.net/.
+The sandbox backend https://backend.demo.taler.net/instances/sandbox/ uses
+``KUDOS`` as an imaginary currency. Coins denominated in ``KUDOS`` can be
+withdrawn from https://bank.demo.taler.net/.
.. index:: instance
@@ -164,6 +164,8 @@ https://backend.demo.taler.net/:
- ``default`` (Kudos Inc.), reachable at https://backend.demo.taler.net/
+- ``sandbox`` (for testing.), reachable at
https://backend.demo.taler.net/instances/sandbox/
+
.. Note:: These are fictional merchants used for our demonstrators and
not affiliated with or officially approved by the respective projects.
@@ -224,7 +226,7 @@ A minimal Python snippet for creating an order would look
like this:
... summary="Donation",
...
fulfillment_url="https://example.com/thanks.html"),
... create_token=False)
- >>> response =
requests.post("https://backend.demo.taler.net/private/orders",
+ >>> response =
requests.post("https://backend.demo.taler.net/instances/sandbox/private/orders",
... json=body,
... headers={"Authorization": "Bearer secret-token:sandbox"})
<Response [200]>
@@ -285,7 +287,7 @@ backend to do it is the safest method.
.. code-block:: python
>>> import requests
- >>> r = requests.get("https://backend.demo.taler.net/private/orders/" +
order_id,
+ >>> r =
requests.get("https://backend.demo.taler.net/instances/sandbox/private/orders/"
+ order_id,
... headers={"Authorization": "Bearer
secret-token:sandbox"})
>>> print(r.json())
@@ -352,7 +354,7 @@ This code snipped illustrates giving a refund:
>>> import requests
>>> refund_req = dict(refund="KUDOS:10",
... reason="Customer did not like the product")
- >>> requests.post("https://backend.demo.taler.net/private/orders/"
+ >>>
requests.post("https://backend.demo.taler.net/instances/sandbox/private/orders/"
... + order_id + "/refund", json=refund_req,
... headers={"Authorization": "Bearer secret-token:sandbox"})
<Response [200]>
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-docs] branch master updated: use sandbox instance,
gnunet <=