gnunet-svn
[Top][All Lists]
Advanced

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

[GNUnet-SVN] [taler-merchant] branch master updated: support http for ta


From: gnunet
Subject: [GNUnet-SVN] [taler-merchant] branch master updated: support http for taler://pay
Date: Sat, 05 Oct 2019 20:04:11 +0200

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

dold pushed a commit to branch master
in repository merchant.

The following commit(s) were added to refs/heads/master by this push:
     new 6eb1f75  support http for taler://pay
6eb1f75 is described below

commit 6eb1f758ead6eca02803cadf3017101ebdc338e0
Author: Florian Dold <address@hidden>
AuthorDate: Sat Oct 5 23:33:57 2019 +0530

    support http for taler://pay
---
 src/backend/taler-merchant-httpd_check-payment.c | 34 +++++++++++-------------
 1 file changed, 15 insertions(+), 19 deletions(-)

diff --git a/src/backend/taler-merchant-httpd_check-payment.c 
b/src/backend/taler-merchant-httpd_check-payment.c
index fc6cd15..ee7c928 100644
--- a/src/backend/taler-merchant-httpd_check-payment.c
+++ b/src/backend/taler-merchant-httpd_check-payment.c
@@ -58,6 +58,7 @@ make_taler_pay_uri (struct MHD_Connection *connection,
   const char *forwarded_host;
   const char *uri_path;
   const char *uri_instance_id;
+  const char *query;
   char *result;
 
 
@@ -85,27 +86,22 @@ make_taler_pay_uri (struct MHD_Connection *connection,
     return NULL;
   }
 
+  if (GNUNET_YES == TALER_mhd_is_https (connection))
+    query = "";
+  else
+    query = "?insecure=1";
+
   GNUNET_assert (NULL != order_id);
 
-  if (NULL == session_id)
-  {
-    GNUNET_assert (0 < GNUNET_asprintf (&result,
-                                        "taler://pay/%s/%s/%s/%s",
-                                        host,
-                                        uri_path,
-                                        uri_instance_id,
-                                        order_id));
-  }
-  else
-  {
-    GNUNET_assert (0 < GNUNET_asprintf (&result,
-                                        "taler://pay/%s/%s/%s/%s/%s",
-                                        host,
-                                        uri_path,
-                                        uri_instance_id,
-                                        order_id,
-                                        session_id));
-  }
+  GNUNET_assert (0 < GNUNET_asprintf (&result,
+                                      "taler://pay/%s/%s/%s/%s%s%s%s",
+                                      host,
+                                      uri_path,
+                                      uri_instance_id,
+                                      order_id,
+                                      (session_id == NULL) ? "" : "/",
+                                      (session_id == NULL) ? "" : session_id,
+                                      query));
   return result;
 }
 

-- 
To stop receiving notification emails like this one, please contact
address@hidden.



reply via email to

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