From 6db4bdbe6e39b84b995b11ab132a7c6706686677 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sun, 12 Feb 2023 22:02:45 +0100 Subject: -more work on AML triggers for P2P transfers --- src/exchange/taler-exchange-httpd_responses.c | 25 +++++++++++++++++++++++++ 1 file changed, 25 insertions(+) (limited to 'src/exchange/taler-exchange-httpd_responses.c') diff --git a/src/exchange/taler-exchange-httpd_responses.c b/src/exchange/taler-exchange-httpd_responses.c index 33bc13985..5d9dfc3aa 100644 --- a/src/exchange/taler-exchange-httpd_responses.c +++ b/src/exchange/taler-exchange-httpd_responses.c @@ -1142,4 +1142,29 @@ TEH_RESPONSE_reply_kyc_required (struct MHD_Connection *connection, } +MHD_RESULT +TEH_RESPONSE_reply_aml_blocked (struct MHD_Connection *connection, + enum TALER_AmlDecisionState status) +{ + enum TALER_ErrorCode ec = TALER_EC_GENERIC_INTERNAL_INVARIANT_FAILURE; + + switch (status) + { + case TALER_AML_NORMAL: + GNUNET_break (0); + return MHD_NO; + case TALER_AML_PENDING: + ec = TALER_EC_EXCHANGE_GENERIC_AML_PENDING; + break; + case TALER_AML_FROZEN: + ec = TALER_EC_EXCHANGE_GENERIC_AML_FROZEN; + break; + } + return TALER_MHD_REPLY_JSON_PACK ( + connection, + MHD_HTTP_UNAVAILABLE_FOR_LEGAL_REASONS, + TALER_JSON_pack_ec (ec)); +} + + /* end of taler-exchange-httpd_responses.c */ -- cgit v1.2.3