commit 6a53db16949a09da92ed75acec274c5308b379cc
parent a42306bf3e2b307a168d49b26236fe23d3f9ff37
Author: Florian Dold <florian@dold.me>
Date: Mon, 21 Aug 2023 13:36:14 +0200
tip->reward rename
Diffstat:
1 file changed, 8 insertions(+), 8 deletions(-)
diff --git a/talermerchantdemos/survey/survey.py b/talermerchantdemos/survey/survey.py
@@ -14,7 +14,7 @@
# GNU TALER; see the file COPYING. If not, see <http://www.gnu.org/licenses/>
#
# @author Marcello Stanisci
-# @brief Minimal Website to tip users who fill the survey.
+# @brief Minimal Website to reward users who fill the survey.
import os
import re
@@ -122,24 +122,24 @@ def favicon():
##
-# Tell the backend to 'authorize' a tip; this means that
+# Tell the backend to 'authorize' a reward; this means that
# the backend will allocate a certain amount to be later
# picked up by the wallet.
#
# @return the URL where to redirect the browser, in order
-# for the wallet to pick the tip up, or a error page
+# for the wallet to pick the reward up, or a error page
# otherwise.
@app.route("/<lang>/submit-survey", methods=["POST"])
def submit_survey(lang):
- tip_spec = dict(
+ reward_spec = dict(
amount=CURRENCY + ":1.0",
next_url=os.environ.get("TALER_ENV_URL_INTRO", "https://taler.net/"),
justification="Payment methods survey",
)
backend_resp = backend_post(
- INSTANCED_URL, "private/tips", tip_spec, auth_token=APIKEY
+ INSTANCED_URL, "private/rewards", reward_spec, auth_token=APIKEY
)
- return flask.redirect(backend_resp["tip_status_url"])
+ return flask.redirect(backend_resp["reward_status_url"])
##
@@ -196,7 +196,7 @@ def handler_405(e):
@app.errorhandler(BackendException)
def handler_backend_exception(e):
- # The tip reserve was never created
+ # The reward reserve was never created
if e.backend_json.get("code") == 2753:
t = flask.render_template(
"survey-error-graceful.html.j2",
@@ -205,7 +205,7 @@ def handler_backend_exception(e):
)
return flask.make_response(t, 500)
- # The tip reserve was never created
+ # The reward reserve was never created
if e.backend_json.get("code") == 2752:
t = flask.render_template(
"survey-error-graceful.html.j2",