diff options
Diffstat (limited to 'src/backend')
-rw-r--r-- | src/backend/anastasis-httpd.c | 15 | ||||
-rw-r--r-- | src/backend/anastasis-httpd_truth.c | 3 | ||||
-rw-r--r-- | src/backend/anastasis.conf | 35 |
3 files changed, 21 insertions, 32 deletions
diff --git a/src/backend/anastasis-httpd.c b/src/backend/anastasis-httpd.c index 8350ee7..fd5ffc3 100644 --- a/src/backend/anastasis-httpd.c +++ b/src/backend/anastasis-httpd.c @@ -708,12 +708,12 @@ run (void *cls, } if (GNUNET_OK != GNUNET_CONFIGURATION_get_value_string (config, - "anastasis", + "anastasis-merchant-backend", "PAYMENT_BACKEND_URL", &AH_backend_url)) { GNUNET_log_config_missing (GNUNET_ERROR_TYPE_ERROR, - "anastasis", + "anastasis-merchant-backend", "PAYMENT_BACKEND_URL"); GNUNET_SCHEDULER_shutdown (); return; @@ -726,7 +726,7 @@ run (void *cls, strlen ("http://"))) ) { GNUNET_log_config_invalid (GNUNET_ERROR_TYPE_ERROR, - "anastasis", + "anastasis-merchant-backend", "PAYMENT_BACKEND_URL", "Must be HTTP(S) URL"); GNUNET_SCHEDULER_shutdown (); @@ -739,7 +739,7 @@ run (void *cls, AH_backend_url)) ) { GNUNET_log_config_invalid (GNUNET_ERROR_TYPE_ERROR, - "anastasis", + "anastasis-merchant-backend", "PAYMENT_BACKEND_URL", "Must have domain name"); GNUNET_SCHEDULER_shutdown (); @@ -823,6 +823,13 @@ run (void *cls, certfile, keyfile, keypass); + if (NULL == apikey) + { + (void) GNUNET_CONFIGURATION_get_value_string (config, + "anastasis-merchant-backend", + "API_KEY", + &apikey); + } if (NULL != apikey) { char *auth_header; diff --git a/src/backend/anastasis-httpd_truth.c b/src/backend/anastasis-httpd_truth.c index ee0f2bf..0b9f4a3 100644 --- a/src/backend/anastasis-httpd_truth.c +++ b/src/backend/anastasis-httpd_truth.c @@ -1192,7 +1192,8 @@ AH_handler_truth_get ( GNUNET_free (method); } - if (! gc->authorization->payment_plugin_managed) + if ( (is_question) || + (! gc->authorization->payment_plugin_managed) ) { struct TALER_Amount zero_amount; diff --git a/src/backend/anastasis.conf b/src/backend/anastasis.conf index 23015ae..c10973c 100644 --- a/src/backend/anastasis.conf +++ b/src/backend/anastasis.conf @@ -30,7 +30,7 @@ DB = postgres # ANNUAL_FEE = TESTKUDOS:0.1 # Number of policy uploads included in one annual fee payment -ANNUAL_POLICY_UPLĂ„OAD_LIMIT = 64 +ANNUAL_POLICY_UPLOAD_LIMIT = 64 # Insurance # INSURANCE = TESTKUDOS:1.0 @@ -43,35 +43,16 @@ UPLOAD_LIMIT_MB = 16 # Cost of authentication by question #QUESTION_COST = EUR:0 -# Cost of authentication by file (only for testing purposes) -#FILE_COST = EUR:1 - -# Cost of authentication by E-Mail -#EMAIL_COST = EUR:0 - -# Cost of authentication by SMS -#SMS_COST = EUR:0 - -# Cost of authentication by postal -#POSTAL_COST = EUR:0 - -# Cost of authentication by video -#VIDEO_COST = EUR:0 - -#SMS authentication command which is executed -#SMSAUTH_COMMAND = some_sms_script.sh - -#E-Mail authentication command which is executed -#EMAILAUTH_COMMAND = some_email_script.sh - # Fulfillment URL of the ANASTASIS service itself. FULFILLMENT_URL = taler://fulfillment-success -# Base URL of our payment backend -# PAYMENT_BACKEND_URL = http://localhost:9976/ - # Server salt 16 Byte # SERVER_SALT = gUfO1KGOKYIFlFQg -# Supported methods -SUPPORTED_METHODS = question + +[anastasis-merchant-backend] +# Base URL of our payment backend +# PAYMENT_BACKEND_URL = http://localhost:9976/ + +# API Key to send to the backend for authorization +# API_KEY = |