commit e67d5885304b78036db97b5a1ccff7da0e480f02
parent 1e32300d179d6a0b90078216f7129b99e6831459
Author: Florian Dold <florian.dold@gmail.com>
Date: Tue, 11 Aug 2020 22:12:46 +0530
revert to order ID in URL
Diffstat:
1 file changed, 2 insertions(+), 3 deletions(-)
diff --git 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.session.get("order_id")
+ order_id = flask.request.args.get("order_id")
if not session_id:
session_id = flask.session["session_id"] = str(uuid.uuid4())
@@ -235,9 +235,8 @@ def article(article_name, data=None):
)
order_resp = backend_post(BACKEND_URL, "private/orders", dict(order=order))
order_id = order_resp["order_id"]
- flask.session["order_id"] = order_id
- # Prepare data for the upcoming payment check.
+ # Ask the backend for the status of the payment
pay_status = backend_get(
BACKEND_URL, f"private/orders/{order_id}", params=dict(session_id=session_id)
)