summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2015-12-19 20:39:56 +0100
committerChristian Grothoff <christian@grothoff.org>2015-12-19 20:39:56 +0100
commit92b369089c0f1c94785e6fba1a6d6183afd0d47a (patch)
tree01adaec31fd15e772839e2eb79e3152073b6d26a
parent14b0d9e238a6e13713a0f1d944d32c12a12d5013 (diff)
downloadmerchant-92b369089c0f1c94785e6fba1a6d6183afd0d47a.tar.gz
merchant-92b369089c0f1c94785e6fba1a6d6183afd0d47a.tar.bz2
merchant-92b369089c0f1c94785e6fba1a6d6183afd0d47a.zip
have address in SEPA details as required to run
-rw-r--r--src/backend/merchant.conf2
-rw-r--r--src/backend/taler-merchant-httpd.c21
-rw-r--r--src/lib/test_merchant.conf2
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 !=
@@ -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
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"