diff options
author | Florian Dold <florian.dold@gmail.com> | 2020-08-19 16:11:45 +0530 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2020-08-19 16:11:45 +0530 |
commit | ae73a85e2047b405d1fe8cf78aa5556673eec0d5 (patch) | |
tree | 7add1951532267ca07bfd824ad2d5fb334cddbdf /talermerchantdemos | |
parent | 376aedb143a62bcd09b0b6eaf512bc2fa9ba9ed8 (diff) | |
download | taler-merchant-demos-ae73a85e2047b405d1fe8cf78aa5556673eec0d5.tar.gz taler-merchant-demos-ae73a85e2047b405d1fe8cf78aa5556673eec0d5.tar.bz2 taler-merchant-demos-ae73a85e2047b405d1fe8cf78aa5556673eec0d5.zip |
set cookie in the right place
Diffstat (limited to 'talermerchantdemos')
-rw-r--r-- | talermerchantdemos/blog/blog.py | 11 |
1 files changed, 6 insertions, 5 deletions
diff --git a/talermerchantdemos/blog/blog.py b/talermerchantdemos/blog/blog.py index 6c4c3ec..77d8813 100644 --- a/talermerchantdemos/blog/blog.py +++ b/talermerchantdemos/blog/blog.py @@ -218,7 +218,6 @@ def article(article_name, data=None): ) order_resp = backend_post(BACKEND_URL, "private/orders", dict(order=order)) order_id = order_resp["order_id"] - flask.request.set_cookie("order_id", path=f"/essay/{article_name}") # Ask the backend for the status of the payment pay_status = backend_get( @@ -237,7 +236,9 @@ def article(article_name, data=None): ) else: return render_article(article_name, data, order_id) - else: - # Redirect the browser to a page where the wallet can - # run the payment protocol. - return flask.redirect(pay_status["order_status_url"]) + + # Redirect the browser to a page where the wallet can + # run the payment protocol. + response = flask.redirect(pay_status["order_status_url"]) + response.set_cookie("order_id", order_id, path=f"/essay/{article_name}") + return response |