exchange

Base system with REST service to issue digital coins, run by the payment service provider
Log | Files | Refs | Submodules | README | LICENSE

commit f0fcd898eda94230f5c344d0eb3c2f6e54f6eaef
parent 925ae3243b3920871b602bed8448323c4c14d5cd
Author: Christian Grothoff <christian@grothoff.org>
Date:   Wed, 10 Jul 2024 10:26:22 +0200

enable kyc-start endpoint

Diffstat:
Msrc/exchange/taler-exchange-httpd.c | 7+++++++
Msrc/exchange/taler-exchange-httpd_kyc-start.c | 2++
Asrc/exchange/taler-exchange-httpd_kyc-start.h | 43+++++++++++++++++++++++++++++++++++++++++++
3 files changed, 52 insertions(+), 0 deletions(-)

diff --git a/src/exchange/taler-exchange-httpd.c b/src/exchange/taler-exchange-httpd.c @@ -49,6 +49,7 @@ #include "taler-exchange-httpd_kyc-check.h" #include "taler-exchange-httpd_kyc-info.h" #include "taler-exchange-httpd_kyc-proof.h" +#include "taler-exchange-httpd_kyc-start.h" #include "taler-exchange-httpd_kyc-upload.h" #include "taler-exchange-httpd_kyc-wallet.h" #include "taler-exchange-httpd_kyc-webhook.h" @@ -1785,6 +1786,12 @@ handle_mhd_request (void *cls, .nargs = 1 }, { + .url = "kyc-start", + .method = MHD_HTTP_METHOD_POST, + .handler.post = &TEH_handler_kyc_start, + .nargs = 1 + }, + { .url = "kyc-wallet", .method = MHD_HTTP_METHOD_POST, .handler.post = &TEH_handler_kyc_wallet, diff --git a/src/exchange/taler-exchange-httpd_kyc-start.c b/src/exchange/taler-exchange-httpd_kyc-start.c @@ -253,10 +253,12 @@ initiate_cb ( MHD_RESULT TEH_handler_kyc_start ( struct TEH_RequestContext *rc, + const json_t *root, const char *const args[1]) { struct KycPoller *kyp = rc->rh_ctx; + (void) root; if (NULL == kyp) { const char *id = args[0]; diff --git a/src/exchange/taler-exchange-httpd_kyc-start.h b/src/exchange/taler-exchange-httpd_kyc-start.h @@ -0,0 +1,43 @@ +/* + This file is part of TALER + Copyright (C) 2024 Taler Systems SA + + TALER is free software; you can redistribute it and/or modify it under the + terms of the GNU Affero General Public License as published by the Free Software + Foundation; either version 3, or (at your option) any later version. + + TALER is distributed in the hope that it will be useful, but WITHOUT ANY + WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR + A PARTICULAR PURPOSE. See the GNU Affero General Public License for more details. + + You should have received a copy of the GNU Affero General Public License along with + TALER; see the file COPYING. If not, see <http://www.gnu.org/licenses/> +*/ +/** + * @file taler-exchange-httpd_kyc-start.h + * @brief Handle /kyc-start requests + * @author Christian Grothoff + */ +#ifndef TALER_EXCHANGE_HTTPD_KYC_START_H +#define TALER_EXCHANGE_HTTPD_KYC_START_H + +#include <microhttpd.h> +#include "taler-exchange-httpd.h" + + +/** + * Handle a "/kyc-start" request. + * + * @param rc request to handle + * @param root uploaded JSON data (empty by current API) + * @param args empty array + * @return MHD result code + */ +MHD_RESULT +TEH_handler_kyc_start ( + struct TEH_RequestContext *rc, + const json_t *root, + const char *const args[]); + + +#endif