diff options
author | Christian Grothoff <christian@grothoff.org> | 2023-04-11 19:44:51 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2023-04-11 19:44:51 +0200 |
commit | 5ed3b2cfe1aa0cb31c589b308cc70684a20dd368 (patch) | |
tree | 858e253a3393febe8207e5870e59e04946fa6958 /src/lib/merchant_api_post_instances.c | |
parent | feaf7bae8baf8ec701d02374e18a6b978dcfb9f8 (diff) | |
download | merchant-5ed3b2cfe1aa0cb31c589b308cc70684a20dd368.tar.gz merchant-5ed3b2cfe1aa0cb31c589b308cc70684a20dd368.tar.bz2 merchant-5ed3b2cfe1aa0cb31c589b308cc70684a20dd368.zip |
store user-type with merchant settings
Diffstat (limited to 'src/lib/merchant_api_post_instances.c')
-rw-r--r-- | src/lib/merchant_api_post_instances.c | 13 |
1 files changed, 12 insertions, 1 deletions
diff --git a/src/lib/merchant_api_post_instances.c b/src/lib/merchant_api_post_instances.c index 183b3400..85069dc3 100644 --- a/src/lib/merchant_api_post_instances.c +++ b/src/lib/merchant_api_post_instances.c @@ -1,6 +1,6 @@ /* This file is part of TALER - Copyright (C) 2020 Taler Systems SA + Copyright (C) 2020-2023 Taler Systems SA TALER is free software; you can redistribute it and/or modify it under the terms of the GNU Lesser General Public License as @@ -32,6 +32,7 @@ #include "merchant_api_common.h" #include <taler/taler_json_lib.h> #include <taler/taler_curl_lib.h> +#include <taler/taler_kyclogic_lib.h> /** @@ -166,6 +167,7 @@ TALER_MERCHANT_instances_post ( unsigned int accounts_length, const char *payto_uris[], const char *name, + enum TALER_KYCLOGIC_KycUserType ut, const json_t *address, const json_t *jurisdiction, const struct TALER_Amount *default_max_wire_fee, @@ -181,7 +183,14 @@ TALER_MERCHANT_instances_post ( json_t *jpayto_uris; json_t *req_obj; json_t *auth_obj; + const char *uts; + uts = TALER_KYCLOGIC_kyc_user_type2s (ut); + if (NULL == uts) + { + GNUNET_break (0); + return NULL; + } if (NULL != auth_token) { if (0 != strncasecmp (RFC_8959_PREFIX, @@ -236,6 +245,8 @@ TALER_MERCHANT_instances_post ( instance_id), GNUNET_JSON_pack_string ("name", name), + GNUNET_JSON_pack_string ("user_type", + uts), GNUNET_JSON_pack_object_incref ("address", (json_t *) address), GNUNET_JSON_pack_object_incref ("jurisdiction", |