taler-docs

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

commit e9d5f9c669acb4c480bdf5a0575374a693fb011b
parent 00609057f29f4335f3028e057c1425a4ef003db7
Author: Christian Grothoff <christian@grothoff.org>
Date:   Sat, 24 Sep 2022 17:20:04 +0200

fix secret-token

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

diff --git a/taler-merchant-api-tutorial.rst b/taler-merchant-api-tutorial.rst @@ -131,7 +131,7 @@ key in the ``Authorization`` header. The value of this header must be >>> import requests >>> requests.get("https://backend.demo.taler.net", - ... headers={"Authorization": "ApiKey sandbox"}) + ... headers={"Authorization": "secret-token:secret"}) <Response [200]> If an HTTP status code other than 200 is returned, something went wrong. @@ -226,7 +226,7 @@ A minimal Python snippet for creating an order would look like this: ... create_token=false) >>> response = requests.post("https://backend.demo.taler.net/private/orders", ... json=body, - ... headers={"Authorization": "ApiKey sandbox"}) + ... headers={"Authorization": "secret-token:secret"}) <Response [200]> @@ -282,7 +282,7 @@ backend to do it is the safest method. >>> import requests >>> r = requests.get("https://backend.demo.taler.net/private/orders/" + order_id, - ... headers={"Authorization": "ApiKey sandbox"}) + ... headers={"Authorization": "secret-token:secret"}) >>> print(r.json()) If the ``order_status`` field in the response is ``paid``, you will not @@ -350,7 +350,7 @@ This code snipped illustrates giving a refund: ... reason="Customer did not like the product") >>> requests.post("https://backend.demo.taler.net/private/orders/" ... + order_id + "/refund", json=refund_req, - ... headers={"Authorization": "ApiKey sandbox"}) + ... headers={"Authorization": "secret-token:secret"}) <Response [200]> .. Note:: @@ -439,7 +439,7 @@ funds available for tipping, query the ``/tip-query`` endpoint: >>> import requests >>> requests.get("https://backend.demo.taler.net/tip-query?instance=default", - ... headers={"Authorization": "ApiKey sandbox"}) + ... headers={"Authorization": "secret-token:secret"}) <Response [200]> .. _authorize-tip: @@ -474,7 +474,7 @@ This code snipped illustrates giving a tip: ... justification="User filled out survey", ... next_url="https://merchant.com/thanks.html") >>> requests.post("https://backend.demo.taler.net/tip-authorize", json=tip_req, - ... headers={"Authorization": "ApiKey sandbox"}) + ... headers={"Authorization": "secret-token:secret"}) <Response [200]> .. _Advanced-topics: