diff options
author | Christian Grothoff <christian@grothoff.org> | 2023-02-12 22:02:45 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2023-02-12 22:02:51 +0100 |
commit | 6db4bdbe6e39b84b995b11ab132a7c6706686677 (patch) | |
tree | 33bccdbe6c912158064799962a1a37cbf39b0bb3 /src/exchange/taler-exchange-httpd_responses.c | |
parent | 174022907ba612e41d716f2bf5faf63ffc7c2332 (diff) | |
download | exchange-6db4bdbe6e39b84b995b11ab132a7c6706686677.tar.gz exchange-6db4bdbe6e39b84b995b11ab132a7c6706686677.tar.bz2 exchange-6db4bdbe6e39b84b995b11ab132a7c6706686677.zip |
-more work on AML triggers for P2P transfers
Diffstat (limited to 'src/exchange/taler-exchange-httpd_responses.c')
-rw-r--r-- | src/exchange/taler-exchange-httpd_responses.c | 25 |
1 files changed, 25 insertions, 0 deletions
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 */ |