[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-taler-mdb] branch master updated: implement #6522
From: |
gnunet |
Subject: |
[taler-taler-mdb] branch master updated: implement #6522 |
Date: |
Mon, 24 Aug 2020 14:15:50 +0200 |
This is an automated email from the git hooks/post-receive script.
grothoff pushed a commit to branch master
in repository taler-mdb.
The following commit(s) were added to refs/heads/master by this push:
new e2dccbd implement #6522
e2dccbd is described below
commit e2dccbdda2e085b011218f59a7f18aa0e792cf12
Author: Christian Grothoff <christian@grothoff.org>
AuthorDate: Mon Aug 24 14:15:48 2020 +0200
implement #6522
---
src/main.c | 49 ++++++-------------------------------------------
1 file changed, 6 insertions(+), 43 deletions(-)
diff --git a/src/main.c b/src/main.c
index 67a766b..e50b5e6 100644
--- a/src/main.c
+++ b/src/main.c
@@ -605,11 +605,6 @@ static char *currency;
*/
static char *backend_base_url;
-/**
- * Taler fulfillment url read from configuration file
- */
-static char *fulfillment_url;
-
/**
* Fulfillment message to display after successful payment, read from
configuration file
*/
@@ -1539,26 +1534,7 @@ launch_payment (struct Product *product)
{
struct PaymentActivity *pa;
json_t *orderReq;
- char *fulflmntUrl;
- struct GNUNET_ShortHashCode uuid;
- char *uuid_s;
-
- /* We need to ensure that every fulfillment URL is unique;
- most easily done by adding a random nonce, as we may
- not have a reliable counter or clock on the machine */
- GNUNET_CRYPTO_random_block (GNUNET_CRYPTO_QUALITY_NONCE,
- &uuid,
- sizeof (uuid));
- uuid_s = GNUNET_STRINGS_data_to_string_alloc (&uuid,
- sizeof (uuid));
- /* create the fulfillment url, e.g.
"taler://fulfillment-success/Enjoy+your+ice+cream!"; */
- GNUNET_asprintf (&fulflmntUrl,
- "%s%s%s#%s",
- fulfillment_url,
- fulfillment_msg,
- product->description,
- uuid_s);
- GNUNET_free (uuid_s);
+
/* create the json object for the order request */
if (NULL != product->preview)
{
@@ -1567,8 +1543,8 @@ launch_payment (struct Product *product)
product->description,
"preview", product->preview,
"amount", TALER_JSON_from_amount (&product->price),
- "fulfillment_url", fulflmntUrl
- ,"auto_refund", GNUNET_JSON_from_time_rel (
+ "fulfillment_message", fulfillment_msg,
+ "auto_refund", GNUNET_JSON_from_time_rel (
MAX_REFUND_DELAY)
);
}
@@ -1578,12 +1554,11 @@ launch_payment (struct Product *product)
"summary",
product->description,
"amount", TALER_JSON_from_amount (&product->price),
- "fulfillment_url", fulflmntUrl
- ,"auto_refund", GNUNET_JSON_from_time_rel (
+ "fulfillment_message", fulfillment_msg,
+ "auto_refund", GNUNET_JSON_from_time_rel (
MAX_REFUND_DELAY)
);
}
- GNUNET_free (fulflmntUrl);
if (NULL == orderReq)
{
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
@@ -2969,18 +2944,6 @@ run (void *cls,
"No ESSID specified, will not advertise WLAN\n");
}
}
- if (GNUNET_OK !=
- GNUNET_CONFIGURATION_get_value_string (cfg,
- "taler-mdb",
- "fulfillment-url",
- &fulfillment_url))
- {
- GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR,
- "taler-mdb",
- "fulfillment-url");
- global_ret = EXIT_FAILURE;
- return;
- }
if (GNUNET_OK !=
GNUNET_CONFIGURATION_get_value_string (cfg,
"taler-mdb",
@@ -2989,7 +2952,7 @@ run (void *cls,
{
GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR,
"taler-mdb",
- "fulfillment-msgcurrency");
+ "fulfillment-msg");
global_ret = EXIT_FAILURE;
return;
}
--
To stop receiving notification emails like this one, please contact
gnunet@gnunet.org.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-taler-mdb] branch master updated: implement #6522,
gnunet <=