From 92b369089c0f1c94785e6fba1a6d6183afd0d47a Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sat, 19 Dec 2015 20:39:56 +0100 Subject: have address in SEPA details as required to run --- src/backend/merchant.conf | 2 ++ src/backend/taler-merchant-httpd.c | 21 ++++++++++++++++++--- src/lib/test_merchant.conf | 2 ++ 3 files changed, 22 insertions(+), 3 deletions(-) diff --git a/src/backend/merchant.conf b/src/backend/merchant.conf index 80a7b412..4e6ce298 100644 --- a/src/backend/merchant.conf +++ b/src/backend/merchant.conf @@ -51,3 +51,5 @@ CONFIG = postgres:///talerdemo IBAN = DE67830654080004822650 NAME = GNUNET E.V BIC = GENODEF1SRL +ADDRESS = "Garching" +SALT = 12345 diff --git a/src/backend/taler-merchant-httpd.c b/src/backend/taler-merchant-httpd.c index 2cc553e9..21fd545a 100644 --- a/src/backend/taler-merchant-httpd.c +++ b/src/backend/taler-merchant-httpd.c @@ -334,6 +334,7 @@ parse_wireformat_sepa (const struct GNUNET_CONFIGURATION_Handle *cfg) unsigned long long salt; char *iban; char *name; + char *address; char *bic; if (GNUNET_OK != @@ -363,6 +364,16 @@ parse_wireformat_sepa (const struct GNUNET_CONFIGURATION_Handle *cfg) GNUNET_free (iban); return GNUNET_SYSERR; } + if (GNUNET_OK != + GNUNET_CONFIGURATION_get_value_string (cfg, + "wire-sepa", + "ADDRESS", + &address)) + { + GNUNET_free (iban); + GNUNET_free (name); + return GNUNET_SYSERR; + } if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_string (cfg, "wire-sepa", @@ -372,15 +383,19 @@ parse_wireformat_sepa (const struct GNUNET_CONFIGURATION_Handle *cfg) GNUNET_free (iban); GNUNET_free (name); GNUNET_free (bic); + GNUNET_free (address); + return GNUNET_SYSERR; } - j_wire = json_pack ("{s:s, s:s, s:s, s:s, s:o}", + j_wire = json_pack ("{s:s, s:s, s:s, s:s, s:o, s:s}", "type", "SEPA", "IBAN", iban, "name", name, "bic", bic, - "r", json_integer (salt)); + "r", json_integer (salt), + "address", address); GNUNET_free (iban); GNUNET_free (name); + GNUNET_free (address); GNUNET_free (bic); if (NULL == j_wire) return GNUNET_SYSERR; @@ -491,7 +506,7 @@ run (void *cls, TMH_AUDITORS_init (config)); /* FIXME: for now, we just support SEPA here: */ EXITIF (GNUNET_OK != - parse_wireformat_sepa (config)); + parse_wireformat_sepa (config)); EXITIF (GNUNET_OK != validate_and_hash_wireformat ("SEPA")); EXITIF (GNUNET_OK != diff --git a/src/lib/test_merchant.conf b/src/lib/test_merchant.conf index 7083aab1..04d0e20c 100644 --- a/src/lib/test_merchant.conf +++ b/src/lib/test_merchant.conf @@ -51,3 +51,5 @@ CONFIG = postgres:///talercheck IBAN = DE67830654080004822650 NAME = GNUNET E.V BIC = GENODEF1SRL +SALT = 17919252168512238964 +ADDRESS = "Garching" -- cgit v1.2.3