summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--.gitignore1
-rw-r--r--talermerchantdemos/blog/blog.py14
2 files changed, 6 insertions, 9 deletions
diff --git a/.gitignore b/.gitignore
index 893466f..e368d55 100644
--- a/.gitignore
+++ b/.gitignore
@@ -7,3 +7,4 @@ dist/
.vscode
*.mo
/local/
+/taler.conf
diff --git a/talermerchantdemos/blog/blog.py b/talermerchantdemos/blog/blog.py
index a0ec3ff..bcd1bb8 100644
--- a/talermerchantdemos/blog/blog.py
+++ b/talermerchantdemos/blog/blog.py
@@ -381,8 +381,7 @@ def article(article_name, lang=None, data=None):
# Disabled for now, see https://bugs.gnunet.org/view.php?id=8137
# and https://bugs.gnunet.org/view.php?id=8353
- # new_if_refunded = request.args.get("new_if_refunded")
- new_if_refunded = "no"
+ new_if_refunded = request.args.get("new_if_refunded")
current_order_id = flask.request.cookies.get("order_id")
article_url = flask.request.base_url
@@ -436,23 +435,20 @@ def article(article_name, lang=None, data=None):
# Checking repurchase case. That happens when the client
# visits this page in the same session where the article
# was paid already.
- # ai = pay_status.get("already_paid_order_id")
- # au = pay_status.get("already_paid_fulfillment_url")
+ ai = current_order.get("already_paid_order_id")
+ au = current_order.get("already_paid_fulfillment_url")
- # FIXME: ignoring becuase of https://bugs.gnunet.org/view.php?id=8353
- ai = None
- au = None
if ai is not None:
print("== Merchant says 'see other': ", ai, au)
response = flask.redirect(article_url)
response.set_cookie(
"order_id",
- order_id,
+ ai,
path=urllib.parse.quote(url_for ('index') + f"essay/{article_name}")
)
response.set_cookie(
"order_id",
- order_id,
+ ai,
path=urllib.parse.quote(url_for ('index') + f"{lang}/essay/{article_name}")
)
return response