diff options
author | Florian Dold <florian@dold.me> | 2023-08-21 13:36:14 +0200 |
---|---|---|
committer | Florian Dold <florian@dold.me> | 2023-08-21 13:36:14 +0200 |
commit | 6a53db16949a09da92ed75acec274c5308b379cc (patch) | |
tree | a8084f4bc88383fd2e2ef6ddc0710b71306a8273 | |
parent | a42306bf3e2b307a168d49b26236fe23d3f9ff37 (diff) | |
download | taler-merchant-demos-6a53db16949a09da92ed75acec274c5308b379cc.tar.gz taler-merchant-demos-6a53db16949a09da92ed75acec274c5308b379cc.tar.bz2 taler-merchant-demos-6a53db16949a09da92ed75acec274c5308b379cc.zip |
tip->reward rename
-rw-r--r-- | talermerchantdemos/survey/survey.py | 16 |
1 files changed, 8 insertions, 8 deletions
diff --git a/talermerchantdemos/survey/survey.py b/talermerchantdemos/survey/survey.py index ec325a7..b9fb3de 100644 --- 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", |