summaryrefslogtreecommitdiff
path: root/src/lib/merchant_api_patch_instance.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/lib/merchant_api_patch_instance.c')
-rw-r--r--src/lib/merchant_api_patch_instance.c37
1 files changed, 10 insertions, 27 deletions
diff --git a/src/lib/merchant_api_patch_instance.c b/src/lib/merchant_api_patch_instance.c
index 0613a852..420cd549 100644
--- a/src/lib/merchant_api_patch_instance.c
+++ b/src/lib/merchant_api_patch_instance.c
@@ -31,6 +31,7 @@
#include "merchant_api_curl_defaults.h"
#include "merchant_api_common.h"
#include <taler/taler_json_lib.h>
+#include <taler/taler_kyclogic_lib.h>
#include <taler/taler_curl_lib.h>
@@ -157,55 +158,37 @@ TALER_MERCHANT_instance_patch (
struct GNUNET_CURL_Context *ctx,
const char *backend_url,
const char *instance_id,
- 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,
- uint32_t default_wire_fee_amortization,
- const struct TALER_Amount *default_max_deposit_fee,
+ bool use_stefan,
struct GNUNET_TIME_Relative default_wire_transfer_delay,
struct GNUNET_TIME_Relative default_pay_delay,
TALER_MERCHANT_InstancePatchCallback cb,
void *cb_cls)
{
struct TALER_MERCHANT_InstancePatchHandle *iph;
- json_t *jpayto_uris;
json_t *req_obj;
+ const char *uts;
- jpayto_uris = json_array ();
- if (NULL == jpayto_uris)
+ uts = TALER_KYCLOGIC_kyc_user_type2s (ut);
+ if (NULL == uts)
{
GNUNET_break (0);
return NULL;
}
- for (unsigned int i = 0; i<accounts_length; i++)
- {
- if (0 !=
- json_array_append_new (jpayto_uris,
- json_string (payto_uris[i])))
- {
- GNUNET_break (0);
- json_decref (jpayto_uris);
- return NULL;
- }
- }
req_obj = GNUNET_JSON_PACK (
- GNUNET_JSON_pack_array_steal ("payto_uris",
- jpayto_uris),
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",
(json_t *) jurisdiction),
- TALER_JSON_pack_amount ("default_max_wire_fee",
- default_max_wire_fee),
- GNUNET_JSON_pack_uint64 ("default_wire_fee_amortization",
- default_wire_fee_amortization),
- TALER_JSON_pack_amount ("default_max_deposit_fee",
- default_max_deposit_fee),
+ GNUNET_JSON_pack_bool ("use_stefan",
+ use_stefan),
GNUNET_JSON_pack_time_rel ("default_wire_transfer_delay",
default_wire_transfer_delay),
GNUNET_JSON_pack_time_rel ("default_pay_delay",