merchant

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

commit 477831b851c2f539d36c7608b33891cc7597c078
parent 2f69842ac81188435b54c4a14817edb0cf4ca370
Author: Christian Grothoff <christian@grothoff.org>
Date:   Thu, 26 Feb 2026 23:24:27 +0100

adjustments to keep merchant working with exchange API modernization

Diffstat:
Msrc/backend/taler-merchant-kyccheck.c | 33++++++++++++++++++++-------------
1 file changed, 20 insertions(+), 13 deletions(-)

diff --git a/src/backend/taler-merchant-kyccheck.c b/src/backend/taler-merchant-kyccheck.c @@ -201,7 +201,7 @@ struct Inquiry /** * Handle for the actual HTTP request to the exchange. */ - struct TALER_EXCHANGE_KycCheckHandle *kyc; + struct TALER_EXCHANGE_GetKycCheckHandle *kyc; /** * Access token for the /kyc-info API. @@ -524,16 +524,16 @@ store_kyc_status ( static void exchange_check_cb ( void *cls, - const struct TALER_EXCHANGE_KycStatus *ks) + const struct TALER_EXCHANGE_GetKycCheckResponse *ks) { struct Inquiry *i = cls; bool progress = false; + i->kyc = NULL; if (! i->not_first_time) progress = true; if (i->last_http_status != ks->hr.http_status) progress = true; - i->kyc = NULL; i->last_http_status = ks->hr.http_status; i->last_ec = ks->hr.ec; i->rule_gen = 0; @@ -748,18 +748,11 @@ inquiry_work (void *cls) lpt = TALER_EXCHANGE_KLPT_INVESTIGATION_DONE; if (! i->not_first_time) lpt = TALER_EXCHANGE_KLPT_NONE; - i->kyc = TALER_EXCHANGE_kyc_check ( + i->kyc = TALER_EXCHANGE_get_kyc_check_create ( ctx, i->e->keys->exchange_url, &i->a->h_payto, - &i->a->ap, - i->rule_gen, - lpt, - i->not_first_time && (! test_mode) - ? EXCHANGE_TIMEOUT - : GNUNET_TIME_UNIT_ZERO, - &exchange_check_cb, - i); + &i->a->ap); if (NULL == i->kyc) { GNUNET_break (0); @@ -770,6 +763,20 @@ inquiry_work (void *cls) i); goto finish; } + GNUNET_assert (GNUNET_OK == + TALER_EXCHANGE_get_kyc_check_set_options ( + i->kyc, + TALER_EXCHANGE_get_kyc_check_option_known_rule_gen ( + i->rule_gen), + TALER_EXCHANGE_get_kyc_check_option_lpt (lpt), + TALER_EXCHANGE_get_kyc_check_option_timeout ( + i->not_first_time && (! test_mode) + ? EXCHANGE_TIMEOUT + : GNUNET_TIME_UNIT_ZERO))); + GNUNET_assert (TALER_EC_NONE == + TALER_EXCHANGE_get_kyc_check_start (i->kyc, + &exchange_check_cb, + i)); active_inquiries++; finish: if ( (0 == active_inquiries) && @@ -875,7 +882,7 @@ stop_inquiry (struct Inquiry *i) } if (NULL != i->kyc) { - TALER_EXCHANGE_kyc_check_cancel (i->kyc); + TALER_EXCHANGE_get_kyc_check_cancel (i->kyc); i->kyc = NULL; } if (NULL != i->jlimits)