gnunet-svn
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[GNUnet-SVN] [taler-merchant] 02/08: Towards enabling multiple wire acco


From: gnunet
Subject: [GNUnet-SVN] [taler-merchant] 02/08: Towards enabling multiple wire accounts per merchant.
Date: Sun, 15 Apr 2018 12:26:19 +0200

This is an automated email from the git hooks/post-receive script.

grothoff pushed a commit to branch master
in repository merchant.

commit 7c4621df0dac5f5738faacc33bd6f822b0fe86f1
Author: Christian Grothoff <address@hidden>
AuthorDate: Mon Apr 2 14:48:30 2018 +0200

    Towards enabling multiple wire accounts per merchant.
    
    This also adjusts the merchant logic to the latest
    exchange wire API and updates the configurations to
    match the latest changes to the exchange's configuration
    structure (including the shift to payto://-URLs).
---
 src/backend/Makefile.am                      |   1 +
 src/backend/merchant.conf                    |  24 +-
 src/backend/taler-merchant-httpd.c           | 393 ++++++++++++++++++---------
 src/backend/taler-merchant-httpd.h           |   7 +-
 src/backend/taler-merchant-httpd_auditors.c  |  26 +-
 src/backend/taler-merchant-httpd_exchanges.c | 103 +++++--
 src/lib/test_merchant_api.c                  |   2 +-
 src/lib/test_merchant_api.conf               | 198 ++++++++------
 src/lib/test_merchant_api_new.c              |   9 +-
 src/lib/test_merchant_api_twisted.c          |   9 +-
 src/lib/test_merchant_api_twisted.conf       | 217 +--------------
 11 files changed, 525 insertions(+), 464 deletions(-)

diff --git a/src/backend/Makefile.am b/src/backend/Makefile.am
index a83a185..960dc46 100644
--- a/src/backend/Makefile.am
+++ b/src/backend/Makefile.am
@@ -35,6 +35,7 @@ taler_merchant_httpd_SOURCES = \
 taler_merchant_httpd_LDADD = \
   $(top_builddir)/src/backenddb/libtalermerchantdb.la \
   -ltalerexchange \
+  -ltalerwire \
   -ltalerjson \
   -ltalerutil \
   -ltalerpq \
diff --git a/src/backend/merchant.conf b/src/backend/merchant.conf
index e3e0a68..3475fc9 100644
--- a/src/backend/merchant.conf
+++ b/src/backend/merchant.conf
@@ -57,10 +57,24 @@ CONFIG = postgres:///talermerchant
 [merchant-instance-default]
 KEYFILE = ${TALER_DATA_HOME}/merchant/merchant.priv
 
-[merchant-instance-wireformat-default]
-# File where the merchant's address is provided.
-TEST_RESPONSE_FILE = ${TALER_CONFIG_HOME}/merchant/wire/tutorial.json
-# Should this address be used in offers we create right now?
+[account-default]
+
+# payto://-URL of the merchant's bank account. Required.
+# URL = payto://x-taler-bank/bank/42
+
+# File where this account's salted wire address is provided.
+# File does not have to exist, will be generated from
+# BANK_URL if it is missing.  File must match BANK_URL.
+WIRE_RESPONSE = ${TALER_CONFIG_HOME}/merchant/accounts/default.json
+
+# Can this address be used in previous offers for
+# instance "default"?  Must be set to YES if ACTIVE_default is YES.
+# Note that "default" here must match the instance's section name.
+# The same account may be enabled/active in multiple instances.
+ENABLE_default = YES
+
+# Should this address be used in offers we create right now for
+# instance "default"?
 # Inactive addresses (NO) will be supported for legacy contracts
 # but not used for new contracts.
-ACTIVE = YES
+ACTIVE_default = YES
diff --git a/src/backend/taler-merchant-httpd.c 
b/src/backend/taler-merchant-httpd.c
index 086e956..4304789 100644
--- a/src/backend/taler-merchant-httpd.c
+++ b/src/backend/taler-merchant-httpd.c
@@ -28,6 +28,7 @@
 #include <taler/taler_json_lib.h>
 #include <taler/taler_exchange_service.h>
 #include <taler/taler_wire_plugin.h>
+#include <taler/taler_wire_lib.h>
 #include "taler-merchant-httpd_responses.h"
 #include "taler_merchantdb_lib.h"
 #include "taler-merchant-httpd.h"
@@ -113,6 +114,11 @@ unsigned long long default_wire_fee_amortization;
 int TMH_merchant_connection_close;
 
 /**
+ * Which currency do we use?
+ */
+char *TMH_currency;
+
+/**
  * Task running the HTTP server.
  */
 static struct GNUNET_SCHEDULER_Task *mhd_task;
@@ -328,6 +334,7 @@ hashmap_free (void *cls,
                                  mi->wm_tail,
                                  wm);
     json_decref (wm->j_wire);
+    GNUNET_free (wm->wire_method);
     GNUNET_free (wm);
   }
 
@@ -596,11 +603,16 @@ struct WireFormatIteratorContext
    * The merchant instance we are currently building.
    */
   struct MerchantInstance *mi;
+
+  /**
+   * Set to #GNUNET_YES if the default instance was found.
+   */
+  int default_instance;
 };
 
 
 /**
- * Callback that looks for 'merchant-instance-wireformat-*' sections,
+ * Callback that looks for 'account-*' sections,
  * and populates our wire method according to the data
  *
  * @param cls closure with a `struct WireFormatIteratorContext *`
@@ -613,88 +625,216 @@ wireformat_iterator_cb (void *cls,
   struct WireFormatIteratorContext *wfic = cls;
   struct MerchantInstance *mi = wfic->mi;
   struct IterateInstancesCls *iic = wfic->iic;
-  char *instance_wiresection;
+  char *instance_option;
   struct WireMethod *wm;
-  json_t *type;
-  char *emsg;
-
-  GNUNET_asprintf (&instance_wiresection,
-                   "merchant-instance-wireformat-%s",
+  char *payto;
+  char *fn;
+  char *plugin_name;
+  struct TALER_WIRE_Plugin *plugin;
+  json_t *j;
+  enum TALER_ErrorCode ec;
+  struct GNUNET_HashCode h_wire;
+
+  if (0 != strncasecmp (section,
+                        "account-",
+                        strlen ("account-")))
+    return;
+  GNUNET_asprintf (&instance_option,
+                   "HONOR_%s",
                    mi->id);
-  if (0 != strncmp (section,
-                    instance_wiresection,
-                    strlen (instance_wiresection)))
+  if (GNUNET_YES !=
+      GNUNET_CONFIGURATION_get_value_yesno (iic->config,
+                                            section,
+                                            instance_option))
   {
-    GNUNET_free (instance_wiresection);
+    GNUNET_free (instance_option);
+    return;
+  }
+  GNUNET_free (instance_option);
+  if (GNUNET_OK !=
+      GNUNET_CONFIGURATION_get_value_string (iic->config,
+                                             section,
+                                             "URL",
+                                             &payto))
+  {
+    GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR,
+                               section,
+                               "URL");
+    iic->ret = GNUNET_SYSERR;
     return;
   }
-  GNUNET_free (instance_wiresection);
-
-  wm = GNUNET_new (struct WireMethod);
-  /* FIXME: maybe use sorting to address #4939-12806? */
-  wm->active = GNUNET_CONFIGURATION_get_value_yesno (iic->config,
-                                                     section,
-                                                     instance_wiresection);
-  if (GNUNET_YES == wm->active)
-    GNUNET_CONTAINER_DLL_insert (mi->wm_head,
-                                 mi->wm_tail,
-                                 wm);
-  else
-    GNUNET_CONTAINER_DLL_insert_tail (mi->wm_head,
-                                      mi->wm_tail,
-                                      wm);
 
-  wm->j_wire = iic->plugin->get_wire_details (iic->plugin->cls,
-                                              iic->config,
-                                              section);
-  if ( (NULL == (type = json_object_get (wm->j_wire,
-                                         "type"))) ||
-       (! json_is_string (type)) )
+  /* check payto://-URL is well-formed and matches plugin */
+  if (GNUNET_OK !=
+      GNUNET_CONFIGURATION_get_value_string (iic->config,
+                                             section,
+                                             "PLUGIN",
+                                             &plugin_name))
+  {
+    GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR,
+                               section,
+                               "PLUGIN");
+    GNUNET_free (payto);
+    GNUNET_free (instance_option);
+    iic->ret = GNUNET_SYSERR;
+    return;
+  }
+  if (NULL ==
+      (plugin = TALER_WIRE_plugin_load (iic->config,
+                                        plugin_name)))
   {
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-                "Malformed wireformat: lacks type\n");
-    iic->ret |= GNUNET_SYSERR;
+                "Failed to load wire plugin `%s'\n",
+                plugin_name);
+    GNUNET_free (plugin_name);
+    GNUNET_free (instance_option);
+    GNUNET_free (payto);
+    iic->ret = GNUNET_SYSERR;
     return;
   }
-  wm->wire_method = json_string_value (type);
-
   if (TALER_EC_NONE !=
-      iic->plugin->wire_validate (iic->plugin->cls,
-                                  wm->j_wire,
-                                  NULL,
-                                  &emsg))
+      (ec = plugin->wire_validate (plugin->cls,
+                                   payto)))
   {
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-                "Malformed wireformat: %s\n",
-                emsg);
-    GNUNET_free (emsg);
-    iic->ret |= GNUNET_SYSERR;
+                "payto:// URL `%s' not supported by plugin `%s'\n",
+                payto,
+                plugin_name);
+    GNUNET_free (plugin_name);
+    GNUNET_free (instance_option);
+    GNUNET_free (payto);
+    TALER_WIRE_plugin_unload (plugin);
+    iic->ret = GNUNET_SYSERR;
     return;
   }
+  TALER_WIRE_plugin_unload (plugin);
+  GNUNET_free (plugin_name);
 
   if (GNUNET_OK !=
-      TALER_JSON_hash (wm->j_wire,
-                       &wm->h_wire))
+      GNUNET_CONFIGURATION_get_value_filename (iic->config,
+                                               section,
+                                               "BANK_JSON_FILENAME",
+                                               &fn))
+  {
+    GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR,
+                               section,
+                               "BANK_JSON_FILENAME");
+    GNUNET_free (payto);
+    iic->ret = GNUNET_SYSERR;
+    return;
+  }
+
+  /* Try loading existing JSON from file */
+  if (GNUNET_YES ==
+      GNUNET_DISK_file_test (fn))
+  {
+    json_error_t err;
+    char *url;
+
+    if (NULL ==
+        (j = json_load_file (fn,
+                             JSON_REJECT_DUPLICATES,
+                             &err)))
+    {
+      GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+                  "Failed to load JSON from `%s': %s at %d:%d\n",
+                  fn,
+                  err.text,
+                  err.line,
+                  err.column);
+      GNUNET_free (fn);
+      GNUNET_free (payto);
+      iic->ret = GNUNET_SYSERR;
+      return;
+    }
+    url = TALER_JSON_wire_to_payto (j);
+    if (NULL == url)
+    {
+      GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+                  "URL missing in `%s', disabling account `%s'\n",
+                  fn,
+                  section);
+      GNUNET_free (fn);
+      GNUNET_free (payto);
+      iic->ret = GNUNET_SYSERR;
+      return;
+    }
+    if (0 != strcasecmp (url,
+                         payto))
+    {
+      GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+                  "URL `%s' does not match configuration `%s', disabling 
account `%s'\n",
+                  url,
+                  payto,
+                  section);
+      GNUNET_free (fn);
+      GNUNET_free (payto);
+      GNUNET_free (url);
+      iic->ret = GNUNET_SYSERR;
+      return;
+    }
+    GNUNET_free (url);
+  }
+  else /* need to generate JSON */
+  {
+    j = TALER_JSON_wire_signature_make (payto,
+                                        NULL);
+    if (0 != json_dump_file (j,
+                             fn,
+                             JSON_COMPACT | JSON_SORT_KEYS))
+    {
+      GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+                  "Failed to write hashed wire details to `%s'\n",
+                  fn);
+      GNUNET_free (fn);
+      GNUNET_free (payto);
+      json_decref (j);
+      iic->ret = GNUNET_SYSERR;
+      return;
+    }
+  }
+  GNUNET_free (fn);
+
+  if (GNUNET_OK !=
+      TALER_JSON_wire_signature_hash (j,
+                                      &h_wire))
   {
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-                "Failed to hash wireformat\n");
-    iic->ret |= GNUNET_SYSERR;
+                "Failed to hash wire input\n");
+    GNUNET_free (fn);
+    GNUNET_free (payto);
+    json_decref (j);
+    iic->ret = GNUNET_SYSERR;
+    return;
   }
 
-#define EXTRADEBUG
-#ifdef EXTRADEBUGG
-  GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-              "Found wireformat instance:\n");
-  json_dumpf (wm->j_wire,
-              stdout,
-              0);
-  printf ("\n");
-#endif
+
+  wm = GNUNET_new (struct WireMethod);
+  wm->wire_method = TALER_WIRE_payto_get_method (payto);
+  GNUNET_free (payto);
+  GNUNET_asprintf (&instance_option,
+                   "ACTIVE_%s",
+                   mi->id);
+  wm->active = GNUNET_CONFIGURATION_get_value_yesno (iic->config,
+                                                     section,
+                                                     instance_option);
+  GNUNET_free (instance_option);
+  if (GNUNET_YES == wm->active)
+    GNUNET_CONTAINER_DLL_insert (mi->wm_head,
+                                 mi->wm_tail,
+                                 wm);
+  else
+    GNUNET_CONTAINER_DLL_insert_tail (mi->wm_head,
+                                      mi->wm_tail,
+                                      wm);
+
+  wm->j_wire = j;
+  wm->h_wire = h_wire;
 }
 
 
 /**
- * Callback that looks for 'merchant-instance-*' sections,
+ * Callback that looks for 'instance-*' sections,
  * and populates accordingly each instance's data
  *
  * @param cls closure of type `struct IterateInstancesCls`
@@ -711,24 +851,11 @@ instances_iterator_cb (void *cls,
   /* used as hashmap keys */
   struct GNUNET_HashCode h_pk;
   struct GNUNET_HashCode h_id;
-  const char *substr;
 
-  substr = strstr (section,
-                   "merchant-instance-");
-
-  if ( (NULL == substr) ||
-       (NULL != strstr (section,
-                        "merchant-instance-wireformat-")) )
-    return;
-
-  if (substr != section)
-  {
-    GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-                "Failed to specify a merchant instance\n");
-    GNUNET_SCHEDULER_shutdown ();
+  if (0 != strncasecmp (section,
+                        "instance-",
+                        strlen ("instance-")))
     return;
-  }
-
   /** Get id **/
   token = strrchr (section, '-');
   GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
@@ -745,7 +872,7 @@ instances_iterator_cb (void *cls,
                                section,
                                "NAME");
     GNUNET_free (mi);
-    GNUNET_SCHEDULER_shutdown ();
+    iic->ret = GNUNET_SYSERR;
     return;
   }
 
@@ -760,7 +887,7 @@ instances_iterator_cb (void *cls,
                                "KEYFILE");
     GNUNET_free (mi->name);
     GNUNET_free (mi);
-    GNUNET_SCHEDULER_shutdown ();
+    iic->ret = GNUNET_SYSERR;
     return;
   }
   if (GNUNET_OK ==
@@ -784,7 +911,7 @@ instances_iterator_cb (void *cls,
       GNUNET_free (mi->keyfile);
       GNUNET_free (mi->name);
       GNUNET_free (mi);
-      GNUNET_SCHEDULER_shutdown ();
+      iic->ret = GNUNET_SYSERR;
       return;
     }
     pk = GNUNET_CRYPTO_eddsa_key_create_from_file (tip_reserves);
@@ -798,7 +925,7 @@ instances_iterator_cb (void *cls,
       GNUNET_free (mi->keyfile);
       GNUNET_free (mi->name);
       GNUNET_free (mi);
-      GNUNET_SCHEDULER_shutdown ();
+      iic->ret = GNUNET_SYSERR;
       return;
     }
     mi->tip_reserve.eddsa_priv = *pk;
@@ -812,13 +939,13 @@ instances_iterator_cb (void *cls,
                 "Merchant private key `%s' does not exist yet, creating it!\n",
                 mi->keyfile);
   if (NULL ==
-       (pk = GNUNET_CRYPTO_eddsa_key_create_from_file (mi->keyfile)))
+      (pk = GNUNET_CRYPTO_eddsa_key_create_from_file (mi->keyfile)))
   {
     GNUNET_break (0);
     GNUNET_free (mi->keyfile);
     GNUNET_free (mi->name);
     GNUNET_free (mi);
-    GNUNET_SCHEDULER_shutdown ();
+    iic->ret = GNUNET_SYSERR;
     return;
   }
   mi->privkey.eddsa_priv = *pk;
@@ -831,26 +958,6 @@ instances_iterator_cb (void *cls,
                        mi->id))
     iic->default_instance = GNUNET_YES;
 
-  /* Initialize wireformats */
-  {
-    struct WireFormatIteratorContext wfic = {
-      .iic = iic,
-      .mi = mi
-    };
-
-    GNUNET_CONFIGURATION_iterate_sections (iic->config,
-                                           &wireformat_iterator_cb,
-                                           &wfic);
-  }
-
-  if (NULL == mi->wm_head)
-  {
-    GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-                "Failed to load wire formats for instance `%s'\n",
-                mi->id);
-    iic->ret |= GNUNET_SYSERR;
-  }
-
   GNUNET_CRYPTO_hash (mi->id,
                       strlen (mi->id),
                       &h_id);
@@ -862,7 +969,11 @@ instances_iterator_cb (void *cls,
   {
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
                 "Failed to put an entry into the 'by_id' hashmap\n");
-    iic->ret |= GNUNET_SYSERR;
+    iic->ret = GNUNET_SYSERR;
+    GNUNET_free (mi->keyfile);
+    GNUNET_free (mi->name);
+    GNUNET_free (mi);
+    return;
   }
   GNUNET_CRYPTO_hash (&mi->pubkey.eddsa_pub,
                       sizeof (struct GNUNET_CRYPTO_EddsaPublicKey),
@@ -875,8 +986,36 @@ instances_iterator_cb (void *cls,
   {
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
                 "Failed to put an entry into the 'by_kpub_map' hashmap\n");
-    iic->ret |= GNUNET_SYSERR;
+    GNUNET_assert (GNUNET_OK ==
+                   GNUNET_CONTAINER_multihashmap_remove (by_id_map,
+                                                         &h_id,
+                                                         mi));
+    iic->ret = GNUNET_SYSERR;
+    GNUNET_free (mi->keyfile);
+    GNUNET_free (mi->name);
+    GNUNET_free (mi);
+    return;
+  }
+
+  /* Initialize wireformats */
+  {
+    struct WireFormatIteratorContext wfic = {
+      .iic = iic,
+      .mi = mi
+    };
+
+    GNUNET_CONFIGURATION_iterate_sections (iic->config,
+                                           &wireformat_iterator_cb,
+                                           &wfic);
+  }
+  if (NULL == mi->wm_head)
+  {
+    GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+                "Failed to load wire formats for instance `%s'\n",
+                mi->id);
+    iic->ret = GNUNET_SYSERR;
   }
+
 }
 
 
@@ -949,6 +1088,7 @@ iterate_locations (const struct 
GNUNET_CONFIGURATION_Handle *config)
                                          (void *) config);
 }
 
+
 /**
  * Iterate over each merchant instance, in order to populate
  * each instance's own data
@@ -960,43 +1100,28 @@ iterate_locations (const struct 
GNUNET_CONFIGURATION_Handle *config)
 static int
 iterate_instances (const struct GNUNET_CONFIGURATION_Handle *config)
 {
-  struct IterateInstancesCls *iic;
+  struct IterateInstancesCls iic;
 
-  iic = GNUNET_new (struct IterateInstancesCls);
-  iic->config = config;
+  iic.config = config;
+  iic.default_instance = GNUNET_NO;
+  iic.ret = GNUNET_OK;
   GNUNET_CONFIGURATION_iterate_sections (config,
                                          &instances_iterator_cb,
-                                         iic);
+                                         &iic);
 
-  if (GNUNET_NO == iic->default_instance)
+  if (GNUNET_NO == iic.default_instance)
   {
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
                 "No default merchant instance found\n");
-    goto fail;
+    return GNUNET_SYSERR;
   }
-  else
-    GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
-                "Congratulations, you have a default instance\n");
-
-  if (0 != (GNUNET_SYSERR & iic->ret))
+  if (GNUNET_OK != iic.ret)
   {
     GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
-               "At least one instance has not been successfully parsed\n");
-    goto fail;
+                "At least one instance was not successfully parsed\n");
+    return GNUNET_SYSERR;
   }
-
-  GNUNET_PLUGIN_unload (lib_name,
-                        iic->plugin);
-  GNUNET_free (lib_name);
-  GNUNET_free (iic);
   return GNUNET_OK;
-
- fail:
-  GNUNET_PLUGIN_unload (lib_name,
-                       iic->plugin);
-  GNUNET_free (lib_name);
-  GNUNET_free (iic);
-  return GNUNET_SYSERR;
 }
 
 
@@ -1015,7 +1140,6 @@ run (void *cls,
      const char *cfgfile,
      const struct GNUNET_CONFIGURATION_Handle *config)
 {
-  char *wireformat;
   int fh;
 
   GNUNET_log (GNUNET_ERROR_TYPE_INFO,
@@ -1058,6 +1182,19 @@ run (void *cls,
   }
 
   if (GNUNET_SYSERR ==
+      GNUNET_CONFIGURATION_get_value_string (config,
+                                             "taler",
+                                             "CURRENCY",
+                                             &TMH_currency))
+  {
+    GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR,
+                               "taler",
+                               "CURRENCY");
+    GNUNET_SCHEDULER_shutdown ();
+    return;
+  }
+
+  if (GNUNET_SYSERR ==
       GNUNET_CONFIGURATION_get_value_time (config,
                                            "merchant",
                                            "WIRE_TRANSFER_DELAY",
diff --git a/src/backend/taler-merchant-httpd.h 
b/src/backend/taler-merchant-httpd.h
index 803720b..9d494db 100644
--- a/src/backend/taler-merchant-httpd.h
+++ b/src/backend/taler-merchant-httpd.h
@@ -84,7 +84,7 @@ struct WireMethod
   /**
    * Which wire method is @e j_wire using?  Points into @e j_wire.
    */
-  const char *wire_method;
+  char *wire_method;
 
   /**
    * Wire details for this instance
@@ -285,6 +285,11 @@ extern struct TALER_Amount default_max_deposit_fee;
 extern unsigned long long default_wire_fee_amortization;
 
 /**
+ * Which currency do we use?
+ */
+extern char *TMH_currency;
+
+/**
  * Hash of our wire format details as given in #j_wire.
  */
 extern struct GNUNET_HashCode h_wire;
diff --git a/src/backend/taler-merchant-httpd_auditors.c 
b/src/backend/taler-merchant-httpd_auditors.c
index 8b620e0..735d0df 100644
--- a/src/backend/taler-merchant-httpd_auditors.c
+++ b/src/backend/taler-merchant-httpd_auditors.c
@@ -1,6 +1,6 @@
 /*
   This file is part of TALER
-  (C) 2014, 2015, 2016 GNUnet e.V. and INRIA
+  (C) 2014, 2015, 2016, 2018 Taler Systems SA
 
   TALER is free software; you can redistribute it and/or modify it under the
   terms of the GNU Affero General Public License as published by the Free 
Software
@@ -136,15 +136,35 @@ parse_auditors (void *cls,
 {
   const struct GNUNET_CONFIGURATION_Handle *cfg = cls;
   char *pks;
+  char *currency;
   struct Auditor auditor;
 
   if (0 != strncasecmp (section,
-                        "merchant-auditor-",
-                        strlen ("merchant-auditor-")))
+                        "auditor-",
+                        strlen ("auditor-")))
     return;
   if (GNUNET_OK !=
       GNUNET_CONFIGURATION_get_value_string (cfg,
                                              section,
+                                             "CURRENCY",
+                                             &currency))
+  {
+    GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR,
+                               section,
+                               "CURRENCY");
+    return;
+  }
+  if (0 != strcasecmp (currency,
+                       TMH_currency))
+  {
+    /* trusted exchange, but for a different currency; ignore */
+    GNUNET_free (currency);
+    return;
+  }
+  GNUNET_free (currency);
+  if (GNUNET_OK !=
+      GNUNET_CONFIGURATION_get_value_string (cfg,
+                                             section,
                                              "NAME",
                                              &auditor.name))
   {
diff --git a/src/backend/taler-merchant-httpd_exchanges.c 
b/src/backend/taler-merchant-httpd_exchanges.c
index 1c90f00..65eccab 100644
--- a/src/backend/taler-merchant-httpd_exchanges.c
+++ b/src/backend/taler-merchant-httpd_exchanges.c
@@ -1,6 +1,6 @@
 /*
   This file is part of TALER
-  (C) 2014-2017 INRIA
+  (C) 2014-2018 Taler Systems SA
 
   TALER is free software; you can redistribute it and/or modify it under the
   terms of the GNU Affero General Public License as published by the Free 
Software
@@ -21,6 +21,7 @@
  */
 #include "platform.h"
 #include <taler/taler_json_lib.h>
+#include <taler/taler_wire_lib.h>
 #include "taler-merchant-httpd_exchanges.h"
 
 
@@ -302,22 +303,18 @@ retry_exchange (void *cls)
  * @param cls closure
  * @param wire_method name of the wire method (i.e. "sepa")
  * @param fees fee structure for this method
+ * @return #GNUNET_OK on success
  */
-static void
-process_wire_fees (void *cls,
+static int
+process_wire_fees (struct Exchange *exchange,
+                   const struct TALER_MasterPublicKeyP *master_pub,
                    const char *wire_method,
                    const struct TALER_EXCHANGE_WireAggregateFees *fees)
 {
-  struct Exchange *exchange = cls;
   struct FeesByWireMethod *f;
   struct TALER_EXCHANGE_WireAggregateFees *endp;
   struct TALER_EXCHANGE_WireAggregateFees *af;
-  const struct TALER_EXCHANGE_Keys *keys;
-  const struct TALER_MasterPublicKeyP *master_pub;
 
-  keys = TALER_EXCHANGE_get_keys (exchange->conn);
-  GNUNET_assert (NULL != keys);
-  master_pub = &keys->master_pub;
   for (f = exchange->wire_fees_head; NULL != f; f = f->next)
     if (0 == strcasecmp (wire_method,
                          f->wire_method))
@@ -342,7 +339,7 @@ process_wire_fees (void *cls,
   {
     /* Hole in the fee structure, not allowed! */
     GNUNET_break_op (0);
-    return;
+    return GNUNET_SYSERR;
   }
   while (NULL != fees)
   {
@@ -368,7 +365,7 @@ process_wire_fees (void *cls,
       GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
                  "Failed to start database transaction!\n");
       GNUNET_free (af);
-      break;
+      return GNUNET_SYSERR;
     }
     qs = db->store_wire_fee_by_exchange (db->cls,
                                         master_pub,
@@ -416,6 +413,46 @@ process_wire_fees (void *cls,
     endp = af;
     fees = fees->next;
   }
+  return GNUNET_OK;
+}
+
+
+/**
+ * Function called with information about the wire accounts
+ * of the exchanage.  Stores the wire fees with the
+ * exchange for laster use.
+ *
+ * @param exchange the exchange
+ * @param master_pub public key of the exchange
+ * @param accounts_len length of the @a accounts array
+ * @param accounts list of wire accounts of the exchange
+ * @return #GNUNET_OK on success
+ */
+static int
+process_wire_accounts (struct Exchange *exchange,
+                       const struct TALER_MasterPublicKeyP *master_pub,
+                       unsigned int accounts_len,
+                       const struct TALER_EXCHANGE_WireAccount *accounts)
+{
+  for (unsigned int i=0;i<accounts_len;i++)
+  {
+    char *method;
+
+    method = TALER_WIRE_payto_get_method (accounts[i].url);
+    if (NULL == method)
+      return GNUNET_SYSERR;
+    if (GNUNET_OK !=
+        process_wire_fees (exchange,
+                           master_pub,
+                           method,
+                           accounts[i].fees))
+    {
+      GNUNET_free (method);
+      return GNUNET_SYSERR;
+    }
+    GNUNET_free (method);
+  }
+  return GNUNET_OK;
 }
 
 
@@ -549,15 +586,15 @@ wire_task_cb (void *cls);
  * @param http_status HTTP response code, #MHD_HTTP_OK (200) for successful 
request;
  *                    0 if the exchange's reply is bogus (fails to follow the 
protocol)
  * @param ec taler-specific error code, #TALER_EC_NONE on success
- * @param obj the received JSON reply, if successful this should be the wire
- *            format details as provided by /wire, or NULL if the
- *            reply was not in JSON format.
+ * @param accounts_len length of the @a accounts array
+ * @param accounts list of wire accounts of the exchange, NULL on error
  */
 static void
 handle_wire_data (void *cls,
                   unsigned int http_status,
                   enum TALER_ErrorCode ec,
-                  const json_t *obj)
+                  unsigned int accounts_len,
+                  const struct TALER_EXCHANGE_WireAccount *accounts)
 {
   struct Exchange *exchange = cls;
   const struct TALER_EXCHANGE_Keys *keys;
@@ -574,10 +611,10 @@ handle_wire_data (void *cls,
   keys = TALER_EXCHANGE_get_keys (exchange->conn);
   if ( (NULL == keys) ||
        (GNUNET_OK !=
-        TALER_EXCHANGE_wire_get_fees (&keys->master_pub,
-                                      obj,
-                                      &process_wire_fees,
-                                      exchange)) )
+        process_wire_accounts (exchange,
+                               &keys->master_pub,
+                               accounts_len,
+                               accounts)) )
   {
     /* Report hard failure to all callbacks! */
     struct TMH_EXCHANGES_FindOperation *fo;
@@ -918,18 +955,19 @@ accept_exchanges (void *cls,
                   const char *section)
 {
   const struct GNUNET_CONFIGURATION_Handle *cfg = cls;
+  char *currency;
   char *url;
   char *mks;
   struct Exchange *exchange;
 
   if (0 != strncasecmp (section,
-                        "merchant-exchange-",
-                        strlen ("merchant-exchange-")))
+                        "exchange-",
+                        strlen ("exchange-")))
     return;
   if (GNUNET_OK !=
       GNUNET_CONFIGURATION_get_value_string (cfg,
                                              section,
-                                             "URL",
+                                             "BASE_URL",
                                              &url))
   {
     GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR,
@@ -937,6 +975,27 @@ accept_exchanges (void *cls,
                                "URL");
     return;
   }
+  if (GNUNET_OK !=
+      GNUNET_CONFIGURATION_get_value_string (cfg,
+                                             section,
+                                             "CURRENCY",
+                                             &currency))
+  {
+    GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR,
+                               section,
+                               "CURRENCY");
+    GNUNET_free (url);
+    return;
+  }
+  if (0 != strcasecmp (currency,
+                       TMH_currency))
+  {
+    /* trusted exchange, but for a different currency; ignore */
+    GNUNET_free (url);
+    GNUNET_free (currency);
+    return;
+  }
+  GNUNET_free (currency);
   exchange = GNUNET_new (struct Exchange);
   exchange->url = url;
   if (GNUNET_OK ==
diff --git a/src/lib/test_merchant_api.c b/src/lib/test_merchant_api.c
index b552648..61b8f2a 100644
--- a/src/lib/test_merchant_api.c
+++ b/src/lib/test_merchant_api.c
@@ -4949,7 +4949,7 @@ main (int argc,
                                             "test_merchant_api.conf"));
   GNUNET_assert (GNUNET_OK ==
     GNUNET_CONFIGURATION_get_value_string (cfg,
-                                           "merchant",
+                                           "TEST",
                                            "INSTANCES",
                                            &_instances));
 
diff --git a/src/lib/test_merchant_api.conf b/src/lib/test_merchant_api.conf
index ef819e4..2926410 100644
--- a/src/lib/test_merchant_api.conf
+++ b/src/lib/test_merchant_api.conf
@@ -13,6 +13,8 @@ CURRENCY = EUR
 # Configuration for the merchant backend #
 ##########################################
 
+[test]
+INSTANCES = default tor
 
 [merchant]
 
@@ -26,91 +28,98 @@ WIRE_TRANSFER_DELAY = 0 s
 # Which plugin (backend) do we use for the DB.
 DB = postgres
 
-# Wire format supported by the merchant.
-WIREFORMAT = test
-
-# This option is a list of instances which are to be used
-# during the tests. 'default' instance should explicitly be given.
-# The instance "token" X must match the corresponding substring in
-# section like X-wireformat and merchant-instance-X
-INSTANCES = tor default
-
 # Default choice for maximum wire fee.
 DEFAULT_MAX_WIRE_FEE = EUR:0.10
 
-# Default choice for maximum wire fee.
+# Default choice for maximum deposit fee.
 DEFAULT_MAX_DEPOSIT_FEE = EUR:0.10
 
-[exchange-wire-test]
-# Enable 'test' for testing of the actual coin operations.
-ENABLE = YES
-
-BANK_URL = http://localhost:8083/
-
-# Fees for the forseeable future...
-# If you see this after 2017, update to match the next 10 years...
-WIRE-FEE-2017 = EUR:0.01
-WIRE-FEE-2018 = EUR:0.01
-WIRE-FEE-2019 = EUR:0.01
-WIRE-FEE-2020 = EUR:0.01
-WIRE-FEE-2021 = EUR:0.01
-WIRE-FEE-2022 = EUR:0.01
-WIRE-FEE-2023 = EUR:0.01
-WIRE-FEE-2024 = EUR:0.01
-WIRE-FEE-2025 = EUR:0.01
-WIRE-FEE-2026 = EUR:0.01
-CLOSING-FEE-2017 = EUR:0.01
-CLOSING-FEE-2018 = EUR:0.01
-CLOSING-FEE-2019 = EUR:0.01
-CLOSING-FEE-2020 = EUR:0.01
-CLOSING-FEE-2021 = EUR:0.01
-CLOSING-FEE-2022 = EUR:0.01
-CLOSING-FEE-2023 = EUR:0.01
-CLOSING-FEE-2024 = EUR:0.01
-CLOSING-FEE-2025 = EUR:0.01
-CLOSING-FEE-2026 = EUR:0.01
 
+# This specifies which database the postgres backend uses.
+[merchantdb-postgres]
+CONFIG = postgres:///talercheck
 
-[merchant-exchange-test]
-URL = http://localhost:8081/
-MASTER_KEY = 98NJW3CQHZQGQXTY3K85K531XKPAPAVV4Q5V8PYYRR00NJGZWNVG
 
-[merchant-instance-default]
-KEYFILE = test_merchant.priv
+# Different instances operated by this merchant:
+[instance-default]
+KEYFILE = ${TALER_CONFIG_HOME}/merchant/default.priv
 NAME = Kudos Inc.
 
-[merchant-instance-wireformat-default]
-TEST_RESPONSE_FILE = ${TALER_CONFIG_HOME}/merchant/wire/test.json
-
-[merchant-instance-tor]
-KEYFILE = tor_merchant.priv
+[instance-tor]
+KEYFILE = ${TALER_CONFIG_HOME}/merchant/tor.priv
 NAME = The Tor Project
 
-[merchant-instance-tip]
-KEYFILE = reserve_tip.priv
+
+[instance-tip]
+KEYFILE = ${TALER_CONFIG_HOME}/merchant/tip.priv
 TIP_EXCHANGE = http://localhost:8081/
-TIP_RESERVE_PRIV_FILENAME = reserve_key.priv
+TIP_RESERVE_PRIV_FILENAME = ${TALER_CONFIG_HOME}/merchant/reserve/tip.priv
 NAME = Test Tipping Merchant
 
-[merchant-instance-dtip]
-KEYFILE = reserve_dtip.priv
+
+[instance-dtip]
+KEYFILE = ${TALER_CONFIG_HOME}/merchant/dtip.priv
 TIP_EXCHANGE = http://localhost:8081/
-TIP_RESERVE_PRIV_FILENAME = reserve_dkey.priv
+TIP_RESERVE_PRIV_FILENAME = ${TALER_CONFIG_HOME}/merchant/reserve/dtip.priv
 NAME = Test Tipping Merchant 2
 
 
-[merchant-instance-wireformat-tor]
-TEST_RESPONSE_FILE = ${TALER_CONFIG_HOME}/merchant/wire/test.json
+# Account of the MERCHANT
+[account-merchant]
+# What is the merchant's bank account?
+URL = "payto://x-taler-bank/localhost:8082/3"
+
+# This is the *salted* response we give out for /contract requests.
+# File is generated on first use, no need for merchants to generate
+# the salt!
+WIRE_RESPONSE = ${TALER_CONFIG_HOME}/merchant/account-3.json
+
+# Which wire plugin should we used to access the account?
+# (use to validate payto://-URL and for back office)
+PLUGIN = taler_bank
+
+# Authentication information for basic authentication
+TALER_BANK_AUTH_METHOD = "basic"
+USERNAME = user
+PASSWORD = pass
+
+# Accept payments to this account in instance-default
+HONOR_default = YES
+
+# Accept payments to this account in instance-tor
+HONOR_tor = YES
+
+# Accept payments to this account in instance-tip
+HONOR_tip = YES
+
+# Accept payments to this account in instance-dtip
+HONOR_dtip = YES
+
+# Advertise in new contracts of instance-default
+ACTIVE_default = YES
 
-[merchant-instance-wireformat-tip]
-TEST_RESPONSE_FILE = ${TALER_CONFIG_HOME}/merchant/wire/test.json
+# Advertise in new contracts of instance-default
+ACTIVE_tor = YES
+
+# Advertise in new contracts of instance-default
+ACTIVE_tip = YES
+
+# Advertise in new contracts of instance-default
+ACTIVE_dtip = YES
+
+
+
+# Sections starting with "exchange-" specify trusted exchanges
+# (by the merchant)
+[exchange-kudos]
+MASTER_KEY = 98NJW3CQHZQGQXTY3K85K531XKPAPAVV4Q5V8PYYRR00NJGZWNVG
+BASE_URL = "http://localhost:8081/";
+CURRENCY = KUDOS
 
-[merchant-instance-wireformat-dtip]
-TEST_RESPONSE_FILE = ${TALER_CONFIG_HOME}/merchant/wire/test.json
 
 # Auditors must be in sections "auditor-", the rest of the section
 # name could be anything.
-[merchant-auditor-ezb]
+[auditor-ezb]
 # Informal name of the auditor. Just for the user.
 NAME = European Central Bank
 
@@ -122,17 +131,6 @@ URL = http://taler.ezb.eu/
 # This is the important bit: the signing key of the auditor.
 PUBLIC_KEY = 9QXF7XY7E9VPV47B5Z806NDFSX2VJ79SVHHD29QEQ3BG31ANHZ60
 
-# This specifies which database we use.
-[merchantdb-postgres]
-CONFIG = postgres:///talercheck
-
-# "wire-" sections include wire details, here for SEPA.
-[wire-sepa]
-IBAN = DE67830654080004822650
-NAME = GNUNET E.V
-BIC = GENODEF1SRL
-SALT = 17919252168512238964
-ADDRESS = "Garching"
 
 
 ###################################################
@@ -153,19 +151,55 @@ MASTER_PUBLIC_KEY = 
T1VVFQZZARQ1CMF4BN58EE7SKTW5AV2BS18S87ZEGYS4S29J6DNG
 BASE_URL = "http://localhost:8081/";
 
 [exchangedb-postgres]
-DB_CONN_STR = "postgres:///talercheck"
+CONFIG = "postgres:///talercheck"
+
+
+# Account of the EXCHANGE
+[account-exchange]
+# What is the exchange's bank account (with the "Taler Bank" demo system)?
+URL = "payto://x-taler-bank/localhost:8082/2"
 
-[exchange-wire-test]
 # This is the response we give out for the /wire request.  It provides
 # wallets with the bank information for transfers to the exchange.
-# Note that the _incoming_ account is #3, while the
-# outgoing account of the exchange (see below) is #2.
-TEST_RESPONSE_FILE = ${TALER_CONFIG_HOME}/test.json
-
-# What is the main website of the bank?
-BANK_URL = "http://localhost:8083/";
-# From which account at the 'bank' should outgoing wire transfers be made?
-BANK_ACCOUNT_NUMBER = 2
+WIRE_RESPONSE = ${TALER_CONFIG_HOME}/exchange/account-2.json
+
+# Which wire plugin should we used to access the account?
+PLUGIN = taler_bank
+
+# Authentication information for basic authentication
+TALER_BANK_AUTH_METHOD = "basic"
+USERNAME = user
+PASSWORD = pass
+
+ENABLE_DEBIT = YES
+ENABLE_CREDIT = YES
+
+
+# wire fees
+[fees-x-taler-bank]
+
+# Fees for the forseeable future...
+# If you see this after 2018, update to match the next 10 years...
+WIRE-FEE-2018 = EUR:0.01
+WIRE-FEE-2019 = EUR:0.01
+WIRE-FEE-2020 = EUR:0.01
+WIRE-FEE-2021 = EUR:0.01
+WIRE-FEE-2022 = EUR:0.01
+WIRE-FEE-2023 = EUR:0.01
+WIRE-FEE-2024 = EUR:0.01
+WIRE-FEE-2025 = EUR:0.01
+WIRE-FEE-2026 = EUR:0.01
+WIRE-FEE-2027 = EUR:0.01
+CLOSING-FEE-2018 = EUR:0.01
+CLOSING-FEE-2019 = EUR:0.01
+CLOSING-FEE-2020 = EUR:0.01
+CLOSING-FEE-2021 = EUR:0.01
+CLOSING-FEE-2022 = EUR:0.01
+CLOSING-FEE-2023 = EUR:0.01
+CLOSING-FEE-2024 = EUR:0.01
+CLOSING-FEE-2025 = EUR:0.01
+CLOSING-FEE-2026 = EUR:0.01
+CLOSING-FEE-2027 = EUR:0.01
 
 
 [coin_eur_ct_1]
diff --git a/src/lib/test_merchant_api_new.c b/src/lib/test_merchant_api_new.c
index d063491..e25f888 100644
--- a/src/lib/test_merchant_api_new.c
+++ b/src/lib/test_merchant_api_new.c
@@ -829,7 +829,8 @@ main (int argc,
                     NULL);
 
   if (NULL ==
-    (fakebank_url = TALER_TESTING_prepare_fakebank (CONFIG_FILE)))
+      (fakebank_url = TALER_TESTING_prepare_fakebank (CONFIG_FILE,
+                                                      "account-2")))
     return 77;
 
   if (NULL ==
@@ -858,9 +859,9 @@ main (int argc,
                                              NULL,
                                              CONFIG_FILE);
 
-    GNUNET_OS_process_kill (merchantd, SIGTERM); 
-    GNUNET_OS_process_wait (merchantd); 
-    GNUNET_OS_process_destroy (merchantd); 
+    GNUNET_OS_process_kill (merchantd, SIGTERM);
+    GNUNET_OS_process_wait (merchantd);
+    GNUNET_OS_process_destroy (merchantd);
     GNUNET_free (merchant_url);
 
     if (GNUNET_OK != ret)
diff --git a/src/lib/test_merchant_api_twisted.c 
b/src/lib/test_merchant_api_twisted.c
index c2b9a67..5a33644 100644
--- a/src/lib/test_merchant_api_twisted.c
+++ b/src/lib/test_merchant_api_twisted.c
@@ -671,11 +671,12 @@ run (void *cls,
                                  "deposit-simple-for-abort",
                                  is->ctx,
                                  0),
+#if FIXME_MARCELLO
     TALER_TESTING_cmd_flip_object
       ("hack-abort-4",
        PROXY_MERCHANT_CONFIG_FILE,
        "refund_permissions.0.merchant_sig"),
-
+#endif
     TALER_TESTING_cmd_pay_abort ("pay-abort-4",
                                  twister_merchant_url,
                                  "deposit-simple-for-abort",
@@ -758,11 +759,12 @@ run (void *cls,
                            "EUR:1.99", // no sense now
                            "EUR:0.01"), // no sense now
 
+#if FIXME_MARCELLO
     TALER_TESTING_cmd_flip_object
       ("hack-coin-history",
        PROXY_MERCHANT_CONFIG_FILE,
        "history.0.coin_sig"),
-
+#endif
     /* Coin history check will fail, due to coin's bad signature.  */
     TALER_TESTING_cmd_pay ("deposit-simple-fail",
                            twister_merchant_url,
@@ -814,7 +816,8 @@ main (int argc,
                     "DEBUG", NULL);
 
   if (NULL == (fakebank_url = TALER_TESTING_prepare_fakebank
-      (CONFIG_FILE)))
+               (CONFIG_FILE,
+                "account-1")))
     return 77;
 
   if (NULL == (merchant_url = TALER_TESTING_prepare_merchant
diff --git a/src/lib/test_merchant_api_twisted.conf 
b/src/lib/test_merchant_api_twisted.conf
index 3bd9cea..32d7929 100644
--- a/src/lib/test_merchant_api_twisted.conf
+++ b/src/lib/test_merchant_api_twisted.conf
@@ -1,219 +1,6 @@
 # This file is in the public domain.
address@hidden@ test_merchant_api.conf
 
-[PATHS]
-# Persistant data storage for the testcase
-TALER_TEST_HOME = test_merchant_api_home/
-
-
-[taler]
-# What currency do we use?
-CURRENCY = EUR
-
-##########################################
-# Configuration for the merchant backend #
-##########################################
-
-[merchant]
-
-# Which port do we run the backend on? (HTTP server)
-PORT = 8082
-
-# How quickly do we want the exchange to send us our money?
-# Used only if the frontend does not specify a value.
-WIRE_TRANSFER_DELAY = 0 s
-
-# Which plugin (backend) do we use for the DB.
-DB = postgres
-
-# Wire format supported by the merchant.
-WIREFORMAT = test
-
-# This option is a list of instances which are to be used
-# during the tests. 'default' instance should explicitly be given.
-# The instance "token" X must match the corresponding substring in
-# section like X-wireformat and merchant-instance-X
-INSTANCES = tor default
-
-# Default choice for maximum wire fee.
-DEFAULT_MAX_WIRE_FEE = EUR:0.10
-
-# Default choice for maximum wire fee.
-DEFAULT_MAX_DEPOSIT_FEE = EUR:0.10
-
-[exchange-wire-test]
-# Enable 'test' for testing of the actual coin operations.
-ENABLE = YES
-
-BANK_URL = http://localhost:8083/
-
-# Fees for the forseeable future...
-# If you see this after 2017, update to match the next 10 years...
-WIRE-FEE-2017 = EUR:0.01
-WIRE-FEE-2018 = EUR:0.01
-WIRE-FEE-2019 = EUR:0.01
-WIRE-FEE-2020 = EUR:0.01
-WIRE-FEE-2021 = EUR:0.01
-WIRE-FEE-2022 = EUR:0.01
-WIRE-FEE-2023 = EUR:0.01
-WIRE-FEE-2024 = EUR:0.01
-WIRE-FEE-2025 = EUR:0.01
-WIRE-FEE-2026 = EUR:0.01
-CLOSING-FEE-2017 = EUR:0.01
-CLOSING-FEE-2018 = EUR:0.01
-CLOSING-FEE-2019 = EUR:0.01
-CLOSING-FEE-2020 = EUR:0.01
-CLOSING-FEE-2021 = EUR:0.01
-CLOSING-FEE-2022 = EUR:0.01
-CLOSING-FEE-2023 = EUR:0.01
-CLOSING-FEE-2024 = EUR:0.01
-CLOSING-FEE-2025 = EUR:0.01
-CLOSING-FEE-2026 = EUR:0.01
-
-
-[merchant-exchange-test]
+[exchange-kudos]
 # must target the twister's http port.
 URL = http://localhost:8888/
-MASTER_KEY = 98NJW3CQHZQGQXTY3K85K531XKPAPAVV4Q5V8PYYRR00NJGZWNVG
-
-[merchant-instance-default]
-KEYFILE = test_merchant.priv
-NAME = Kudos Inc.
-
-[merchant-instance-wireformat-default]
-TEST_RESPONSE_FILE = ${TALER_CONFIG_HOME}/merchant/wire/test.json
-
-[merchant-instance-tor]
-KEYFILE = tor_merchant.priv
-NAME = The Tor Project
-
-[merchant-instance-tip]
-KEYFILE = reserve_tip.priv
-TIP_EXCHANGE = http://localhost:8081/
-TIP_RESERVE_PRIV_FILENAME = reserve_key.priv
-NAME = Test Tipping Merchant
-
-[merchant-instance-dtip]
-KEYFILE = reserve_dtip.priv
-TIP_EXCHANGE = http://localhost:8088/
-TIP_RESERVE_PRIV_FILENAME = reserve_dkey.priv
-NAME = Test Tipping Merchant 2
-
-[merchant-instance-wireformat-tor]
-TEST_RESPONSE_FILE = ${TALER_CONFIG_HOME}/merchant/wire/test.json
-
-[merchant-instance-wireformat-tip]
-TEST_RESPONSE_FILE = ${TALER_CONFIG_HOME}/merchant/wire/test.json
-
-[merchant-instance-wireformat-dtip]
-TEST_RESPONSE_FILE = ${TALER_CONFIG_HOME}/merchant/wire/test.json
-
-# Auditors must be in sections "auditor-", the rest of the section
-# name could be anything.
-[merchant-auditor-ezb]
-# Informal name of the auditor. Just for the user.
-NAME = European Central Bank
-
-# URL of the auditor (especially for in the future, when the
-# auditor offers an automated issue reporting system).
-# Not really used today.
-URL = http://taler.ezb.eu/
-
-# This is the important bit: the signing key of the auditor.
-PUBLIC_KEY = 9QXF7XY7E9VPV47B5Z806NDFSX2VJ79SVHHD29QEQ3BG31ANHZ60
-
-# This specifies which database we use.
-[merchantdb-postgres]
-CONFIG = postgres:///talercheck
-
-# "wire-" sections include wire details, here for SEPA.
-[wire-sepa]
-IBAN = DE67830654080004822650
-NAME = GNUNET E.V
-BIC = GENODEF1SRL
-SALT = 17919252168512238964
-ADDRESS = "Garching"
-
-##########################
-# Exchange configuration #
-##########################
-
-[exchange]
-# How to access our database
-DB = postgres
-
-# HTTP port the exchange listens to
-PORT = 8081
-
-# Our public key
-MASTER_PUBLIC_KEY = T1VVFQZZARQ1CMF4BN58EE7SKTW5AV2BS18S87ZEGYS4S29J6DNG
-
-# Base URL of the (PROXIED) exchange.  This URL is where the
-# twister listens at, so that it will be able to get all the
-# connection addressed to the exchange.  In fact, the presence
-# of the twister is 100% transparent to the test case, as it
-# only seeks the exchange/BASE_URL URL to connect to the exchange.
-BASE_URL = "http://localhost:8888/";
-
-[exchangedb-postgres]
-DB_CONN_STR = "postgres:///talercheck"
-
-[exchange-wire-test]
-# This is the response we give out for the /wire request.  It provides
-# wallets with the bank information for transfers to the exchange.
-# Note that the _incoming_ account is #3, while the
-# outgoing account of the exchange (see below) is #2.
-TEST_RESPONSE_FILE = ${TALER_CONFIG_HOME}/test.json
-
-# What is the main website of the bank?
-BANK_URL = "http://localhost:8083/";
-# From which account at the 'bank' should outgoing wire transfers be made?
-BANK_ACCOUNT_NUMBER = 2
-
-
-[coin_eur_ct_1]
-value = EUR:0.01
-duration_overlap = 5 minutes
-duration_withdraw = 7 days
-duration_spend = 2 years
-duration_legal = 3 years
-fee_withdraw = EUR:0.00
-fee_deposit = EUR:0.00
-fee_refresh = EUR:0.01
-fee_refund = EUR:0.01
-rsa_keysize = 1024
-
-[coin_eur_ct_10]
-value = EUR:0.10
-duration_overlap = 5 minutes
-duration_withdraw = 7 days
-duration_spend = 2 years
-duration_legal = 3 years
-fee_withdraw = EUR:0.01
-fee_deposit = EUR:0.01
-fee_refresh = EUR:0.03
-fee_refund = EUR:0.01
-rsa_keysize = 1024
-
-[coin_eur_1]
-value = EUR:1
-duration_overlap = 5 minutes
-duration_withdraw = 7 days
-duration_spend = 2 years
-duration_legal = 3 years
-fee_withdraw = EUR:0.01
-fee_deposit = EUR:0.01
-fee_refresh = EUR:0.03
-fee_refund = EUR:0.01
-rsa_keysize = 1024
-
-[coin_eur_5]
-value = EUR:5
-duration_overlap = 5 minutes
-duration_withdraw = 7 days
-duration_spend = 2 years
-duration_legal = 3 years
-fee_withdraw = EUR:0.01
-fee_deposit = EUR:0.01
-fee_refresh = EUR:0.03
-fee_refund = EUR:0.01
-rsa_keysize = 1024

-- 
To stop receiving notification emails like this one, please contact
address@hidden



reply via email to

[Prev in Thread] Current Thread [Next in Thread]