diff options
author | Christian Grothoff <christian@grothoff.org> | 2024-02-13 22:01:02 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2024-02-13 22:01:02 +0100 |
commit | 2d6bce2dc0ded9fcb77caa1cafecd401216b7238 (patch) | |
tree | 7614abdaea0d86b8356f26e9be78bd5ba5dad1f9 /src/exchange/taler-exchange-httpd_kyc-webhook.c | |
parent | c4dfd21ebe721959312cd52a7224fbbf84e75c4d (diff) | |
download | exchange-2d6bce2dc0ded9fcb77caa1cafecd401216b7238.tar.gz exchange-2d6bce2dc0ded9fcb77caa1cafecd401216b7238.tar.bz2 exchange-2d6bce2dc0ded9fcb77caa1cafecd401216b7238.zip |
set 'finished' to TRUE when KYC process is done (either way, successful or failure); should fix #8055, needs testing
Diffstat (limited to 'src/exchange/taler-exchange-httpd_kyc-webhook.c')
-rw-r--r-- | src/exchange/taler-exchange-httpd_kyc-webhook.c | 29 |
1 files changed, 27 insertions, 2 deletions
diff --git a/src/exchange/taler-exchange-httpd_kyc-webhook.c b/src/exchange/taler-exchange-httpd_kyc-webhook.c index 8bd6d4bb2..b92b43e69 100644 --- a/src/exchange/taler-exchange-httpd_kyc-webhook.c +++ b/src/exchange/taler-exchange-httpd_kyc-webhook.c @@ -221,22 +221,47 @@ webhook_finished_cb ( kwh); if (NULL == kwh->kat) { - http_status = MHD_HTTP_INTERNAL_SERVER_ERROR; if (NULL != response) MHD_destroy_response (response); + http_status = MHD_HTTP_INTERNAL_SERVER_ERROR; response = TALER_MHD_make_error ( TALER_EC_EXCHANGE_GENERIC_BAD_CONFIGURATION, "[exchange] AML_KYC_TRIGGER"); break; } return; + case TALER_KYCLOGIC_STATUS_FAILED: + case TALER_KYCLOGIC_STATUS_PROVIDER_FAILED: + case TALER_KYCLOGIC_STATUS_USER_ABORTED: + case TALER_KYCLOGIC_STATUS_ABORTED: + GNUNET_log (GNUNET_ERROR_TYPE_INFO, + "KYC process %s/%s (Row #%llu) failed: %d\n", + provider_user_id, + provider_legitimization_id, + (unsigned long long) process_row, + status); + if (! TEH_kyc_failed (process_row, + account_id, + provider_section, + provider_user_id, + provider_legitimization_id)) + { + GNUNET_break (0); + if (NULL != response) + MHD_destroy_response (response); + http_status = MHD_HTTP_INTERNAL_SERVER_ERROR; + response = TALER_MHD_make_error ( + TALER_EC_GENERIC_DB_STORE_FAILED, + "insert_kyc_failure"); + } + break; default: GNUNET_log (GNUNET_ERROR_TYPE_INFO, "KYC status of %s/%s (Row #%llu) is %d\n", provider_user_id, provider_legitimization_id, (unsigned long long) process_row, - status); + (int) status); break; } GNUNET_break (NULL == kwh->kat); |