commit 92b369089c0f1c94785e6fba1a6d6183afd0d47a
parent 14b0d9e238a6e13713a0f1d944d32c12a12d5013
Author: Christian Grothoff <christian@grothoff.org>
Date: Sat, 19 Dec 2015 20:39:56 +0100
have address in SEPA details as required to run
Diffstat:
3 files changed, 22 insertions(+), 3 deletions(-)
diff --git 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
@@ -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 !=
@@ -366,21 +367,35 @@ parse_wireformat_sepa (const struct GNUNET_CONFIGURATION_Handle *cfg)
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",
"BIC",
&bic))
{
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
@@ -51,3 +51,5 @@ CONFIG = postgres:///talercheck
IBAN = DE67830654080004822650
NAME = GNUNET E.V
BIC = GENODEF1SRL
+SALT = 17919252168512238964
+ADDRESS = "Garching"