summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-08-24 14:15:48 +0200
committerChristian Grothoff <christian@grothoff.org>2020-08-24 14:15:48 +0200
commite2dccbdda2e085b011218f59a7f18aa0e792cf12 (patch)
tree5928689fdd49c640563bc9209adb1a881eeb9c40 /src
parent5e31cfb05595597ade329c215cefef0ac10c131c (diff)
downloadtaler-mdb-e2dccbdda2e085b011218f59a7f18aa0e792cf12.tar.gz
taler-mdb-e2dccbdda2e085b011218f59a7f18aa0e792cf12.tar.bz2
taler-mdb-e2dccbdda2e085b011218f59a7f18aa0e792cf12.zip
implement #6522
Diffstat (limited to 'src')
-rw-r--r--src/main.c49
1 files 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
@@ -606,11 +606,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
*/
static char *fulfillment_msg;
@@ -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,
@@ -2972,24 +2947,12 @@ run (void *cls,
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",
"fulfillment-msg",
&fulfillment_msg))
{
GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR,
"taler-mdb",
- "fulfillment-msgcurrency");
+ "fulfillment-msg");
global_ret = EXIT_FAILURE;
return;
}