From e9d5f9c669acb4c480bdf5a0575374a693fb011b Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sat, 24 Sep 2022 17:20:04 +0200 Subject: fix secret-token --- taler-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 index c66e701b..d45ed4fa 100644 --- 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"}) 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"}) @@ -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"}) .. 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"}) .. _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"}) .. _Advanced-topics: -- cgit v1.2.3