diff options
-rw-r--r-- | src/backend/taler-merchant-httpd_private-get-instances-ID-kyc.c | 2 | ||||
-rw-r--r-- | src/backend/taler-merchant-httpd_private-get-instances-ID.c | 2 | ||||
-rw-r--r-- | src/backend/taler-merchant-httpd_private-get-instances.c | 2 | ||||
-rw-r--r-- | src/backend/taler-merchant-httpd_private-patch-instances-ID.c | 20 | ||||
-rw-r--r-- | src/backend/taler-merchant-httpd_private-post-instances.c | 14 | ||||
-rw-r--r-- | src/backenddb/pg_insert_instance.c | 8 | ||||
-rw-r--r-- | src/backenddb/pg_lookup_instances.c | 8 | ||||
-rw-r--r-- | src/backenddb/pg_update_instance.c | 3 | ||||
-rw-r--r-- | src/include/taler_merchant_service.h | 11 | ||||
-rw-r--r-- | src/include/taler_merchantdb_plugin.h | 4 | ||||
-rw-r--r-- | src/lib/Makefile.am | 2 | ||||
-rw-r--r-- | src/lib/merchant_api_get_instance.c | 10 | ||||
-rw-r--r-- | src/lib/merchant_api_get_instances.c | 7 | ||||
-rw-r--r-- | src/lib/merchant_api_patch_instance.c | 10 | ||||
-rw-r--r-- | src/lib/merchant_api_post_instances.c | 10 | ||||
-rw-r--r-- | src/testing/testing_api_cmd_patch_instance.c | 1 | ||||
-rw-r--r-- | src/testing/testing_api_cmd_post_instances.c | 1 |
17 files changed, 9 insertions, 106 deletions
diff --git a/src/backend/taler-merchant-httpd_private-get-instances-ID-kyc.c b/src/backend/taler-merchant-httpd_private-get-instances-ID-kyc.c index 8a338e7d..0382b742 100644 --- a/src/backend/taler-merchant-httpd_private-get-instances-ID-kyc.c +++ b/src/backend/taler-merchant-httpd_private-get-instances-ID-kyc.c @@ -684,7 +684,7 @@ kyc_with_exchange (void *cls, keys, ekr->exchange_kyc_serial, &h_payto, - ekr->kc->mi->settings.ut, + 1, /* FIXME: this will go away! */ GNUNET_TIME_absolute_get_remaining (kc->timeout), &exchange_check_cb, ekr); diff --git a/src/backend/taler-merchant-httpd_private-get-instances-ID.c b/src/backend/taler-merchant-httpd_private-get-instances-ID.c index adc99c39..c8cd2c12 100644 --- a/src/backend/taler-merchant-httpd_private-get-instances-ID.c +++ b/src/backend/taler-merchant-httpd_private-get-instances-ID.c @@ -79,7 +79,7 @@ get_instances_ID (struct TMH_MerchantInstance *mi, mi->settings.name), GNUNET_JSON_pack_string ( "user_type", - TALER_KYCLOGIC_kyc_user_type2s (mi->settings.ut)), + "business"), GNUNET_JSON_pack_allow_null ( GNUNET_JSON_pack_string ("website", mi->settings.website)), diff --git a/src/backend/taler-merchant-httpd_private-get-instances.c b/src/backend/taler-merchant-httpd_private-get-instances.c index 50b5c0c2..0220d4df 100644 --- a/src/backend/taler-merchant-httpd_private-get-instances.c +++ b/src/backend/taler-merchant-httpd_private-get-instances.c @@ -76,7 +76,7 @@ add_instance (void *cls, mi->settings.name), GNUNET_JSON_pack_string ( "user_type", - TALER_KYCLOGIC_kyc_user_type2s (mi->settings.ut)), + "business"), GNUNET_JSON_pack_allow_null ( GNUNET_JSON_pack_string ("website", mi->settings.website)), diff --git a/src/backend/taler-merchant-httpd_private-patch-instances-ID.c b/src/backend/taler-merchant-httpd_private-patch-instances-ID.c index 027d5869..70df009e 100644 --- a/src/backend/taler-merchant-httpd_private-patch-instances-ID.c +++ b/src/backend/taler-merchant-httpd_private-patch-instances-ID.c @@ -64,17 +64,12 @@ patch_instances_ID (struct TMH_MerchantInstance *mi, { struct TALER_MERCHANTDB_InstanceSettings is; const char *name; - const char *uts = "business"; struct TMH_WireMethod *wm_head = NULL; struct TMH_WireMethod *wm_tail = NULL; struct GNUNET_JSON_Specification spec[] = { GNUNET_JSON_spec_string ("name", &name), GNUNET_JSON_spec_mark_optional ( - GNUNET_JSON_spec_string ("user_type", - &uts), - NULL), - GNUNET_JSON_spec_mark_optional ( GNUNET_JSON_spec_string ("website", (const char **) &is.website), NULL), @@ -115,19 +110,6 @@ patch_instances_ID (struct TMH_MerchantInstance *mi, ? MHD_YES : MHD_NO; } - if (NULL == uts) - uts = "business"; - if (GNUNET_OK != - TALER_KYCLOGIC_kyc_user_type_from_string (uts, - &is.ut)) - { - GNUNET_break_op (0); - GNUNET_JSON_parse_free (spec); - return TALER_MHD_reply_with_error (connection, - MHD_HTTP_BAD_REQUEST, - TALER_EC_GENERIC_PARAMETER_MALFORMED, - "user_type"); - } if (! TMH_location_object_valid (is.address)) { GNUNET_break_op (0); @@ -185,7 +167,6 @@ patch_instances_ID (struct TMH_MerchantInstance *mi, /* Check for equality of settings */ if (! ( (0 == strcmp (mi->settings.name, name)) && - (mi->settings.ut == is.ut) && ((mi->settings.email == is.email) || (NULL != is.email && NULL != mi->settings.email && 0 == strcmp (mi->settings.email, @@ -240,7 +221,6 @@ giveup: json_decref (mi->settings.jurisdiction); is.id = mi->settings.id; mi->settings = is; - // mi->settings.user_type = (enum TALER_KYCLOGIC_KycUserType) is.user_type; mi->settings.address = json_incref (mi->settings.address); mi->settings.jurisdiction = json_incref (mi->settings.jurisdiction); mi->settings.name = GNUNET_strdup (name); diff --git a/src/backend/taler-merchant-httpd_private-post-instances.c b/src/backend/taler-merchant-httpd_private-post-instances.c index a4cf884d..f56e7098 100644 --- a/src/backend/taler-merchant-httpd_private-post-instances.c +++ b/src/backend/taler-merchant-httpd_private-post-instances.c @@ -103,20 +103,6 @@ TMH_private_post_instances (const struct TMH_RequestHandler *rh, ? MHD_YES : MHD_NO; } - if (NULL == uts) - uts = "business"; - if (GNUNET_OK != - TALER_KYCLOGIC_kyc_user_type_from_string (uts, - &is.ut)) - { - GNUNET_break_op (0); - GNUNET_JSON_parse_free (spec); - return TALER_MHD_reply_with_error (connection, - MHD_HTTP_BAD_REQUEST, - TALER_EC_GENERIC_PARAMETER_MALFORMED, - "user_type"); - } - { enum GNUNET_GenericReturnValue ret; diff --git a/src/backenddb/pg_insert_instance.c b/src/backenddb/pg_insert_instance.c index 6928a094..f1217e29 100644 --- a/src/backenddb/pg_insert_instance.c +++ b/src/backenddb/pg_insert_instance.c @@ -35,14 +35,12 @@ TMH_PG_insert_instance ( const struct TALER_MERCHANTDB_InstanceAuthSettings *ias) { struct PostgresClosure *pg = cls; - uint32_t ut32 = (uint32_t) is->ut; struct GNUNET_PQ_QueryParam params[] = { GNUNET_PQ_query_param_auto_from_type (merchant_pub), GNUNET_PQ_query_param_auto_from_type (&ias->auth_hash), GNUNET_PQ_query_param_auto_from_type (&ias->auth_salt), GNUNET_PQ_query_param_string (is->id), GNUNET_PQ_query_param_string (is->name), - GNUNET_PQ_query_param_uint32 (&ut32), TALER_PQ_query_param_json (is->address), TALER_PQ_query_param_json (is->jurisdiction), GNUNET_PQ_query_param_bool (is->use_stefan), @@ -76,7 +74,6 @@ TMH_PG_insert_instance ( ",auth_salt" ",merchant_id" ",merchant_name" - ",user_type" ",address" ",jurisdiction" ",use_stefan" @@ -84,9 +81,10 @@ TMH_PG_insert_instance ( ",default_pay_delay" ",website" ",email" - ",logo)" + ",logo" + ",user_type)" "VALUES" - "($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, $14)"); + "($1, $2, $3, $4, $5, $6, $7, $8, $9, $10, $11, $12, $13, 0)"); qs = GNUNET_PQ_eval_prepared_non_select (pg->conn, "insert_instance", params); diff --git a/src/backenddb/pg_lookup_instances.c b/src/backenddb/pg_lookup_instances.c index 323b1957..f4f820ac 100644 --- a/src/backenddb/pg_lookup_instances.c +++ b/src/backenddb/pg_lookup_instances.c @@ -173,7 +173,6 @@ lookup_instances_cb (void *cls, { bool no_auth; bool no_salt; - uint32_t ut32; struct GNUNET_PQ_ResultSpec rs[] = { GNUNET_PQ_result_spec_uint64 ("merchant_serial", &lic->instance_serial), @@ -191,8 +190,6 @@ lookup_instances_cb (void *cls, &lic->is.id), GNUNET_PQ_result_spec_string ("merchant_name", &lic->is.name), - GNUNET_PQ_result_spec_uint32 ("user_type", - &ut32), TALER_PQ_result_spec_json ("address", &lic->is.address), TALER_PQ_result_spec_json ("jurisdiction", @@ -200,7 +197,8 @@ lookup_instances_cb (void *cls, GNUNET_PQ_result_spec_bool ("use_stefan", &lic->is.use_stefan), GNUNET_PQ_result_spec_relative_time ("default_wire_transfer_delay", - &lic->is.default_wire_transfer_delay), + &lic->is.default_wire_transfer_delay) + , GNUNET_PQ_result_spec_relative_time ("default_pay_delay", &lic->is.default_pay_delay), GNUNET_PQ_result_spec_allow_null ( @@ -233,7 +231,6 @@ lookup_instances_cb (void *cls, lic->qs = GNUNET_DB_STATUS_HARD_ERROR; return; } - lic->is.ut = (enum TALER_KYCLOGIC_KycUserType) ut32; call_cb (lic); GNUNET_PQ_cleanup_result (rs); if (0 > lic->qs) @@ -270,7 +267,6 @@ TMH_PG_lookup_instances (void *cls, ",auth_salt" ",merchant_id" ",merchant_name" - ",user_type" ",address" ",jurisdiction" ",use_stefan" diff --git a/src/backenddb/pg_update_instance.c b/src/backenddb/pg_update_instance.c index 228e2031..91026638 100644 --- a/src/backenddb/pg_update_instance.c +++ b/src/backenddb/pg_update_instance.c @@ -32,7 +32,6 @@ TMH_PG_update_instance (void *cls, const struct TALER_MERCHANTDB_InstanceSettings *is) { struct PostgresClosure *pg = cls; - uint32_t ut32 = (uint32_t) is->ut; struct GNUNET_PQ_QueryParam params[] = { GNUNET_PQ_query_param_string (is->id), GNUNET_PQ_query_param_string (is->name), @@ -52,7 +51,6 @@ TMH_PG_update_instance (void *cls, (NULL == is->logo) ? GNUNET_PQ_query_param_null () : GNUNET_PQ_query_param_string (is->logo), - GNUNET_PQ_query_param_uint32 (&ut32), GNUNET_PQ_query_param_end }; @@ -69,7 +67,6 @@ TMH_PG_update_instance (void *cls, ",website=$8" ",email=$9" ",logo=$10" - ",user_type=$11" " WHERE merchant_id=$1"); return GNUNET_PQ_eval_prepared_non_select (pg->conn, "update_instance", diff --git a/src/include/taler_merchant_service.h b/src/include/taler_merchant_service.h index 68ab80fa..c36328a7 100644 --- a/src/include/taler_merchant_service.h +++ b/src/include/taler_merchant_service.h @@ -470,11 +470,6 @@ struct TALER_MERCHANT_InstanceInformation */ const json_t *payment_targets; - /** - * User type for the instance. - */ - enum TALER_KYCLOGIC_KycUserType ut; - }; @@ -602,7 +597,6 @@ TALER_MERCHANT_instances_post ( const char *backend_url, const char *instance_id, const char *name, - enum TALER_KYCLOGIC_KycUserType ut, const json_t *address, const json_t *jurisdiction, bool use_stefan, @@ -668,7 +662,6 @@ TALER_MERCHANT_instance_patch ( const char *backend_url, const char *instance_id, const char *name, - enum TALER_KYCLOGIC_KycUserType ut, const json_t *address, const json_t *jurisdiction, bool use_stefan, @@ -790,10 +783,6 @@ struct TALER_MERCHANT_InstanceDetails */ struct GNUNET_TIME_Relative default_pay_delay; - /** - * User type for the instance. - */ - enum TALER_KYCLOGIC_KycUserType ut; }; diff --git a/src/include/taler_merchantdb_plugin.h b/src/include/taler_merchantdb_plugin.h index faccc55a..476f5785 100644 --- a/src/include/taler_merchantdb_plugin.h +++ b/src/include/taler_merchantdb_plugin.h @@ -210,10 +210,6 @@ struct TALER_MERCHANTDB_InstanceSettings */ struct GNUNET_TIME_Relative default_pay_delay; - /** - * Type of user this merchant represents. - */ - enum TALER_KYCLOGIC_KycUserType ut; }; diff --git a/src/lib/Makefile.am b/src/lib/Makefile.am index d997b767..4e6a901a 100644 --- a/src/lib/Makefile.am +++ b/src/lib/Makefile.am @@ -10,7 +10,7 @@ lib_LTLIBRARIES = \ libtalermerchant.la libtalermerchant_la_LDFLAGS = \ - -version-info 5:3:0 \ + -version-info 6:0:0 \ -no-undefined libtalermerchant_la_SOURCES = \ diff --git a/src/lib/merchant_api_get_instance.c b/src/lib/merchant_api_get_instance.c index eef95b84..76f3691a 100644 --- a/src/lib/merchant_api_get_instance.c +++ b/src/lib/merchant_api_get_instance.c @@ -136,16 +136,6 @@ handle_get_instance_finished (void *cls, } igr.details.ok.details.address = address; igr.details.ok.details.jurisdiction = jurisdiction; - if (GNUNET_OK != - TALER_KYCLOGIC_kyc_user_type_from_string ( - uts, - &igr.details.ok.details.ut)) - { - GNUNET_break_op (0); - igr.hr.http_status = 0; - igr.hr.ec = TALER_EC_GENERIC_INVALID_RESPONSE; - break; - } igh->cb (igh->cb_cls, &igr); TALER_MERCHANT_instance_get_cancel (igh); diff --git a/src/lib/merchant_api_get_instances.c b/src/lib/merchant_api_get_instances.c index b2f99853..c47c4895 100644 --- a/src/lib/merchant_api_get_instances.c +++ b/src/lib/merchant_api_get_instances.c @@ -126,13 +126,6 @@ parse_instances (const json_t *json, GNUNET_break_op (0); return GNUNET_SYSERR; } - if (GNUNET_OK != - TALER_KYCLOGIC_kyc_user_type_from_string (uts, - &ii->ut)) - { - GNUNET_break_op (0); - return GNUNET_SYSERR; - } for (size_t i = 0; i<json_array_size (ii->payment_targets); i++) { if (! json_is_string (json_array_get (ii->payment_targets, diff --git a/src/lib/merchant_api_patch_instance.c b/src/lib/merchant_api_patch_instance.c index 420cd549..f4f39642 100644 --- a/src/lib/merchant_api_patch_instance.c +++ b/src/lib/merchant_api_patch_instance.c @@ -159,7 +159,6 @@ TALER_MERCHANT_instance_patch ( const char *backend_url, const char *instance_id, const char *name, - enum TALER_KYCLOGIC_KycUserType ut, const json_t *address, const json_t *jurisdiction, bool use_stefan, @@ -170,19 +169,10 @@ TALER_MERCHANT_instance_patch ( { struct TALER_MERCHANT_InstancePatchHandle *iph; json_t *req_obj; - const char *uts; - uts = TALER_KYCLOGIC_kyc_user_type2s (ut); - if (NULL == uts) - { - GNUNET_break (0); - return NULL; - } req_obj = GNUNET_JSON_PACK ( 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", diff --git a/src/lib/merchant_api_post_instances.c b/src/lib/merchant_api_post_instances.c index 73d36369..c8e5add6 100644 --- a/src/lib/merchant_api_post_instances.c +++ b/src/lib/merchant_api_post_instances.c @@ -165,7 +165,6 @@ TALER_MERCHANT_instances_post ( const char *backend_url, const char *instance_id, const char *name, - enum TALER_KYCLOGIC_KycUserType ut, const json_t *address, const json_t *jurisdiction, bool use_stefan, @@ -178,14 +177,7 @@ TALER_MERCHANT_instances_post ( struct TALER_MERCHANT_InstancesPostHandle *iph; 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, @@ -219,8 +211,6 @@ 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", diff --git a/src/testing/testing_api_cmd_patch_instance.c b/src/testing/testing_api_cmd_patch_instance.c index cef38bec..f4ae5cf7 100644 --- a/src/testing/testing_api_cmd_patch_instance.c +++ b/src/testing/testing_api_cmd_patch_instance.c @@ -158,7 +158,6 @@ patch_instance_run (void *cls, pis->merchant_url, pis->instance_id, pis->name, - TALER_KYCLOGIC_KYC_UT_BUSINESS, pis->address, pis->jurisdiction, pis->use_stefan, diff --git a/src/testing/testing_api_cmd_post_instances.c b/src/testing/testing_api_cmd_post_instances.c index 0d081026..18afb2e8 100644 --- a/src/testing/testing_api_cmd_post_instances.c +++ b/src/testing/testing_api_cmd_post_instances.c @@ -164,7 +164,6 @@ post_instances_run (void *cls, pis->merchant_url, pis->instance_id, pis->name, - TALER_KYCLOGIC_KYC_UT_BUSINESS, pis->address, pis->jurisdiction, pis->use_stefan, |