diff options
author | Thien-Thi Nguyen <ttn@gnuvola.org> | 2020-12-04 04:36:55 -0500 |
---|---|---|
committer | Thien-Thi Nguyen <ttn@gnuvola.org> | 2020-12-04 04:36:55 -0500 |
commit | 610eb5c9076a7fa5495fb4b4ce7ff0aad11f5bee (patch) | |
tree | 1908211847a2baca2441023d1566063a7ed49f96 /taler-merchant-api-tutorial.rst | |
parent | 0584da4446ca4c129f7456d6e36b84df5aaa927e (diff) | |
download | docs-610eb5c9076a7fa5495fb4b4ce7ff0aad11f5bee.tar.gz docs-610eb5c9076a7fa5495fb4b4ce7ff0aad11f5bee.tar.bz2 docs-610eb5c9076a7fa5495fb4b4ce7ff0aad11f5bee.zip |
use ‘.. code-block:: python’ (six instances)
Diffstat (limited to 'taler-merchant-api-tutorial.rst')
-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", |