diff options
author | Christian Grothoff <christian@grothoff.org> | 2023-01-16 19:00:15 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2023-01-16 19:00:15 +0100 |
commit | be1daf172c17cd60c7b8493d1f723db5ded0f8c1 (patch) | |
tree | f369099ff993fc1c8378a4fc01fc1a3157b4775d /src/lib/merchant_api_common.c | |
parent | 3de9e044eddbe4d7054df875d516be1273f5be7c (diff) |
code clean up and get KYC test to pass again with recent exchange changes
Diffstat (limited to 'src/lib/merchant_api_common.c')
-rw-r--r-- | src/lib/merchant_api_common.c | 49 |
1 files changed, 9 insertions, 40 deletions
diff --git a/src/lib/merchant_api_common.c b/src/lib/merchant_api_common.c index 7c0918f9..00e0358d 100644 --- a/src/lib/merchant_api_common.c +++ b/src/lib/merchant_api_common.c @@ -1,6 +1,6 @@ /* This file is part of TALER - Copyright (C) 2020 to 2022 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 published by the Free Software @@ -23,6 +23,7 @@ #include "platform.h" #include <curl/curl.h> #include "taler_merchant_service.h" +#include "merchant_api_common.h" #include <gnunet/gnunet_uri_lib.h> #include <taler/taler_json_lib.h> @@ -106,31 +107,7 @@ TALER_MERCHANT_parse_error_details_ (const json_t *response, } -char * -TALER_MERCHANT_baseurl_add_instance (const char *base_url, - const char *instance_id) -{ - char *ret; - bool end_sl; - - if ('\0' == *base_url) - { - GNUNET_break (0); - return NULL; - } - end_sl = '/' == base_url[strlen (base_url) - 1]; - - GNUNET_asprintf (&ret, - (end_sl) - ? "%sinstances/%s/" - : "%s/instances/%s/", - base_url, - instance_id); - return ret; -} - - -int +enum GNUNET_GenericReturnValue TALER_MERCHANT_parse_pay_uri (const char *pay_uri, struct TALER_MERCHANT_PayUriData *parse_data) { @@ -374,20 +351,12 @@ TALER_MERCHANT_parse_refund_uri_free ( } -/** - * Function called when we're done processing the - * HTTP POST /using-template request to create an order. - * - * @param cb_cls closure - * @param cb callback - * @param response_code HTTP response code, 0 on error - * @param json for reply - */ void -TALER_MERCHANT_handle_post_using_templates_create_order (void *cb_cls, - TALER_MERCHANT_PostOrdersCallback cb, - long response_code, - const json_t *json) +TALER_MERCHANT_handle_order_creation_response_ ( + TALER_MERCHANT_PostOrdersCallback cb, + void *cb_cls, + long response_code, + const json_t *json) { struct TALER_MERCHANT_PostOrdersReply por = { .hr.http_status = (unsigned int) response_code, @@ -513,5 +482,5 @@ TALER_MERCHANT_handle_post_using_templates_create_order (void *cb_cls, break; } // end of switch cb (cb_cls, - &por); + &por); } |