diff options
-rw-r--r-- | taler-merchant-api-tutorial.rst | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/taler-merchant-api-tutorial.rst b/taler-merchant-api-tutorial.rst index 33e0f8e5..2070a943 100644 --- a/taler-merchant-api-tutorial.rst +++ b/taler-merchant-api-tutorial.rst @@ -127,7 +127,7 @@ The public sandbox backend https://backend.demo.taler.net/ uses an API key in the ``Authorization`` header. The value of this header must be ``ApiKey sandbox`` for the public sandbox backend. -:: +.. code-block:: python >>> import requests >>> requests.get("https://backend.demo.taler.net", @@ -217,7 +217,7 @@ manual for details. A minimal Python snippet for creating an order would look like this: -:: +.. code-block:: python >>> import requests >>> body = dict(order=dict(amount="KUDOS:10", @@ -278,7 +278,7 @@ 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 >>> import requests >>> r = requests.get("https://backend.demo.taler.net/private/orders/" + order_id, @@ -343,7 +343,7 @@ by the wallet. This code snipped illustrates giving a refund: -:: +.. code-block:: python >>> import requests >>> refund_req = dict(refund="KUDOS:10", @@ -435,7 +435,7 @@ Taler Merchant Operating Manual. To check if tipping is configured properly and if there are sufficient funds available for tipping, query the ``/tip-query`` endpoint: -:: +.. code-block:: python >>> import requests >>> requests.get("https://backend.demo.taler.net/tip-query?instance=default", @@ -463,7 +463,7 @@ up the tip. pick up tip This code snipped illustrates giving a tip: -:: +.. code-block:: python >>> import requests >>> tip_req = dict(amount="KUDOS:0.5", |