merchant

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

commit 5b1446db72399dc15171e7668e87421b5a76d4c0
parent 7ebd3bfc1deedffe5fa1ac03c53b654a788c658c
Author: Florian Dold <florian@dold.me>
Date:   Wed,  1 Apr 2026 12:16:20 +0200

kycheck fixes by Christian

Diffstat:
Msrc/backend/taler-merchant-kyccheck.c | 23+++++++++++++++--------
1 file changed, 15 insertions(+), 8 deletions(-)

diff --git a/src/backend/taler-merchant-kyccheck.c b/src/backend/taler-merchant-kyccheck.c @@ -532,11 +532,11 @@ exchange_check_cb ( i->kyc = NULL; if (! i->not_first_time) progress = true; - if (i->last_http_status != ks->hr.http_status) + if ( (i->last_http_status != ks->hr.http_status) && + (0 != ks->hr.http_status) ) progress = true; i->last_http_status = ks->hr.http_status; i->last_ec = ks->hr.ec; - i->rule_gen = 0; GNUNET_log (GNUNET_ERROR_TYPE_INFO, "KYC status of `%s' at `%s' is %u\n", i->a->merchant_account_uri.full_payto, @@ -545,8 +545,6 @@ exchange_check_cb ( switch (ks->hr.http_status) { case MHD_HTTP_OK: - if (! i->kyc_ok) - progress = true; if (i->rule_gen != ks->details.ok.rule_gen) progress = true; i->rule_gen = ks->details.ok.rule_gen; @@ -572,7 +570,6 @@ exchange_check_cb ( } break; case MHD_HTTP_ACCEPTED: - progress = ! i->auth_ok; if (i->rule_gen != ks->details.accepted.rule_gen) progress = true; i->rule_gen = ks->details.accepted.rule_gen; @@ -588,6 +585,7 @@ exchange_check_cb ( i->timeout); break; case MHD_HTTP_NO_CONTENT: + i->rule_gen = 0; i->last_kyc_check = GNUNET_TIME_timestamp_get (); i->backoff = GNUNET_TIME_UNIT_MINUTES; /* exchange claims KYC is off! */ @@ -602,6 +600,7 @@ exchange_check_cb ( i->backoff))); break; case MHD_HTTP_FORBIDDEN: /* bad signature */ + i->rule_gen = 0; i->last_kyc_check = GNUNET_TIME_timestamp_get (); /* Forbidden => KYC auth must be wrong */ i->auth_ok = false; @@ -612,6 +611,7 @@ exchange_check_cb ( i->backoff = GNUNET_TIME_UNIT_MINUTES; break; case MHD_HTTP_NOT_FOUND: /* account unknown */ + i->rule_gen = 0; i->last_kyc_check = GNUNET_TIME_timestamp_get (); /* Account unknown => no KYC auth yet */ i->auth_ok = false; @@ -628,6 +628,7 @@ exchange_check_cb ( i->backoff = GNUNET_TIME_UNIT_MINUTES; break; case MHD_HTTP_CONFLICT: /* no account_pub known */ + i->rule_gen = 0; i->last_kyc_check = GNUNET_TIME_timestamp_get (); /* Conflict => KYC auth wire transfer missing! */ i->auth_ok = false; @@ -1033,9 +1034,15 @@ account_cb ( NULL != a; a = a->next) { - if (0 == - TALER_full_payto_cmp (payto_uri, - a->merchant_account_uri)) + if ( (0 == + TALER_full_payto_cmp (payto_uri, + a->merchant_account_uri)) && + (0 == + GNUNET_memcmp (&a->h_wire, + &ad->h_wire)) && + (0 == + strcmp (ad->instance_id, + a->instance_id)) ) { a->account_gen = database_gen; return;