diff options
Diffstat (limited to 'talermerchantdemos/blog')
-rw-r--r-- | talermerchantdemos/blog/blog.py | 15 |
1 files changed, 2 insertions, 13 deletions
diff --git a/talermerchantdemos/blog/blog.py b/talermerchantdemos/blog/blog.py index 1e25555..defc158 100644 --- a/talermerchantdemos/blog/blog.py +++ b/talermerchantdemos/blog/blog.py @@ -212,7 +212,7 @@ def article(article_name, data=None): # bound to a browser. This forces re-play and prevents sharing the article # by just sharing the URL. session_id = flask.session.get("session_id") - order_id = flask.request.args.get("order_id") + order_id = flask.session.args.get("order_id") if not session_id: session_id = flask.session["session_id"] = str(uuid.uuid4()) @@ -235,9 +235,7 @@ def article(article_name, data=None): ) order_resp = backend_post(BACKEND_URL, "private/orders", dict(order=order)) order_id = order_resp["order_id"] - return flask.redirect( - flask.url_for("article", article_name=article_name, order_id=order_id) - ) + flask.session["order_id"] = order_id # Prepare data for the upcoming payment check. pay_status = backend_get( @@ -264,15 +262,6 @@ def article(article_name, data=None): # Finally return the article. return render_article(article_name, data, order_id) - if pay_status.get("already_paid_order_id") is not None: - return flask.redirect( - flask.url_for( - "article", - article_name=article_name, - order_id=pay_status.get("already_paid_order_id"), - ) - ) - ## # Redirect the browser to a page where the wallet can # run the payment protocol. |