aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/auditor/generate-auditor-basedb.conf2
-rw-r--r--src/auditor/test-auditor.conf1
-rw-r--r--src/benchmark/benchmark.conf2
-rw-r--r--src/exchange/taler-exchange-aggregator.c14
-rw-r--r--src/exchange/test_taler_exchange_httpd.conf1
-rw-r--r--src/exchangedb/exchangedb_accounts.c13
-rw-r--r--src/include/taler_bank_service.h3
-rw-r--r--src/testing/test-taler-exchange-aggregator-postgres.conf1
-rw-r--r--src/testing/test-taler-exchange-wirewatch-postgres.conf1
-rw-r--r--src/testing/test_auditor_api.conf6
-rw-r--r--src/testing/test_bank_api_fakebank.conf1
-rw-r--r--src/testing/test_bank_api_pybank_twisted.conf1
-rw-r--r--src/testing/test_exchange_api.conf4
-rw-r--r--src/testing/test_exchange_api_keys_cherry_picking.conf4
-rw-r--r--src/testing/test_exchange_api_twisted.conf3
15 files changed, 14 insertions, 43 deletions
diff --git a/src/auditor/generate-auditor-basedb.conf b/src/auditor/generate-auditor-basedb.conf
index 02ed14b77..a2b91f1e1 100644
--- a/src/auditor/generate-auditor-basedb.conf
+++ b/src/auditor/generate-auditor-basedb.conf
@@ -80,7 +80,6 @@ CURRENCY = TESTKUDOS
[exchange-account-1]
WIRE_RESPONSE = ${TALER_DATA_HOME}/exchange/account-1.json
PAYTO_URI = payto://x-taler-bank/localhost/Exchange
-METHOD = x-taler-bank
enable_debit = yes
enable_credit = yes
WIRE_GATEWAY_URL = "http://localhost:8082/taler-wire-gateway/Exchange/"
@@ -91,7 +90,6 @@ PASSWORD = x
[merchant-account-merchant]
PAYTO_URI = payto://x-taler-bank/localhost/42
WIRE_RESPONSE = ${TALER_CONFIG_HOME}/merchant/account-3.json
-METHOD = x-taler-bank
HONOR_default = YES
ACTIVE_default = YES
diff --git a/src/auditor/test-auditor.conf b/src/auditor/test-auditor.conf
index a76c91877..4906b55fd 100644
--- a/src/auditor/test-auditor.conf
+++ b/src/auditor/test-auditor.conf
@@ -5,7 +5,6 @@ TINY_AMOUNT = TESTKUDOS:0.01
[exchange-account-1]
WIRE_RESPONSE = ${TALER_DATA_HOME}/exchange/account-1.json
PAYTO_URI = payto://x-taler-bank/localhost/Exchange
-METHOD = x-taler-bank
enable_debit = yes
enable_credit = yes
WIRE_GATEWAY_URL = "http://localhost:8082/taler-wire-gateway/Exchange/"
diff --git a/src/benchmark/benchmark.conf b/src/benchmark/benchmark.conf
index f59d995c6..6bfa7a8a2 100644
--- a/src/benchmark/benchmark.conf
+++ b/src/benchmark/benchmark.conf
@@ -51,8 +51,6 @@ WIRE_GATEWAY_URL = http://localhost:8082/2/
# This is the response we give out for the /wire request. It provides
# wallets with the bank information for transfers to the exchange.
WIRE_RESPONSE = ${TALER_CONFIG_HOME}/account-2.json
-# Which wire method should we use to calculate fees?
-METHOD = x-taler-bank
# Authentication information for basic authentication
WIRE_GATEWAY_AUTH_METHOD = "basic"
username = user
diff --git a/src/exchange/taler-exchange-aggregator.c b/src/exchange/taler-exchange-aggregator.c
index 97809e068..e9474d89f 100644
--- a/src/exchange/taler-exchange-aggregator.c
+++ b/src/exchange/taler-exchange-aggregator.c
@@ -431,8 +431,7 @@ find_account_by_url (const char *url)
/**
* Function called with information about a wire account. Adds
- * the account to our list (if it is enabled and we can load the
- * plugin).
+ * the account to our list.
*
* @param cls closure, NULL
* @param ai account information
@@ -442,6 +441,7 @@ add_account_cb (void *cls,
const struct TALER_EXCHANGEDB_AccountInfo *ai)
{
struct WireAccount *wa;
+ char *payto_uri;
(void) cls;
if (GNUNET_YES != ai->debit_enabled)
@@ -450,22 +450,24 @@ add_account_cb (void *cls,
if (GNUNET_OK !=
GNUNET_CONFIGURATION_get_value_string (cfg,
ai->section_name,
- "METHOD",
- &wa->method))
+ "PAYTO_URI",
+ &payto_uri))
{
GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR,
ai->section_name,
- "METHOD");
+ "PAYTO_URI");
GNUNET_free (wa);
return;
}
+ wa->method = TALER_payto_get_method (payto_uri);
+ GNUNET_free (payto_uri);
if (GNUNET_OK !=
TALER_BANK_auth_parse_cfg (cfg,
ai->section_name,
&wa->auth))
{
GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE,
- "Failed to load account `%s'\n",
+ "Failed to load exchange account `%s'\n",
ai->section_name);
GNUNET_free (wa->method);
GNUNET_free (wa);
diff --git a/src/exchange/test_taler_exchange_httpd.conf b/src/exchange/test_taler_exchange_httpd.conf
index 7a233f127..8c2f944c8 100644
--- a/src/exchange/test_taler_exchange_httpd.conf
+++ b/src/exchange/test_taler_exchange_httpd.conf
@@ -49,7 +49,6 @@ CONFIG = "postgres:///talercheck"
[exchange-account-1]
PAYTO_URI = "payto://x-taler-bank/localhost:8082/3"
WIRE_RESPONSE = ${TALER_CONFIG_HOME}/account-1.json
-METHOD = "x-taler-bank"
ENABLE_DEBIT = YES
ENABLE_CREDIT = YES
TALER_BANK_AUTH_METHOD = NONE
diff --git a/src/exchangedb/exchangedb_accounts.c b/src/exchangedb/exchangedb_accounts.c
index fd8ed5381..532e27f63 100644
--- a/src/exchangedb/exchangedb_accounts.c
+++ b/src/exchangedb/exchangedb_accounts.c
@@ -78,15 +78,12 @@ check_for_account (void *cls,
"PAYTO_URI");
return;
}
- if (GNUNET_OK !=
- GNUNET_CONFIGURATION_get_value_string (ctx->cfg,
- section,
- "METHOD",
- &method))
+ method = TALER_payto_get_method (payto_uri);
+ if (NULL == method)
{
- GNUNET_log_config_missing (GNUNET_ERROR_TYPE_WARNING,
- section,
- "METHOD");
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ "payto URI in config ([%s]/PAYTO_URI) malformed\n",
+ section);
GNUNET_free (payto_uri);
return;
}
diff --git a/src/include/taler_bank_service.h b/src/include/taler_bank_service.h
index 4b2aca664..98a1017c2 100644
--- a/src/include/taler_bank_service.h
+++ b/src/include/taler_bank_service.h
@@ -462,8 +462,7 @@ TALER_BANK_debit_history_cancel (struct TALER_BANK_DebitHistoryHandle *hh);
/**
* Convenience method for parsing configuration section with bank
- * authentication data. The section must contain an option
- * "METHOD", plus other options that depend on the METHOD specified.
+ * authentication data.
*
* @param cfg configuration to parse
* @param section the section with the configuration data
diff --git a/src/testing/test-taler-exchange-aggregator-postgres.conf b/src/testing/test-taler-exchange-aggregator-postgres.conf
index 6f5f9d83a..0f8ed70d9 100644
--- a/src/testing/test-taler-exchange-aggregator-postgres.conf
+++ b/src/testing/test-taler-exchange-aggregator-postgres.conf
@@ -62,7 +62,6 @@ WIRE_GATEWAY_URL = "http://localhost:8082/2/"
WIRE_GATEWAY_AUTH_METHOD = basic
USERNAME = Exchange
PASSWORD = x
-method = "x-taler-bank"
WIRE_RESPONSE = ${TALER_CONFIG_HOME}/account-1.json
ENABLE_DEBIT = YES
ENABLE_CREDIT = YES
diff --git a/src/testing/test-taler-exchange-wirewatch-postgres.conf b/src/testing/test-taler-exchange-wirewatch-postgres.conf
index 19db0e0bf..168e7eda3 100644
--- a/src/testing/test-taler-exchange-wirewatch-postgres.conf
+++ b/src/testing/test-taler-exchange-wirewatch-postgres.conf
@@ -53,7 +53,6 @@ WIRE_GATEWAY_AUTH_METHOD = basic
USERNAME = Exchange
PASSWORD = x
-METHOD = x-taler-bank
WIRE_RESPONSE = ${TALER_CONFIG_HOME}/account-1.json
PLUGIN = "taler_bank"
ENABLE_DEBIT = YES
diff --git a/src/testing/test_auditor_api.conf b/src/testing/test_auditor_api.conf
index 9a4804908..da84149b0 100644
--- a/src/testing/test_auditor_api.conf
+++ b/src/testing/test_auditor_api.conf
@@ -65,9 +65,6 @@ WIRE_GATEWAY_URL = "http://localhost:8082/42/"
# wallets with the bank information for transfers to the exchange.
WIRE_RESPONSE = ${TALER_CONFIG_HOME}/account-1.json
-# Which wire plugin should we used to access the account?
-METHOD = x-taler-bank
-
[bank]
HTTP_PORT = 8082
@@ -82,9 +79,6 @@ PAYTO_URI = "payto://x-taler-bank/localhost/2"
# wallets with the bank information for transfers to the exchange.
WIRE_RESPONSE = ${TALER_CONFIG_HOME}/account-2.json
-# Which wire plugin should we used to access the account?
-METHOD = x-taler-bank
-
# Authentication information for basic authentication
WIRE_GATEWAY_AUTH_METHOD = "basic"
USERNAME = user
diff --git a/src/testing/test_bank_api_fakebank.conf b/src/testing/test_bank_api_fakebank.conf
index 3d448ec52..5d5053599 100644
--- a/src/testing/test_bank_api_fakebank.conf
+++ b/src/testing/test_bank_api_fakebank.conf
@@ -5,7 +5,6 @@ currency = KUDOS
[exchange-account-2]
PAYTO_URI = payto://x-taler-bank/localhost/2
-METHOD = x-taler-bank
WIRE_GATEWAY_URL = "http://localhost:8081/2/"
WIRE_GATEWAY_AUTH_METHOD = basic
USERNAME = Exchange
diff --git a/src/testing/test_bank_api_pybank_twisted.conf b/src/testing/test_bank_api_pybank_twisted.conf
index 3801590bf..9fe0fa1cb 100644
--- a/src/testing/test_bank_api_pybank_twisted.conf
+++ b/src/testing/test_bank_api_pybank_twisted.conf
@@ -35,7 +35,6 @@ PAYTO_URI = payto://x-taler-bank/localhost/1
[exchange-account-2]
PAYTO_URI = payto://x-taler-bank/localhost/Exchange
-METHOD = x-taler-bank
WIRE_GATEWAY_URL = "http://localhost:8888/taler-wire-gateway/Exchange/"
WIRE_GATEWAY_AUTH_METHOD = basic
USERNAME = Exchange
diff --git a/src/testing/test_exchange_api.conf b/src/testing/test_exchange_api.conf
index ed74d89ec..6af202e30 100644
--- a/src/testing/test_exchange_api.conf
+++ b/src/testing/test_exchange_api.conf
@@ -64,8 +64,6 @@ PAYTO_URI = "payto://x-taler-bank/localhost/42"
# This is the response we give out for the /wire request. It provides
# wallets with the bank information for transfers to the exchange.
WIRE_RESPONSE = ${TALER_CONFIG_HOME}/account-1.json
-# Which wire plugin should we used to access the account?
-METHOD = x-taler-bank
WIRE_GATEWAY_URL = "http://localhost:9081/42/"
@@ -84,8 +82,6 @@ WIRE_GATEWAY_AUTH_METHOD = basic
USERNAME = Exchange
PASSWORD = x
-METHOD = x-taler-bank
-
WIRE_GATEWAY_URL = "http://localhost:9081/2/"
ENABLE_DEBIT = YES
diff --git a/src/testing/test_exchange_api_keys_cherry_picking.conf b/src/testing/test_exchange_api_keys_cherry_picking.conf
index 6823e81de..0416c8eec 100644
--- a/src/testing/test_exchange_api_keys_cherry_picking.conf
+++ b/src/testing/test_exchange_api_keys_cherry_picking.conf
@@ -73,8 +73,6 @@ WIRE_RESPONSE = ${TALER_CONFIG_HOME}/iban.json
# What is the URL of our bank account? Must match WIRE_RESPONSE above!
PAYTO_URI = payto://x-taler-bank/localhost/42
-METHOD = "x-taler-bank"
-
WIRE_GATEWAY_URL = "http://localhost:9082/42/"
@@ -88,8 +86,6 @@ PAYTO_URI = payto://x-taler-bank/localhost/2
WIRE_GATEWAY_URL = "http://localhost:9082/2/"
-METHOD = "x-taler-bank"
-
# Authentication information for basic authentication
TALER_BANK_AUTH_METHOD = "basic"
USERNAME = user
diff --git a/src/testing/test_exchange_api_twisted.conf b/src/testing/test_exchange_api_twisted.conf
index 5158aefeb..2cda46e5a 100644
--- a/src/testing/test_exchange_api_twisted.conf
+++ b/src/testing/test_exchange_api_twisted.conf
@@ -62,8 +62,6 @@ PAYTO_URI = "payto://x-taler-bank/localhost/42"
# This is the response we give out for the /wire request. It provides
# wallets with the bank information for transfers to the exchange.
WIRE_RESPONSE = ${TALER_CONFIG_HOME}/account-1.json
-# Which wire plugin should we used to access the account?
-METHOD = x-taler-bank
WIRE_GATEWAY_URL = "http://localhost:9081/42/"
WIRE_GATEWAY_AUTH_METHOD = NONE
@@ -77,7 +75,6 @@ USERNAME = user
PASSWORD = pass
ENABLE_DEBIT = YES
ENABLE_CREDIT = YES
-METHOD = x-taler-bank
[bank]