commit 39caed545966566f8934780682ddc39643e0ac5b parent b863e9ef6e2574ad3dfed5d3869230bbdb03e6f2 Author: Christian Grothoff <christian@grothoff.org> Date: Sat, 28 Mar 2026 11:38:55 +0100 make libdonau mandatory dependency for merchant Diffstat:
19 files changed, 34 insertions(+), 237 deletions(-)
diff --git a/configure.ac b/configure.ac @@ -312,6 +312,13 @@ AS_CASE([$with_donau], AC_CHECK_HEADERS([donau/donau_service.h], [AC_CHECK_LIB([donau], [DONAU_get_keys], libdonau=1)]) AM_CONDITIONAL(HAVE_DONAU, test x$libdonau = x1) +AS_IF([test $libdonau != 1], + [AC_MSG_ERROR([[ +*** +*** You need libdonau >= 5:0:0 to build this program. +*** This library is part of the GNU Taler donau, available at +*** https://taler.net +*** ]])]) diff --git a/src/backend/Makefile.am b/src/backend/Makefile.am @@ -292,12 +292,20 @@ taler_merchant_httpd_SOURCES = \ taler-merchant-httpd_post-private-groups.c \ taler-merchant-httpd_post-private-groups.h \ taler-merchant-httpd_statics.c \ - taler-merchant-httpd_statics.h + taler-merchant-httpd_statics.h \ + taler-merchant-httpd_get-private-donau.c \ + taler-merchant-httpd_get-private-donau.h \ + taler-merchant-httpd_post-private-donau.c \ + taler-merchant-httpd_post-private-donau.h \ + taler-merchant-httpd_delete-private-donau-DONAU_SERIAL.c \ + taler-merchant-httpd_delete-private-donau-DONAU_SERIAL.h taler_merchant_httpd_LDADD = \ $(top_builddir)/src/backenddb/libtalermerchantdb.la \ $(top_builddir)/src/bank/libtalermerchantbank.la \ $(top_builddir)/src/util/libtalermerchantutil.la \ + -ldonau \ + -ldonaujson \ -ltalerexchange \ -ltalertemplating \ -ltalermhd \ @@ -314,19 +322,6 @@ taler_merchant_httpd_LDADD = \ @QR_LIBS@ \ $(XLIB) -if HAVE_DONAU -taler_merchant_httpd_LDADD += \ - -ldonau \ - -ldonaujson - -taler_merchant_httpd_SOURCES += \ - taler-merchant-httpd_get-private-donau.c \ - taler-merchant-httpd_get-private-donau.h \ - taler-merchant-httpd_post-private-donau.c \ - taler-merchant-httpd_post-private-donau.h \ - taler-merchant-httpd_delete-private-donau-DONAU_SERIAL.c \ - taler-merchant-httpd_delete-private-donau-DONAU_SERIAL.h -endif taler_merchant_httpd_CFLAGS = \ @QR_CFLAGS@ \ diff --git a/src/backend/taler-merchant-httpd_dispatcher.c b/src/backend/taler-merchant-httpd_dispatcher.c @@ -122,12 +122,9 @@ #include "taler-merchant-httpd_post-private-groups.h" #include "taler-merchant-httpd_patch-private-groups-GROUP_ID.h" #include "taler-merchant-httpd_delete-private-groups-GROUP_ID.h" - -#ifdef HAVE_DONAU_DONAU_SERVICE_H #include "taler-merchant-httpd_get-private-donau.h" #include "taler-merchant-httpd_post-private-donau.h" #include "taler-merchant-httpd_delete-private-donau-DONAU_SERIAL.h" -#endif /** @@ -1018,8 +1015,6 @@ determine_handler_group (const char **urlp, .permission = "pots-write" }, - -#ifdef HAVE_DONAU_DONAU_SERVICE_H /* GET /donau */ { .url_prefix = "/donau", @@ -1039,7 +1034,6 @@ determine_handler_group (const char **urlp, .have_id_segment = true, .handler = &TMH_private_delete_donau_instance_ID }, - #endif /* GET /statistics-counter/$SLUG: */ { .url_prefix = "/statistics-counter/", diff --git a/src/backend/taler-merchant-httpd_get-config.c b/src/backend/taler-merchant-httpd_get-config.c @@ -180,13 +180,8 @@ MH_handler_config (const struct TMH_RequestHandler *rh, GNUNET_JSON_pack_bool ("have_self_provisioning", GNUNET_YES == TMH_have_self_provisioning), -#ifdef HAVE_DONAU_DONAU_SERVICE_H GNUNET_JSON_pack_bool ("have_donau", true), -#else - GNUNET_JSON_pack_bool ("have_donau", - false), -#endif GNUNET_JSON_pack_object_steal ("currencies", specs), GNUNET_JSON_pack_allow_null ( diff --git a/src/backend/taler-merchant-httpd_post-orders-ORDER_ID-pay.c b/src/backend/taler-merchant-httpd_post-orders-ORDER_ID-pay.c @@ -47,12 +47,9 @@ #include "taler-merchant-httpd_get-private-orders.h" #include "taler/taler_merchant_util.h" #include "taler/taler_merchantdb_plugin.h" - -#ifdef HAVE_DONAU_DONAU_SERVICE_H #include <donau/donau_service.h> #include <donau/donau_util.h> #include <donau/donau_json_lib.h> -#endif /** * How often do we retry the (complex!) database transaction? @@ -595,7 +592,6 @@ struct PayContext */ uint64_t donau_instance_serial; -#ifdef HAVE_DONAU_DONAU_SERVICE_H /** * Number of the blinded key pairs @e bkps */ @@ -635,7 +631,6 @@ struct PayContext * Amount from BKPS */ struct TALER_Amount donation_amount; -#endif } parse_wallet_data; @@ -812,7 +807,6 @@ struct PayContext } batch_deposits; -#ifdef HAVE_DONAU_DONAU_SERVICE_H /** * Struct for #phase_request_donation_receipt() */ @@ -824,7 +818,6 @@ struct PayContext struct DONAU_BatchIssueReceiptHandle *birh; } donau_receipt; -#endif }; @@ -2034,7 +2027,6 @@ phase_final_output_token_processing (struct PayContext *pc) pc->phase++; return; } -#ifdef HAVE_DONAU_DONAU_SERVICE_H if (pc->parse_wallet_data.num_bkps > 0) { qs = TMH_db->update_donau_instance_receipts_amount ( @@ -2058,7 +2050,6 @@ phase_final_output_token_processing (struct PayContext *pc) break; } } -#endif for (unsigned int i = 0; i < pc->output_tokens_len; i++) @@ -2122,8 +2113,6 @@ OUTER: } -#ifdef HAVE_DONAU_DONAU_SERVICE_H - /** * Add donation receipt outputs to the output_tokens. * @@ -2310,9 +2299,6 @@ phase_request_donation_receipt (struct PayContext *pc) } -#endif - - /** * Increment the money pot @a pot_id in @a pc by @a increment. * @@ -3670,7 +3656,6 @@ handle_output_token (struct PayContext *pc, } -#ifdef HAVE_DONAU_DONAU_SERVICE_H /** * Handle checks for contract output of type TALER_MERCHANT_CONTRACT_OUTPUT_TYPE_DONATION_RECEIPT. * For now, this does nothing and simply returns #GNUNET_OK. @@ -3785,9 +3770,6 @@ handle_output_donation_receipt ( } -#endif /* HAVE_DONAU_DONAU_SERVICE_H */ - - /** * Count tokens produced by an output. * @@ -3807,11 +3789,7 @@ count_output_tokens (const struct PayContext *pc, case TALER_MERCHANT_CONTRACT_OUTPUT_TYPE_TOKEN: return output->details.token.count; case TALER_MERCHANT_CONTRACT_OUTPUT_TYPE_DONATION_RECEIPT: -#ifdef HAVE_DONAU_DONAU_SERVICE_H return pc->parse_wallet_data.num_bkps; -#else - return 0; -#endif } /* Not reached. */ GNUNET_assert (0); @@ -3952,7 +3930,6 @@ phase_validate_tokens (struct PayContext *pc) return; } pc->validate_tokens.donau_output_index = i; -#ifdef HAVE_DONAU_DONAU_SERVICE_H if (output_off + pc->parse_wallet_data.num_bkps < output_off) { GNUNET_break_op (0); @@ -3965,7 +3942,6 @@ phase_validate_tokens (struct PayContext *pc) return; } output_off += pc->parse_wallet_data.num_bkps; -#endif break; } } @@ -4016,11 +3992,6 @@ phase_validate_tokens (struct PayContext *pc) output_off += cnt; break; case TALER_MERCHANT_CONTRACT_OUTPUT_TYPE_DONATION_RECEIPT: -#ifndef HAVE_DONAU_DONAU_SERVICE_H - /* We checked at parse time, and - wallet didn't want donau, so OK! */ - return; -#else if ( (0 != pc->parse_wallet_data.num_bkps) && (GNUNET_OK != handle_output_donation_receipt (pc, @@ -4031,7 +4002,6 @@ phase_validate_tokens (struct PayContext *pc) } output_off += pc->parse_wallet_data.num_bkps; continue; -#endif } /* switch on output token */ } /* for all output token types */ } /* case contract v1 */ @@ -4706,7 +4676,6 @@ phase_parse_wallet_data (struct PayContext *pc) } } -#ifdef HAVE_DONAU_DONAU_SERVICE_H if (NULL != donau_obj) { const char *donau_url_tmp; @@ -4832,20 +4801,6 @@ phase_parse_wallet_data (struct PayContext *pc) pc->parse_wallet_data.bkps = bkps; } } -#else - /* Donau not compiled in: reject request if a donau object was given. */ - if (NULL != donau_obj) - { - pay_end (pc, - TALER_MHD_reply_with_error ( - pc->connection, - MHD_HTTP_NOT_IMPLEMENTED, - TALER_EC_MERCHANT_GENERIC_DONAU_NOT_CONFIGURED, - "donau support disabled")); - return; - } -#endif /* HAVE_DONAU_DONAU_SERVICE_H */ - TALER_json_hash (pc->parse_pay.wallet_data, &pc->parse_wallet_data.h_wallet_data); @@ -5213,7 +5168,6 @@ pay_context_cleanup (void *cls) GNUNET_free (pc->check_contract.pos_key); GNUNET_free (pc->compute_money_pots.pots); GNUNET_free (pc->compute_money_pots.increments); -#ifdef HAVE_DONAU_DONAU_SERVICE_H if (NULL != pc->parse_wallet_data.bkps) { for (size_t i = 0; i < pc->parse_wallet_data.num_bkps; i++) @@ -5229,7 +5183,6 @@ pay_context_cleanup (void *cls) pc->parse_wallet_data.donau_keys = NULL; } GNUNET_free (pc->parse_wallet_data.donau.donau_url); -#endif for (unsigned int i = 0; i<pc->parse_wallet_data.token_envelopes_cnt; i++) { struct TokenEnvelope *ev @@ -5299,11 +5252,7 @@ TMH_post_orders_ID_pay (const struct TMH_RequestHandler *rh, phase_execute_pay_transaction (pc); break; case PP_REQUEST_DONATION_RECEIPT: -#ifdef HAVE_DONAU_DONAU_SERVICE_H phase_request_donation_receipt (pc); -#else - pc->phase++; -#endif break; case PP_FINAL_OUTPUT_TOKEN_PROCESSING: phase_final_output_token_processing (pc); diff --git a/src/backend/taler-merchant-httpd_post-private-orders.c b/src/backend/taler-merchant-httpd_post-private-orders.c @@ -3578,7 +3578,6 @@ phase_merge_inventory (struct OrderContext *oc) /* ***************** ORDER_PHASE_PARSE_CHOICES **************** */ -#ifdef HAVE_DONAU_DONAU_SERVICE_H /** * Callback function that is called for each donau instance. * It simply adds the provided donau_url to the json. @@ -3635,8 +3634,6 @@ add_donau_output (struct OrderContext *oc, } -#endif - /** * Parse contract choices. Upon success, continue * processing with merge_inventory(). @@ -3857,7 +3854,6 @@ phase_parse_choices (struct OrderContext *oc) GNUNET_assert (0); break; case TALER_MERCHANT_CONTRACT_OUTPUT_TYPE_DONATION_RECEIPT: -#ifdef HAVE_DONAU_DONAU_SERVICE_H output.details.donation_receipt.amount = choice->amount; if (! add_donau_output (oc, &output)) @@ -3868,7 +3864,6 @@ phase_parse_choices (struct OrderContext *oc) GNUNET_array_append (choice->outputs, choice->outputs_len, output); -#endif continue; case TALER_MERCHANT_CONTRACT_OUTPUT_TYPE_TOKEN: /* Ignore inputs tokens with 'count' field set to 0 */ diff --git a/src/backenddb/Makefile.am b/src/backenddb/Makefile.am @@ -270,10 +270,7 @@ libtaler_plugin_merchantdb_postgres_la_SOURCES = \ pg_lookup_statistics_counter_by_interval.h pg_lookup_statistics_counter_by_interval.c \ pg_lookup_statistics_amount_by_bucket.h pg_lookup_statistics_amount_by_bucket.c \ pg_lookup_statistics_amount_by_interval.h pg_lookup_statistics_amount_by_interval.c \ - plugin_merchantdb_postgres.c - -if HAVE_DONAU -libtaler_plugin_merchantdb_postgres_la_SOURCES += \ + plugin_merchantdb_postgres.c \ pg_insert_donau_instance.h pg_insert_donau_instance.c \ pg_check_donau_instance.h pg_check_donau_instance.c \ pg_select_donau_instances.h pg_select_donau_instances.c \ @@ -284,13 +281,13 @@ libtaler_plugin_merchantdb_postgres_la_SOURCES += \ pg_lookup_order_charity.h pg_lookup_order_charity.c \ pg_upsert_donau_keys.h pg_upsert_donau_keys.c \ pg_update_donau_instance.h pg_update_donau_instance.c -endif libtaler_plugin_merchantdb_postgres_la_LIBADD = \ $(LTLIBINTL) libtaler_plugin_merchantdb_postgres_la_LDFLAGS = \ $(TALER_PLUGIN_LDFLAGS) \ $(top_builddir)/src/util/libtalermerchantutil.la \ + -ldonau \ -ltalerexchange \ -ltalerpq \ -ltalerutil \ @@ -302,11 +299,6 @@ libtaler_plugin_merchantdb_postgres_la_LDFLAGS = \ -lgnunetutil \ $(XLIB) -if HAVE_DONAU -libtaler_plugin_merchantdb_postgres_la_LDFLAGS += \ - -ldonau -endif - if HAVE_POSTGRESQL if HAVE_GNUNETPQ check_PROGRAMS = \ diff --git a/src/backenddb/plugin_merchantdb_postgres.c b/src/backenddb/plugin_merchantdb_postgres.c @@ -205,8 +205,6 @@ #include "pg_update_donau_instance_receipts_amount.h" #include "pg_delete_donau_instance.h" #include "pg_update_contract_session.h" - -#ifdef HAVE_DONAU_DONAU_SERVICE_H #include "donau/donau_service.h" #include "pg_insert_donau_instance.h" #include "pg_check_donau_instance.h" @@ -218,7 +216,6 @@ #include "pg_lookup_order_charity.h" #include "pg_upsert_donau_keys.h" #include "pg_update_donau_instance.h" -#endif /** * How often do we re-try if we run into a DB serialization error? @@ -794,7 +791,6 @@ libtaler_plugin_merchantdb_postgres_init (void *cls) = &TMH_PG_create_mfa_challenge; plugin->gc = &TMH_PG_gc; -#ifdef HAVE_DONAU_DONAU_SERVICE_H plugin->insert_donau_instance = &TMH_PG_insert_donau_instance; plugin->check_donau_instance @@ -819,7 +815,6 @@ libtaler_plugin_merchantdb_postgres_init (void *cls) = &TMH_PG_upsert_donau_keys; plugin->update_donau_instance = &TMH_PG_update_donau_instance; -#endif return plugin; } diff --git a/src/include/taler/Makefile.am b/src/include/taler/Makefile.am @@ -13,8 +13,3 @@ talerinclude_HEADERS = \ taler_merchant_service.h \ taler_merchant_pay_service.h \ taler_merchant_testing_lib.h - -if HAVE_DONAU -talerinclude_HEADERS += \ - taler_merchant_donau.h -endif diff --git a/src/include/taler/taler-merchant/common.h b/src/include/taler/taler-merchant/common.h @@ -27,6 +27,7 @@ #include <taler/taler_error_codes.h> #include <taler/taler_exchange_service.h> #include <gnunet/gnunet_curl_lib.h> +#include <donau/donau_service.h> /** diff --git a/src/include/taler/taler_merchant_donau.h b/src/include/taler/taler_merchant_donau.h @@ -1,37 +0,0 @@ -/* - This file is part of TALER - Copyright (C) 2014-2024 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 - Foundation; either version 3, or (at your option) any later version. - - TALER is distributed in the hope that it will be useful, but WITHOUT ANY - WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR - A PARTICULAR PURPOSE. See the GNU Lesser General Public License for more details. - - You should have received a copy of the GNU Lesser General Public License along with - TALER; see the file COPYING.LIB. If not, see <http://www.gnu.org/licenses/> -*/ -/** - * @file taler_merchant_donau.h - * @brief Structs to interact with the donau. - * @author Bohdan Potuzhnyi - * @author Vlada Svirsh - */ -#ifndef _TALER_MERCHANT_DONAU_H -#define _TALER_MERCHANT_DONAU_H - -#include <taler/taler_util.h> -#include <taler/taler_error_codes.h> -#include <taler/taler_exchange_service.h> -#include "taler_merchant_service.h" -#include <donau/donau_service.h> -#include <donau/donau_util.h> - - -#include <taler/taler-merchant/get-private-donau.h> -#include <taler/taler-merchant/post-private-donau.h> -#include <taler/taler-merchant/delete-private-donau-DONAU_SERIAL.h> - -#endif diff --git a/src/include/taler/taler_merchant_service.h b/src/include/taler/taler_merchant_service.h @@ -99,5 +99,8 @@ #include <taler/taler-merchant/patch-private-units-UNIT.h> #include <taler/taler-merchant/delete-private-units-UNIT.h> #include <taler/taler-merchant/post-private-categories.h> +#include <taler/taler-merchant/get-private-donau.h> +#include <taler/taler-merchant/post-private-donau.h> +#include <taler/taler-merchant/delete-private-donau-DONAU_SERIAL.h> #endif diff --git a/src/include/taler/taler_merchant_testing_lib.h b/src/include/taler/taler_merchant_testing_lib.h @@ -30,9 +30,7 @@ #include <gnunet/gnunet_time_lib.h> #include <taler/taler_testing_lib.h> #include "taler_merchant_service.h" -#ifdef HAVE_DONAU_DONAU_SERVICE_H #include "donau/donau_service.h" -#endif // HAVE_DONAU_DONAU_SERVICE_H /* ********************* Helper functions ********************* */ @@ -1331,7 +1329,6 @@ TALER_TESTING_cmd_merchant_pay_order_choices ( int choice_index, const char *input_reference); -#ifdef HAVE_DONAU_DONAU_SERVICE_H /** * Make a "pay" test command for an order with choices. @@ -1371,7 +1368,6 @@ TALER_TESTING_cmd_merchant_pay_order_donau ( const char *donor_tax_id, const char *salt); -#endif /** * Make an "order paid" test command. @@ -2280,7 +2276,6 @@ TALER_TESTING_cmd_checkserver2 (const char *label, const char *expected_body); -#ifdef HAVE_DONAU_DONAU_SERVICE_H /** * This function is the similar to the TALER_TESSTING_cmd_charity_post from DONAU * with only difference that it reuses the merchant public key, from the merchant test-suite. @@ -2304,7 +2299,6 @@ TALER_TESTING_cmd_charity_post_merchant ( const char *merchant_reference, unsigned int expected_response_code); -#endif /* HAVE_DONAU_DONAU_SERVICE_H */ /** * Define a "GET /donau" CMD. diff --git a/src/include/taler/taler_merchantdb_plugin.h b/src/include/taler/taler_merchantdb_plugin.h @@ -30,13 +30,9 @@ #include <taler/taler_merchant_util.h> #include <taler/taler_exchange_service.h> #include <jansson.h> - -#ifdef HAVE_DONAU_DONAU_SERVICE_H #include <donau/donau_service.h> -#include "taler_merchant_donau.h" -#else -struct DONAU_CharityPublicKeyP charity_pub_key; -#endif +#include <donau/donau_util.h> + /** * Handle to interact with the database. @@ -5212,7 +5208,6 @@ struct TALER_MERCHANTDB_Plugin uint64_t *challenge_id); -#ifdef HAVE_DONAU_DONAU_SERVICE_H /** * Insert information about a Donau instance. * @@ -5377,8 +5372,6 @@ struct TALER_MERCHANTDB_Plugin const struct DONAU_Charity *charity, uint64_t charity_id); -#endif - /** * Delete information about a Donau instance. * diff --git a/src/lib/Makefile.am b/src/lib/Makefile.am @@ -81,9 +81,14 @@ libtalermerchant_la_SOURCES = \ merchant_api_post-private-transfers.c \ merchant_api_post-private-units.c \ merchant_api_post-private-webhooks.c \ + merchant_api_get-private-donau.c \ + merchant_api_post-private-donau.c \ + merchant_api_delete-private-donau-DONAU_SERIAL.c \ merchant_api_post-templates-TEMPLATE_ID.c libtalermerchant_la_LIBADD = \ + -ldonaujson \ + -ldonau \ -ltalerexchange \ -ltalercurl \ -ltalerjson \ @@ -96,17 +101,6 @@ libtalermerchant_la_LIBADD = \ -lcurl \ $(XLIB) -if HAVE_DONAU - libtalermerchant_la_SOURCES += \ - merchant_api_get-private-donau.c \ - merchant_api_post-private-donau.c \ - merchant_api_delete-private-donau-DONAU_SERIAL.c - - libtalermerchant_la_LIBADD += \ - -ldonaujson \ - -ldonau -endif - check_PROGRAMS = \ test_merchant_api_common diff --git a/src/lib/merchant_api_post-orders-ORDER_ID-pay.c b/src/lib/merchant_api_post-orders-ORDER_ID-pay.c @@ -34,10 +34,8 @@ #include <taler/taler_json_lib.h> #include <taler/taler_curl_lib.h> #include <taler/taler_signatures.h> -#if HAVE_DONAU_DONAU_SERVICE_H #include <donau/donau_service.h> #include <donau/donau_json_lib.h> -#endif /** * Handle for a POST /orders/$ORDER_ID/pay operation. @@ -650,7 +648,6 @@ TALER_MERCHANT_post_orders_pay_set_options_ ( options[i].details.output_tokens_json); break; case TALER_MERCHANT_POST_ORDERS_PAY_OPTION_OUTPUT_DONAU: -#if HAVE_DONAU_DONAU_SERVICE_H if (NULL != poph->donau_url) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, @@ -678,11 +675,6 @@ TALER_MERCHANT_post_orders_pay_set_options_ ( src->blinded_udi.blinded_message); } break; -#else - GNUNET_log (GNUNET_ERROR_TYPE_ERROR, - "Donation receipts are not supported by this build!\n"); - return GNUNET_NO; -#endif default: GNUNET_break (0); return GNUNET_SYSERR; diff --git a/src/testing/Makefile.am b/src/testing/Makefile.am @@ -96,18 +96,15 @@ libtalermerchanttesting_la_SOURCES = \ testing_api_cmd_testserver.c \ testing_api_cmd_checkserver.c \ testing_api_helpers.c \ - testing_api_traits.c - -if HAVE_DONAU -libtalermerchanttesting_la_SOURCES += \ + testing_api_traits.c \ testing_api_cmd_post_donau_charity_merchant.c \ testing_api_cmd_post_donau_instances.c \ testing_api_cmd_get_donau_instances.c \ testing_api_cmd_delete_donau_instances.c -endif libtalermerchanttesting_la_LIBADD = \ $(top_srcdir)/src/lib/libtalermerchant.la \ + -ldonautesting \ -ltalerbank \ -ltalerexchange \ -ltalerjson \ @@ -122,12 +119,6 @@ libtalermerchanttesting_la_LIBADD = \ -lm \ $(XLIB) -if HAVE_DONAU -libtalermerchanttesting_la_LIBADD += \ - -ldonautesting -endif - - if HAVE_TALERFAKEBANK check_PROGRAMS = \ test_reconciliation_rsa \ @@ -200,6 +191,7 @@ test_merchant_api_cs_LDADD = \ $(top_srcdir)/src/lib/libtalermerchant.la \ $(top_srcdir)/src/util/libtalermerchantutil.la \ $(LIBGCRYPT_LIBS) \ + -ldonautesting \ -ltalertesting \ -ltalerfakebank \ -ltalerbank \ @@ -212,11 +204,6 @@ test_merchant_api_cs_LDADD = \ -ljansson \ $(XLIB) -if HAVE_DONAU -test_merchant_api_cs_LDADD += \ - -ldonautesting -endif - test_merchant_api_rsa_SOURCES = \ test_merchant_api.c test_merchant_api_rsa_LDADD = \ @@ -225,6 +212,7 @@ test_merchant_api_rsa_LDADD = \ $(top_srcdir)/src/backenddb/libtalermerchantdb.la \ $(top_srcdir)/src/lib/libtalermerchant.la \ $(LIBGCRYPT_LIBS) \ + -ldonautesting \ -ltalertesting \ -ltalerfakebank \ -ltalerbank \ @@ -257,11 +245,6 @@ test_reconciliation_rsa_LDADD = \ -ljansson \ $(XLIB) -if HAVE_DONAU -test_merchant_api_rsa_LDADD += \ - -ldonautesting -endif - test_kyc_api_SOURCES = \ test_kyc_api.c test_kyc_api_LDADD = \ diff --git a/src/testing/test_merchant_api.c b/src/testing/test_merchant_api.c @@ -38,10 +38,7 @@ #include <taler/taler_error_codes.h> #include "taler/taler_merchant_util.h" #include "taler/taler_merchant_testing_lib.h" - -#ifdef HAVE_DONAU_DONAU_SERVICE_H #include <donau/donau_testing_lib.h> -#endif /** @@ -2835,7 +2832,6 @@ run (void *cls, TALER_TESTING_cmd_end () }; -#ifdef HAVE_DONAU_DONAU_SERVICE_H const struct DONAU_BearerToken bearer = { .token = NULL }; @@ -2921,7 +2917,6 @@ run (void *cls, MHD_HTTP_OK), TALER_TESTING_cmd_end () }; -#endif struct TALER_TESTING_Command commands[] = { /* general setup */ @@ -2929,7 +2924,6 @@ run (void *cls, "run-fakebank", cred.cfg, "exchange-account-exchange"), -#ifdef HAVE_DONAU_DONAU_SERVICE_H TALER_TESTING_cmd_system_start ( "start-taler", config_file, @@ -2937,15 +2931,6 @@ run (void *cls, "-u", "exchange-account-exchange", "-r", "merchant-exchange-test", NULL), -#else - TALER_TESTING_cmd_system_start ( - "start-taler", - config_file, - "-ema", - "-u", "exchange-account-exchange", - "-r", "merchant-exchange-test", - NULL), -#endif TALER_TESTING_cmd_get_exchange ( "get-exchange", cred.cfg, @@ -3301,11 +3286,8 @@ run (void *cls, repurchase), TALER_TESTING_cmd_batch ("tokens", tokens), -#ifdef HAVE_DONAU_DONAU_SERVICE_H TALER_TESTING_cmd_batch ("donau", donau), -#endif - TALER_TESTING_cmd_merchant_get_statisticsamount ("stats-refund", merchant_url, "refunds-granted", @@ -3316,21 +3298,13 @@ run (void *cls, merchant_url, "tokens-issued", 6, -#ifdef HAVE_DONAU_DONAU_SERVICE_H 1, -#else - 0, -#endif MHD_HTTP_OK), TALER_TESTING_cmd_merchant_get_statisticscounter ("stats-tokens-used", merchant_url, "tokens-used", 6, -#ifdef HAVE_DONAU_DONAU_SERVICE_H 1, -#else - 0, -#endif MHD_HTTP_OK), /** diff --git a/src/testing/testing_api_cmd_pay_order.c b/src/testing/testing_api_cmd_pay_order.c @@ -35,14 +35,11 @@ #include "taler/taler_merchant_service.h" #include "taler/taler_merchant_testing_lib.h" #include <taler/taler-merchant/post-orders-ORDER_ID-pay.h> - -#ifdef HAVE_DONAU_DONAU_SERVICE_H #include <donau/donau_service.h> #include <donau/donau_testing_lib.h> #include <donau/donau_json_lib.h> -#endif /* HAVE_DONAU_DONAU_SERVICE_H */ -#ifdef HAVE_DONAU_DONAU_SERVICE_H + /** * Struct for handling the CS approach in signing of the bkps */ @@ -319,7 +316,6 @@ prepare_donau_data (struct TALER_TESTING_Interpreter *is, } return GNUNET_OK; }; -#endif /* HAVE_DONAU_DONAU_SERVICE_H */ /** @@ -486,12 +482,10 @@ struct PayState */ int choice_index; -#ifdef HAVE_DONAU_DONAU_SERVICE_H /** * Donau data, if required. */ struct MerchantDonauPayData donau_data; -#endif /* HAVE_DONAU_DONAU_SERVICE_H */ }; @@ -1162,7 +1156,6 @@ pay_run (void *cls, TALER_TESTING_FAIL (is); } -#ifdef HAVE_DONAU_DONAU_SERVICE_H { const char *donau_url_str; @@ -1202,9 +1195,6 @@ pay_run (void *cls, ps->num_donau_tokens = ps->donau_data.num_bkps; } } -#else /* HAVE_DONAU_DONAU_SERVICE_H */ - /* SIMPLY NOTHING */ -#endif /* HAVE_DONAU_DONAU_SERVICE_H */ } if (0 == strcmp ("token", @@ -1421,7 +1411,6 @@ pay_run (void *cls, len_output_tokens, output_tokens))); -#ifdef HAVE_DONAU_DONAU_SERVICE_H if (ps->donau_data.charity_reference) { GNUNET_assert ( @@ -1434,7 +1423,6 @@ pay_run (void *cls, ps->donau_data.num_bkps, ps->donau_data.bkps))); } -#endif if (TALER_EC_NONE != TALER_MERCHANT_post_orders_pay_start (ps->oph, &pay_cb, @@ -1610,8 +1598,6 @@ TALER_TESTING_cmd_merchant_pay_order_choices ( } -#ifdef HAVE_DONAU_DONAU_SERVICE_H - struct TALER_TESTING_Command TALER_TESTING_cmd_merchant_pay_order_donau ( const char *label, @@ -1673,9 +1659,6 @@ TALER_TESTING_cmd_merchant_pay_order_donau ( } -#endif /* HAVE_DONAU_DONAU_SERVICE_H */ - - struct TALER_TESTING_Command TALER_TESTING_cmd_merchant_pay_order ( const char *label,