diff options
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 |