remove redundant METHOD option, we can derive it from PAYTO_URI
This commit is contained in:
parent
6074790867
commit
cb58740fbd
@ -80,7 +80,6 @@ CURRENCY = TESTKUDOS
|
|||||||
[exchange-account-1]
|
[exchange-account-1]
|
||||||
WIRE_RESPONSE = ${TALER_DATA_HOME}/exchange/account-1.json
|
WIRE_RESPONSE = ${TALER_DATA_HOME}/exchange/account-1.json
|
||||||
PAYTO_URI = payto://x-taler-bank/localhost/Exchange
|
PAYTO_URI = payto://x-taler-bank/localhost/Exchange
|
||||||
METHOD = x-taler-bank
|
|
||||||
enable_debit = yes
|
enable_debit = yes
|
||||||
enable_credit = yes
|
enable_credit = yes
|
||||||
WIRE_GATEWAY_URL = "http://localhost:8082/taler-wire-gateway/Exchange/"
|
WIRE_GATEWAY_URL = "http://localhost:8082/taler-wire-gateway/Exchange/"
|
||||||
@ -91,7 +90,6 @@ PASSWORD = x
|
|||||||
[merchant-account-merchant]
|
[merchant-account-merchant]
|
||||||
PAYTO_URI = payto://x-taler-bank/localhost/42
|
PAYTO_URI = payto://x-taler-bank/localhost/42
|
||||||
WIRE_RESPONSE = ${TALER_CONFIG_HOME}/merchant/account-3.json
|
WIRE_RESPONSE = ${TALER_CONFIG_HOME}/merchant/account-3.json
|
||||||
METHOD = x-taler-bank
|
|
||||||
HONOR_default = YES
|
HONOR_default = YES
|
||||||
ACTIVE_default = YES
|
ACTIVE_default = YES
|
||||||
|
|
||||||
|
@ -5,7 +5,6 @@ TINY_AMOUNT = TESTKUDOS:0.01
|
|||||||
[exchange-account-1]
|
[exchange-account-1]
|
||||||
WIRE_RESPONSE = ${TALER_DATA_HOME}/exchange/account-1.json
|
WIRE_RESPONSE = ${TALER_DATA_HOME}/exchange/account-1.json
|
||||||
PAYTO_URI = payto://x-taler-bank/localhost/Exchange
|
PAYTO_URI = payto://x-taler-bank/localhost/Exchange
|
||||||
METHOD = x-taler-bank
|
|
||||||
enable_debit = yes
|
enable_debit = yes
|
||||||
enable_credit = yes
|
enable_credit = yes
|
||||||
WIRE_GATEWAY_URL = "http://localhost:8082/taler-wire-gateway/Exchange/"
|
WIRE_GATEWAY_URL = "http://localhost:8082/taler-wire-gateway/Exchange/"
|
||||||
|
@ -51,8 +51,6 @@ WIRE_GATEWAY_URL = http://localhost:8082/2/
|
|||||||
# This is the response we give out for the /wire request. It provides
|
# This is the response we give out for the /wire request. It provides
|
||||||
# wallets with the bank information for transfers to the exchange.
|
# wallets with the bank information for transfers to the exchange.
|
||||||
WIRE_RESPONSE = ${TALER_CONFIG_HOME}/account-2.json
|
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
|
# Authentication information for basic authentication
|
||||||
WIRE_GATEWAY_AUTH_METHOD = "basic"
|
WIRE_GATEWAY_AUTH_METHOD = "basic"
|
||||||
username = user
|
username = user
|
||||||
|
@ -431,8 +431,7 @@ find_account_by_url (const char *url)
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Function called with information about a wire account. Adds
|
* Function called with information about a wire account. Adds
|
||||||
* the account to our list (if it is enabled and we can load the
|
* the account to our list.
|
||||||
* plugin).
|
|
||||||
*
|
*
|
||||||
* @param cls closure, NULL
|
* @param cls closure, NULL
|
||||||
* @param ai account information
|
* @param ai account information
|
||||||
@ -442,6 +441,7 @@ add_account_cb (void *cls,
|
|||||||
const struct TALER_EXCHANGEDB_AccountInfo *ai)
|
const struct TALER_EXCHANGEDB_AccountInfo *ai)
|
||||||
{
|
{
|
||||||
struct WireAccount *wa;
|
struct WireAccount *wa;
|
||||||
|
char *payto_uri;
|
||||||
|
|
||||||
(void) cls;
|
(void) cls;
|
||||||
if (GNUNET_YES != ai->debit_enabled)
|
if (GNUNET_YES != ai->debit_enabled)
|
||||||
@ -450,22 +450,24 @@ add_account_cb (void *cls,
|
|||||||
if (GNUNET_OK !=
|
if (GNUNET_OK !=
|
||||||
GNUNET_CONFIGURATION_get_value_string (cfg,
|
GNUNET_CONFIGURATION_get_value_string (cfg,
|
||||||
ai->section_name,
|
ai->section_name,
|
||||||
"METHOD",
|
"PAYTO_URI",
|
||||||
&wa->method))
|
&payto_uri))
|
||||||
{
|
{
|
||||||
GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR,
|
GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR,
|
||||||
ai->section_name,
|
ai->section_name,
|
||||||
"METHOD");
|
"PAYTO_URI");
|
||||||
GNUNET_free (wa);
|
GNUNET_free (wa);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
wa->method = TALER_payto_get_method (payto_uri);
|
||||||
|
GNUNET_free (payto_uri);
|
||||||
if (GNUNET_OK !=
|
if (GNUNET_OK !=
|
||||||
TALER_BANK_auth_parse_cfg (cfg,
|
TALER_BANK_auth_parse_cfg (cfg,
|
||||||
ai->section_name,
|
ai->section_name,
|
||||||
&wa->auth))
|
&wa->auth))
|
||||||
{
|
{
|
||||||
GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE,
|
GNUNET_log (GNUNET_ERROR_TYPE_MESSAGE,
|
||||||
"Failed to load account `%s'\n",
|
"Failed to load exchange account `%s'\n",
|
||||||
ai->section_name);
|
ai->section_name);
|
||||||
GNUNET_free (wa->method);
|
GNUNET_free (wa->method);
|
||||||
GNUNET_free (wa);
|
GNUNET_free (wa);
|
||||||
|
@ -49,7 +49,6 @@ CONFIG = "postgres:///talercheck"
|
|||||||
[exchange-account-1]
|
[exchange-account-1]
|
||||||
PAYTO_URI = "payto://x-taler-bank/localhost:8082/3"
|
PAYTO_URI = "payto://x-taler-bank/localhost:8082/3"
|
||||||
WIRE_RESPONSE = ${TALER_CONFIG_HOME}/account-1.json
|
WIRE_RESPONSE = ${TALER_CONFIG_HOME}/account-1.json
|
||||||
METHOD = "x-taler-bank"
|
|
||||||
ENABLE_DEBIT = YES
|
ENABLE_DEBIT = YES
|
||||||
ENABLE_CREDIT = YES
|
ENABLE_CREDIT = YES
|
||||||
TALER_BANK_AUTH_METHOD = NONE
|
TALER_BANK_AUTH_METHOD = NONE
|
||||||
|
@ -78,15 +78,12 @@ check_for_account (void *cls,
|
|||||||
"PAYTO_URI");
|
"PAYTO_URI");
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
if (GNUNET_OK !=
|
method = TALER_payto_get_method (payto_uri);
|
||||||
GNUNET_CONFIGURATION_get_value_string (ctx->cfg,
|
if (NULL == method)
|
||||||
section,
|
|
||||||
"METHOD",
|
|
||||||
&method))
|
|
||||||
{
|
{
|
||||||
GNUNET_log_config_missing (GNUNET_ERROR_TYPE_WARNING,
|
GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
|
||||||
section,
|
"payto URI in config ([%s]/PAYTO_URI) malformed\n",
|
||||||
"METHOD");
|
section);
|
||||||
GNUNET_free (payto_uri);
|
GNUNET_free (payto_uri);
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
@ -462,8 +462,7 @@ TALER_BANK_debit_history_cancel (struct TALER_BANK_DebitHistoryHandle *hh);
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* Convenience method for parsing configuration section with bank
|
* Convenience method for parsing configuration section with bank
|
||||||
* authentication data. The section must contain an option
|
* authentication data.
|
||||||
* "METHOD", plus other options that depend on the METHOD specified.
|
|
||||||
*
|
*
|
||||||
* @param cfg configuration to parse
|
* @param cfg configuration to parse
|
||||||
* @param section the section with the configuration data
|
* @param section the section with the configuration data
|
||||||
|
@ -62,7 +62,6 @@ WIRE_GATEWAY_URL = "http://localhost:8082/2/"
|
|||||||
WIRE_GATEWAY_AUTH_METHOD = basic
|
WIRE_GATEWAY_AUTH_METHOD = basic
|
||||||
USERNAME = Exchange
|
USERNAME = Exchange
|
||||||
PASSWORD = x
|
PASSWORD = x
|
||||||
method = "x-taler-bank"
|
|
||||||
WIRE_RESPONSE = ${TALER_CONFIG_HOME}/account-1.json
|
WIRE_RESPONSE = ${TALER_CONFIG_HOME}/account-1.json
|
||||||
ENABLE_DEBIT = YES
|
ENABLE_DEBIT = YES
|
||||||
ENABLE_CREDIT = YES
|
ENABLE_CREDIT = YES
|
||||||
|
@ -53,7 +53,6 @@ WIRE_GATEWAY_AUTH_METHOD = basic
|
|||||||
USERNAME = Exchange
|
USERNAME = Exchange
|
||||||
PASSWORD = x
|
PASSWORD = x
|
||||||
|
|
||||||
METHOD = x-taler-bank
|
|
||||||
WIRE_RESPONSE = ${TALER_CONFIG_HOME}/account-1.json
|
WIRE_RESPONSE = ${TALER_CONFIG_HOME}/account-1.json
|
||||||
PLUGIN = "taler_bank"
|
PLUGIN = "taler_bank"
|
||||||
ENABLE_DEBIT = YES
|
ENABLE_DEBIT = YES
|
||||||
|
@ -65,9 +65,6 @@ WIRE_GATEWAY_URL = "http://localhost:8082/42/"
|
|||||||
# wallets with the bank information for transfers to the exchange.
|
# wallets with the bank information for transfers to the exchange.
|
||||||
WIRE_RESPONSE = ${TALER_CONFIG_HOME}/account-1.json
|
WIRE_RESPONSE = ${TALER_CONFIG_HOME}/account-1.json
|
||||||
|
|
||||||
# Which wire plugin should we used to access the account?
|
|
||||||
METHOD = x-taler-bank
|
|
||||||
|
|
||||||
[bank]
|
[bank]
|
||||||
HTTP_PORT = 8082
|
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.
|
# wallets with the bank information for transfers to the exchange.
|
||||||
WIRE_RESPONSE = ${TALER_CONFIG_HOME}/account-2.json
|
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
|
# Authentication information for basic authentication
|
||||||
WIRE_GATEWAY_AUTH_METHOD = "basic"
|
WIRE_GATEWAY_AUTH_METHOD = "basic"
|
||||||
USERNAME = user
|
USERNAME = user
|
||||||
|
@ -5,7 +5,6 @@ currency = KUDOS
|
|||||||
|
|
||||||
[exchange-account-2]
|
[exchange-account-2]
|
||||||
PAYTO_URI = payto://x-taler-bank/localhost/2
|
PAYTO_URI = payto://x-taler-bank/localhost/2
|
||||||
METHOD = x-taler-bank
|
|
||||||
WIRE_GATEWAY_URL = "http://localhost:8081/2/"
|
WIRE_GATEWAY_URL = "http://localhost:8081/2/"
|
||||||
WIRE_GATEWAY_AUTH_METHOD = basic
|
WIRE_GATEWAY_AUTH_METHOD = basic
|
||||||
USERNAME = Exchange
|
USERNAME = Exchange
|
||||||
|
@ -35,7 +35,6 @@ PAYTO_URI = payto://x-taler-bank/localhost/1
|
|||||||
|
|
||||||
[exchange-account-2]
|
[exchange-account-2]
|
||||||
PAYTO_URI = payto://x-taler-bank/localhost/Exchange
|
PAYTO_URI = payto://x-taler-bank/localhost/Exchange
|
||||||
METHOD = x-taler-bank
|
|
||||||
WIRE_GATEWAY_URL = "http://localhost:8888/taler-wire-gateway/Exchange/"
|
WIRE_GATEWAY_URL = "http://localhost:8888/taler-wire-gateway/Exchange/"
|
||||||
WIRE_GATEWAY_AUTH_METHOD = basic
|
WIRE_GATEWAY_AUTH_METHOD = basic
|
||||||
USERNAME = Exchange
|
USERNAME = Exchange
|
||||||
|
@ -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
|
# This is the response we give out for the /wire request. It provides
|
||||||
# wallets with the bank information for transfers to the exchange.
|
# wallets with the bank information for transfers to the exchange.
|
||||||
WIRE_RESPONSE = ${TALER_CONFIG_HOME}/account-1.json
|
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_URL = "http://localhost:9081/42/"
|
||||||
|
|
||||||
@ -84,8 +82,6 @@ WIRE_GATEWAY_AUTH_METHOD = basic
|
|||||||
USERNAME = Exchange
|
USERNAME = Exchange
|
||||||
PASSWORD = x
|
PASSWORD = x
|
||||||
|
|
||||||
METHOD = x-taler-bank
|
|
||||||
|
|
||||||
WIRE_GATEWAY_URL = "http://localhost:9081/2/"
|
WIRE_GATEWAY_URL = "http://localhost:9081/2/"
|
||||||
|
|
||||||
ENABLE_DEBIT = YES
|
ENABLE_DEBIT = YES
|
||||||
|
@ -73,8 +73,6 @@ WIRE_RESPONSE = ${TALER_CONFIG_HOME}/iban.json
|
|||||||
# What is the URL of our bank account? Must match WIRE_RESPONSE above!
|
# What is the URL of our bank account? Must match WIRE_RESPONSE above!
|
||||||
PAYTO_URI = payto://x-taler-bank/localhost/42
|
PAYTO_URI = payto://x-taler-bank/localhost/42
|
||||||
|
|
||||||
METHOD = "x-taler-bank"
|
|
||||||
|
|
||||||
WIRE_GATEWAY_URL = "http://localhost:9082/42/"
|
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/"
|
WIRE_GATEWAY_URL = "http://localhost:9082/2/"
|
||||||
|
|
||||||
METHOD = "x-taler-bank"
|
|
||||||
|
|
||||||
# Authentication information for basic authentication
|
# Authentication information for basic authentication
|
||||||
TALER_BANK_AUTH_METHOD = "basic"
|
TALER_BANK_AUTH_METHOD = "basic"
|
||||||
USERNAME = user
|
USERNAME = user
|
||||||
|
@ -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
|
# This is the response we give out for the /wire request. It provides
|
||||||
# wallets with the bank information for transfers to the exchange.
|
# wallets with the bank information for transfers to the exchange.
|
||||||
WIRE_RESPONSE = ${TALER_CONFIG_HOME}/account-1.json
|
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_URL = "http://localhost:9081/42/"
|
||||||
WIRE_GATEWAY_AUTH_METHOD = NONE
|
WIRE_GATEWAY_AUTH_METHOD = NONE
|
||||||
|
|
||||||
@ -77,7 +75,6 @@ USERNAME = user
|
|||||||
PASSWORD = pass
|
PASSWORD = pass
|
||||||
ENABLE_DEBIT = YES
|
ENABLE_DEBIT = YES
|
||||||
ENABLE_CREDIT = YES
|
ENABLE_CREDIT = YES
|
||||||
METHOD = x-taler-bank
|
|
||||||
|
|
||||||
|
|
||||||
[bank]
|
[bank]
|
||||||
|
Loading…
Reference in New Issue
Block a user