merchant

Merchant backend to process payments, run by merchants
Log | Files | Refs | Submodules | README | LICENSE

commit c21919263c07c871d33478edc5b2430619870df0
parent 69ed15654bc591d118e87e6acfe4d8931097d5fa
Author: Christian Grothoff <christian@grothoff.org>
Date:   Sun,  9 May 2021 11:26:37 +0200

fix check for wire method existing (fixes test failure)

Diffstat:
Msrc/backend/taler-merchant-httpd_private-post-orders.c | 14++++----------
Msrc/testing/test_merchant_api.c | 6+++---
2 files changed, 7 insertions(+), 13 deletions(-)

diff --git a/src/backend/taler-merchant-httpd_private-post-orders.c b/src/backend/taler-merchant-httpd_private-post-orders.c @@ -1024,17 +1024,11 @@ add_payment_details (struct MHD_Connection *connection, wm = hc->instance->wm_head; while ( (NULL != wm) && - (! wm->active) && - ( (NULL == payment_target) || - (0 != strcasecmp (payment_target, - wm->wire_method) ) ) ) - { + ( (! wm->active) || + ( (NULL != payment_target) && + (0 != strcasecmp (payment_target, + wm->wire_method) ) ) ) ) wm = wm->next; - } - - if ((NULL != wm) && - (GNUNET_YES != wm->active)) - wm = NULL; if (NULL == wm) { GNUNET_log (GNUNET_ERROR_TYPE_WARNING, diff --git a/src/testing/test_merchant_api.c b/src/testing/test_merchant_api.c @@ -561,12 +561,12 @@ run (void *cls, "order-p3", GNUNET_TIME_UNIT_ZERO_ABS, GNUNET_TIME_UNIT_FOREVER_ABS, - true, + true, /* claim token */ "EUR:5.0", "unsupported-wire-method", "product-3/2", - "", - NULL), + "", /* locks */ + NULL /* duplicate_of */), TALER_TESTING_cmd_merchant_post_orders2 ("create-proposal-p3-pd-nx", merchant_url, MHD_HTTP_NOT_FOUND,