From 3d6be0c1f78f8771697f2bd474d3cff92daf32a7 Mon Sep 17 00:00:00 2001 From: Florian Dold Date: Tue, 27 Aug 2019 00:28:50 +0200 Subject: simplify / adapt to backend changes --- talerblog/blog/blog.py | 19 +++++++++---------- 1 file changed, 9 insertions(+), 10 deletions(-) (limited to 'talerblog') diff --git a/talerblog/blog/blog.py b/talerblog/blog/blog.py index 1785f77..90ea11f 100644 --- a/talerblog/blog/blog.py +++ b/talerblog/blog/blog.py @@ -233,6 +233,14 @@ def get_qrcode_svg(data): img = qrcode.make(data, image_factory=factory) return lxml.etree.tostring(img.get_image()).decode("utf-8") + +## +# This endpoint is used by the payment request page +# to check if the payment has been completed via the QR code. +@app.route("/check-status//") +def check_status(order_id, session_id): + pass + ## # Trigger a article purchase. The logic follows the main steps: # @@ -261,7 +269,6 @@ def article(article_name, data=None): # by just sharing the URL. session_id = flask.session.get("session_id") order_id = flask.request.args.get("order_id") - session_sig = flask.request.args.get("session_sig") if not session_id: session_id = flask.session["session_id"] = str(uuid.uuid4()) @@ -286,19 +293,11 @@ def article(article_name, data=None): article_name=article_name, order_id=order_id)) - ## - # The resource URL uniquely identifies the Web resource that - # the customer is paying for, and is used to detect that an - # article has already been puchased when the cookie was lost. - resource_url = flask.request.base_url - ## # Prepare data for the upcoming payment check. pay_params = dict(instance=INSTANCE, order_id=order_id, - resource_url=resource_url, - session_id=session_id, - session_sig=session_sig) + session_id=session_id) pay_status = backend_get("check-payment", pay_params) -- cgit v1.2.3