gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[taler-taler-merchant-demos] branch master updated: fix call to old merc


From: gnunet
Subject: [taler-taler-merchant-demos] branch master updated: fix call to old merchant API
Date: Thu, 20 Aug 2020 10:40:54 +0200

This is an automated email from the git hooks/post-receive script.

dold pushed a commit to branch master
in repository taler-merchant-demos.

The following commit(s) were added to refs/heads/master by this push:
     new 09ab6be  fix call to old merchant API
09ab6be is described below

commit 09ab6be3195bf555172255ed4abca3d93f6bb9b3
Author: Florian Dold <florian.dold@gmail.com>
AuthorDate: Thu Aug 20 14:10:49 2020 +0530

    fix call to old merchant API
---
 talermerchantdemos/blog/blog.py | 10 ++++++----
 1 file changed, 6 insertions(+), 4 deletions(-)

diff --git a/talermerchantdemos/blog/blog.py b/talermerchantdemos/blog/blog.py
index 0d7b06a..61c0131 100644
--- a/talermerchantdemos/blog/blog.py
+++ b/talermerchantdemos/blog/blog.py
@@ -96,10 +96,12 @@ def index():
 
 @app.route("/confirm-refund/<order_id>", methods=["GET"])
 def confirm_refund(order_id):
-    # Here we don't care about the session ID
-    pay_params = dict(order_id=order_id)
-    pay_status = backend_get(BACKEND_URL, "check-payment", pay_params)
-    if not pay_status.get("paid"):
+    session_id = flask.session.get("session_id", "")
+    pay_status = backend_get(
+        BACKEND_URL, f"private/orders/{order_id}", 
params=dict(session_id=session_id)
+    )
+    order_status = pay_status.get("order_status")
+    if order_status != "paid":
         err_abort(
             400, message="can't refund unpaid article",
         )

-- 
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]