diff options
author | Florian Dold <florian.dold@gmail.com> | 2018-01-30 01:38:28 +0100 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2018-01-30 01:38:28 +0100 |
commit | a4bff93ef869bbcd0f425d1b424d9b307f601447 (patch) | |
tree | 579f8ff4a1333e9175b826240e28371a8e9356d0 /src/lib | |
parent | 4b47e3ac9fd0f69f6ab1a317ac03b828d0993cba (diff) | |
download | merchant-a4bff93ef869bbcd0f425d1b424d9b307f601447.tar.gz merchant-a4bff93ef869bbcd0f425d1b424d9b307f601447.tar.bz2 merchant-a4bff93ef869bbcd0f425d1b424d9b307f601447.zip |
use url instead of uri consistently
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/merchant_api_common.c | 2 | ||||
-rw-r--r-- | src/lib/merchant_api_common.h | 2 | ||||
-rw-r--r-- | src/lib/merchant_api_history.c | 8 | ||||
-rw-r--r-- | src/lib/merchant_api_pay_abort.c | 6 | ||||
-rw-r--r-- | src/lib/merchant_api_proposal.c | 14 | ||||
-rw-r--r-- | src/lib/merchant_api_refund.c | 12 | ||||
-rw-r--r-- | src/lib/merchant_api_tip_authorize.c | 8 | ||||
-rw-r--r-- | src/lib/merchant_api_tip_pickup.c | 8 | ||||
-rw-r--r-- | src/lib/merchant_api_track_transaction.c | 8 | ||||
-rw-r--r-- | src/lib/merchant_api_track_transfer.c | 14 | ||||
-rw-r--r-- | src/lib/test_merchant_api.c | 8 | ||||
-rw-r--r-- | src/lib/test_merchant_api.conf | 10 | ||||
-rw-r--r-- | src/lib/test_merchant_api_home/.config/taler/merchant/wire/test.json | 2 | ||||
-rw-r--r-- | src/lib/test_merchant_api_home/.config/taler/test.json | 4 |
14 files changed, 53 insertions, 53 deletions
diff --git a/src/lib/merchant_api_common.c b/src/lib/merchant_api_common.c index 12bc81d4..c5b4a782 100644 --- a/src/lib/merchant_api_common.c +++ b/src/lib/merchant_api_common.c @@ -29,7 +29,7 @@ * * @param base_url base URL of the exchange (i.e. "http://exchange/") * @param path Taler API path (i.e. "/reserve/withdraw") - * @return the full URI to use with cURL + * @return the full URL to use with cURL */ char * MAH_path_to_url_ (const char *base_url, diff --git a/src/lib/merchant_api_common.h b/src/lib/merchant_api_common.h index 09696e3b..c94287fb 100644 --- a/src/lib/merchant_api_common.h +++ b/src/lib/merchant_api_common.h @@ -27,7 +27,7 @@ * * @param base_url base URL of the exchange (i.e. "http://exchange/") * @param path Taler API path (i.e. "/reserve/withdraw") - * @return the full URI to use with cURL + * @return the full URL to use with cURL */ char * MAH_path_to_url_ (const char *base_url, diff --git a/src/lib/merchant_api_history.c b/src/lib/merchant_api_history.c index efc20be1..8aa38dca 100644 --- a/src/lib/merchant_api_history.c +++ b/src/lib/merchant_api_history.c @@ -110,7 +110,7 @@ history_raw_cb (void *cls, return; case MHD_HTTP_INTERNAL_SERVER_ERROR: GNUNET_log (GNUNET_ERROR_TYPE_INFO, - "/history URI not found\n"); + "/history URL not found\n"); break; case MHD_HTTP_BAD_REQUEST: GNUNET_log (GNUNET_ERROR_TYPE_INFO, @@ -137,7 +137,7 @@ history_raw_cb (void *cls, * Issue a /history request to the backend. * * @param ctx execution context - * @param backend_uri base URL of the merchant backend + * @param backend_url base URL of the merchant backend * @param instance which merchant instance is performing this call * @param start return `delta` records starting from position `start`. * If given as zero, then no initial skip of `start` records is done. @@ -149,7 +149,7 @@ history_raw_cb (void *cls, */ struct TALER_MERCHANT_HistoryOperation * TALER_MERCHANT_history (struct GNUNET_CURL_Context *ctx, - const char *backend_uri, + const char *backend_url, const char *instance, unsigned int start, unsigned int delta, @@ -167,7 +167,7 @@ TALER_MERCHANT_history (struct GNUNET_CURL_Context *ctx, ho->cb = history_cb; ho->cb_cls = history_cb_cls; seconds = date.abs_value_us / 1000LL / 1000LL; - base = MAH_path_to_url_ (backend_uri, + base = MAH_path_to_url_ (backend_url, "/history"); GNUNET_asprintf (&ho->url, "%s?date=%llu&instance=%s&start=%d&delta=%d", diff --git a/src/lib/merchant_api_pay_abort.c b/src/lib/merchant_api_pay_abort.c index 76163743..d9fb2e14 100644 --- a/src/lib/merchant_api_pay_abort.c +++ b/src/lib/merchant_api_pay_abort.c @@ -254,7 +254,7 @@ handle_pay_finished (void *cls, * by the logic using this library. * * @param ctx the execution loop context - * @param merchant_uri base URI of the merchant's backend + * @param merchant_url base URL of the merchant's backend * @param instance which merchant instance will receive this payment * @param h_contract_terms hashcode of the proposal being paid * @param amount total value of the contract to be paid to the merchant @@ -274,7 +274,7 @@ handle_pay_finished (void *cls, */ struct TALER_MERCHANT_Pay * TALER_MERCHANT_pay_wallet (struct GNUNET_CURL_Context *ctx, - const char *merchant_uri, + const char *merchant_url, const char *instance, const struct GNUNET_HashCode *h_contract_terms, const struct TALER_Amount *amount, @@ -440,7 +440,7 @@ TALER_MERCHANT_pay_wallet (struct GNUNET_CURL_Context *ctx, ph->ctx = ctx; ph->cb = pay_cb; ph->cb_cls = pay_cb_cls; - ph->url = MAH_path_to_url_ (merchant_uri, + ph->url = MAH_path_to_url_ (merchant_url, "/pay"); ph->num_coins = num_coins; ph->coins = GNUNET_new_array (num_coins, diff --git a/src/lib/merchant_api_proposal.c b/src/lib/merchant_api_proposal.c index 17b23155..936e0eb1 100644 --- a/src/lib/merchant_api_proposal.c +++ b/src/lib/merchant_api_proposal.c @@ -75,7 +75,7 @@ struct TALER_MERCHANT_ProposalOperation struct TALER_MERCHANT_ProposalLookupOperation { /** - * Full URI, includes "/proposal". + * Full URL, includes "/proposal". */ char *url; @@ -192,7 +192,7 @@ handle_proposal_finished (void *cls, * POST an order to the backend and receives the related proposal. * * @param ctx execution context - * @param backend_uri URI of the backend + * @param backend_url URL of the backend * @param order basic information about this purchase, to be extended by the * backend * @param proposal_cb the callback to call when a reply for this request is @@ -202,7 +202,7 @@ handle_proposal_finished (void *cls, */ struct TALER_MERCHANT_ProposalOperation * TALER_MERCHANT_order_put (struct GNUNET_CURL_Context *ctx, - const char *backend_uri, + const char *backend_url, const json_t *order, TALER_MERCHANT_ProposalCallback proposal_cb, void *proposal_cb_cls) @@ -215,7 +215,7 @@ TALER_MERCHANT_order_put (struct GNUNET_CURL_Context *ctx, po->ctx = ctx; po->cb = proposal_cb; po->cb_cls = proposal_cb_cls; - po->url = MAH_path_to_url_ (backend_uri, + po->url = MAH_path_to_url_ (backend_url, "/order"); req = json_pack ("{s:O}", "order", (json_t *) order); @@ -349,7 +349,7 @@ handle_proposal_lookup_finished (void *cls, * retrieve a proposal data by providing its transaction id. * * @param ctx execution context - * @param backend_uri base URL of the merchant backend + * @param backend_url base URL of the merchant backend * @param order_id order id used to perform the lookup * @param nonce nonce used to perform the lookup * @param plo_cb callback which will work the response gotten from the backend @@ -358,7 +358,7 @@ handle_proposal_lookup_finished (void *cls, */ struct TALER_MERCHANT_ProposalLookupOperation * TALER_MERCHANT_proposal_lookup (struct GNUNET_CURL_Context *ctx, - const char *backend_uri, + const char *backend_url, const char *order_id, const char *instance, const struct GNUNET_CRYPTO_EddsaPublicKey *nonce, @@ -373,7 +373,7 @@ TALER_MERCHANT_proposal_lookup (struct GNUNET_CURL_Context *ctx, plo->ctx = ctx; plo->cb = plo_cb; plo->cb_cls = plo_cb_cls; - base = MAH_path_to_url_ (backend_uri, + base = MAH_path_to_url_ (backend_url, "/public/proposal"); if (NULL != nonce) { diff --git a/src/lib/merchant_api_refund.c b/src/lib/merchant_api_refund.c index 75a7899e..0307c42f 100644 --- a/src/lib/merchant_api_refund.c +++ b/src/lib/merchant_api_refund.c @@ -170,7 +170,7 @@ TALER_MERCHANT_refund_increase_cancel (struct TALER_MERCHANT_RefundIncreaseOpera * Increase the refund associated to a order * * @param ctx the CURL context used to connect to the backend - * @param backend_uri backend's base URL, including final "/" + * @param backend_url backend's base URL, including final "/" * @param order_id id of the order whose refund is to be increased * @param refund amount to which increase the refund * @param reason human-readable reason justifying the refund @@ -180,7 +180,7 @@ TALER_MERCHANT_refund_increase_cancel (struct TALER_MERCHANT_RefundIncreaseOpera */ struct TALER_MERCHANT_RefundIncreaseOperation * TALER_MERCHANT_refund_increase (struct GNUNET_CURL_Context *ctx, - const char *backend_uri, + const char *backend_url, const char *order_id, const struct TALER_Amount *refund, const char *reason, @@ -196,7 +196,7 @@ TALER_MERCHANT_refund_increase (struct GNUNET_CURL_Context *ctx, rio->ctx = ctx; rio->cb = cb; rio->cb_cls = cb_cls; - rio->url = MAH_path_to_url_ (backend_uri, + rio->url = MAH_path_to_url_ (backend_url, "/refund"); req = json_pack ("{s:o, s:s, s:s, s:s}", "refund", TALER_JSON_from_amount (refund), @@ -302,7 +302,7 @@ handle_refund_lookup_finished (void *cls, * Does a GET /refund. * * @param ctx execution context - * @param backend_uri base URL of the merchant backend + * @param backend_url base URL of the merchant backend * @param order_id order id used to perform the lookup * @param cb callback which will work the response gotten from the backend * @param cb_cls closure to pass to the callback @@ -310,7 +310,7 @@ handle_refund_lookup_finished (void *cls, */ struct TALER_MERCHANT_RefundLookupOperation * TALER_MERCHANT_refund_lookup (struct GNUNET_CURL_Context *ctx, - const char *backend_uri, + const char *backend_url, const char *order_id, const char *instance, TALER_MERCHANT_RefundLookupCallback cb, @@ -326,7 +326,7 @@ TALER_MERCHANT_refund_lookup (struct GNUNET_CURL_Context *ctx, GNUNET_asprintf (&rlo->url, "%s/public/refund?instance=%s&order_id=%s", - backend_uri, + backend_url, instance, order_id); eh = curl_easy_init (); diff --git a/src/lib/merchant_api_tip_authorize.c b/src/lib/merchant_api_tip_authorize.c index a7aa4f5a..e9b263b9 100644 --- a/src/lib/merchant_api_tip_authorize.c +++ b/src/lib/merchant_api_tip_authorize.c @@ -85,11 +85,11 @@ check_ok (struct TALER_MERCHANT_TipAuthorizeOperation *tao, { struct GNUNET_HashCode tip_id; struct GNUNET_TIME_Absolute tip_expiration; - const char *exchange_uri; + const char *exchange_url; struct GNUNET_JSON_Specification spec[] = { GNUNET_JSON_spec_absolute_time ("expiration", &tip_expiration), GNUNET_JSON_spec_fixed_auto ("tip_id", &tip_id), - GNUNET_JSON_spec_string ("exchange_url", &exchange_uri), + GNUNET_JSON_spec_string ("exchange_url", &exchange_url), GNUNET_JSON_spec_end() }; @@ -106,7 +106,7 @@ check_ok (struct TALER_MERCHANT_TipAuthorizeOperation *tao, TALER_JSON_get_error_code (json), &tip_id, tip_expiration, - exchange_uri); + exchange_url); tao->cb = NULL; /* do not call twice */ GNUNET_JSON_parse_free (spec); return GNUNET_OK; @@ -236,7 +236,7 @@ TALER_MERCHANT_tip_authorize (struct GNUNET_CURL_Context *ctx, } json_decref (te_obj); GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, - "Requesting URI '%s'\n", + "Requesting URL '%s'\n", tao->url); eh = curl_easy_init (); GNUNET_assert (CURLE_OK == diff --git a/src/lib/merchant_api_tip_pickup.c b/src/lib/merchant_api_tip_pickup.c index e5343e30..4ca3b80c 100644 --- a/src/lib/merchant_api_tip_pickup.c +++ b/src/lib/merchant_api_tip_pickup.c @@ -211,7 +211,7 @@ handle_tip_pickup_finished (void *cls, * that a customer wants to pick up a tip. * * @param ctx execution context - * @param backend_uri base URL of the merchant backend + * @param backend_url base URL of the merchant backend * @param tip_id unique identifier for the tip * @param num_planches number of planchets provided in @a planchets * @param planchets array of planchets to be signed into existence for the tip @@ -221,7 +221,7 @@ handle_tip_pickup_finished (void *cls, */ struct TALER_MERCHANT_TipPickupOperation * TALER_MERCHANT_tip_pickup (struct GNUNET_CURL_Context *ctx, - const char *backend_uri, + const char *backend_url, const struct GNUNET_HashCode *tip_id, unsigned int num_planchets, struct TALER_PlanchetDetail *planchets, @@ -282,7 +282,7 @@ TALER_MERCHANT_tip_pickup (struct GNUNET_CURL_Context *ctx, tpo->ctx = ctx; tpo->cb = pickup_cb; tpo->cb_cls = pickup_cb_cls; - tpo->url = MAH_path_to_url_ (backend_uri, + tpo->url = MAH_path_to_url_ (backend_url, "/public/tip-pickup"); if (NULL == (tpo->json_enc = json_dumps (tp_obj, @@ -296,7 +296,7 @@ TALER_MERCHANT_tip_pickup (struct GNUNET_CURL_Context *ctx, } json_decref (tp_obj); GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, - "Requesting URI '%s'\n", + "Requesting URL '%s'\n", tpo->url); eh = curl_easy_init (); GNUNET_assert (CURLE_OK == diff --git a/src/lib/merchant_api_track_transaction.c b/src/lib/merchant_api_track_transaction.c index 5357d377..d48916a6 100644 --- a/src/lib/merchant_api_track_transaction.c +++ b/src/lib/merchant_api_track_transaction.c @@ -129,7 +129,7 @@ handle_track_transaction_finished (void *cls, * Request backend to return transactions associated with a given wtid. * * @param ctx execution context - * @param backend_uri base URI of the backend + * @param backend_url base URL of the backend * @param instance which merchant instance is going to be tracked * @param order_id order id pointing to the transaction being tracked * @param track_transaction_cb the callback to call when a reply for this request is available @@ -138,7 +138,7 @@ handle_track_transaction_finished (void *cls, */ struct TALER_MERCHANT_TrackTransactionHandle * TALER_MERCHANT_track_transaction (struct GNUNET_CURL_Context *ctx, - const char *backend_uri, + const char *backend_url, const char *instance, const char *order_id, TALER_MERCHANT_TrackTransactionCallback track_transaction_cb, @@ -152,7 +152,7 @@ TALER_MERCHANT_track_transaction (struct GNUNET_CURL_Context *ctx, tdo->ctx = ctx; tdo->cb = track_transaction_cb; tdo->cb_cls = track_transaction_cb_cls; - base = MAH_path_to_url_ (backend_uri, + base = MAH_path_to_url_ (backend_url, "/track/transaction"); GNUNET_asprintf (&tdo->url, "%s?order_id=%s&instance=%s", @@ -161,7 +161,7 @@ TALER_MERCHANT_track_transaction (struct GNUNET_CURL_Context *ctx, instance); GNUNET_free (base); GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, - "Requesting URI '%s'\n", + "Requesting URL '%s'\n", tdo->url); eh = curl_easy_init (); GNUNET_assert (CURLE_OK == diff --git a/src/lib/merchant_api_track_transfer.c b/src/lib/merchant_api_track_transfer.c index 660d4e1e..c55d5440 100644 --- a/src/lib/merchant_api_track_transfer.c +++ b/src/lib/merchant_api_track_transfer.c @@ -214,22 +214,22 @@ handle_track_transfer_finished (void *cls, * Request backend to return transfers associated with a given wtid. * * @param ctx execution context - * @param backend_uri base URI of the backend + * @param backend_url base URL of the backend * @param instance which merchant instance is going to be tracked * @param wire_method wire method used for the wire transfer * @param wtid base32 string indicating a wtid - * @param exchange_uri base URL of the exchange in charge of returning the wanted information + * @param exchange_url base URL of the exchange in charge of returning the wanted information * @param track_transfer_cb the callback to call when a reply for this request is available * @param track_transfer_cb_cls closure for @a contract_cb * @return a handle for this request */ struct TALER_MERCHANT_TrackTransferHandle * TALER_MERCHANT_track_transfer (struct GNUNET_CURL_Context *ctx, - const char *backend_uri, + const char *backend_url, const char *instance, const char *wire_method, const struct TALER_WireTransferIdentifierRawP *wtid, - const char *exchange_uri, + const char *exchange_url, TALER_MERCHANT_TrackTransferCallback track_transfer_cb, void *track_transfer_cb_cls) { @@ -244,14 +244,14 @@ TALER_MERCHANT_track_transfer (struct GNUNET_CURL_Context *ctx, tdo->ctx = ctx; tdo->cb = track_transfer_cb; // very last to be called tdo->cb_cls = track_transfer_cb_cls; - /* TODO: do we need to escape 'exchange_uri' here? */ - base = MAH_path_to_url_ (backend_uri, + /* TODO: do we need to escape 'exchange_url' here? */ + base = MAH_path_to_url_ (backend_url, "/track/transfer"); GNUNET_asprintf (&tdo->url, "%s?wtid=%s&exchange=%s&instance=%s&wire_method=%s", base, wtid_str, - exchange_uri, + exchange_url, instance, wire_method); GNUNET_free (base); diff --git a/src/lib/test_merchant_api.c b/src/lib/test_merchant_api.c index 40b1f60b..d4f605fc 100644 --- a/src/lib/test_merchant_api.c +++ b/src/lib/test_merchant_api.c @@ -2195,7 +2195,7 @@ track_transaction_cb (void *cls, * @param ec taler-specific error code * @param tip_id which tip ID should be used to pickup the tip * @param tip_expiration when does the tip expire (needs to be picked up before this time) - * @param exchange_uri at what exchange can the tip be picked up + * @param exchange_url at what exchange can the tip be picked up */ static void tip_authorize_cb (void *cls, @@ -2203,7 +2203,7 @@ tip_authorize_cb (void *cls, enum TALER_ErrorCode ec, const struct GNUNET_HashCode *tip_id, struct GNUNET_TIME_Absolute tip_expiration, - const char *exchange_uri) + const char *exchange_url) { struct InterpreterState *is = cls; struct Command *cmd = &is->commands[is->ip]; @@ -2232,12 +2232,12 @@ tip_authorize_cb (void *cls, if ( (MHD_HTTP_OK == http_status) && (TALER_EC_NONE == ec) ) { - if (0 != strcmp (exchange_uri, + if (0 != strcmp (exchange_url, EXCHANGE_URL)) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "Unexpected exchange URL %s to command %s\n", - exchange_uri, + exchange_url, cmd->label); fail (is); return; diff --git a/src/lib/test_merchant_api.conf b/src/lib/test_merchant_api.conf index 67ef46bf..924aaa52 100644 --- a/src/lib/test_merchant_api.conf +++ b/src/lib/test_merchant_api.conf @@ -45,7 +45,7 @@ DEFAULT_MAX_DEPOSIT_FEE = EUR:0.10 # Enable 'test' for testing of the actual coin operations. ENABLE = YES -BANK_URI = http://localhost:8083/ +BANK_URL = http://localhost:8083/ # Fees for the forseeable future... # If you see this after 2017, update to match the next 10 years... @@ -72,7 +72,7 @@ CLOSING-FEE-2026 = EUR:0.01 [merchant-exchange-test] -URI = http://localhost:8084/ +URL = http://localhost:8084/ MASTER_KEY = 98NJW3CQHZQGQXTY3K85K531XKPAPAVV4Q5V8PYYRR00NJGZWNVG [merchant-instance-default] @@ -114,10 +114,10 @@ TEST_RESPONSE_FILE = ${TALER_CONFIG_HOME}/merchant/wire/test.json # Informal name of the auditor. Just for the user. NAME = European Central Bank -# URI of the auditor (especially for in the future, when the +# URL of the auditor (especially for in the future, when the # auditor offers an automated issue reporting system). # Not really used today. -URI = http://taler.ezb.eu/ +URL = http://taler.ezb.eu/ # This is the important bit: the signing key of the auditor. PUBLIC_KEY = 9QXF7XY7E9VPV47B5Z806NDFSX2VJ79SVHHD29QEQ3BG31ANHZ60 @@ -163,7 +163,7 @@ DB_CONN_STR = "postgres:///talercheck" TEST_RESPONSE_FILE = ${TALER_CONFIG_HOME}/test.json # What is the main website of the bank? -BANK_URI = "http://localhost:8083/" +BANK_URL = "http://localhost:8083/" # From which account at the 'bank' should outgoing wire transfers be made? BANK_ACCOUNT_NUMBER = 2 diff --git a/src/lib/test_merchant_api_home/.config/taler/merchant/wire/test.json b/src/lib/test_merchant_api_home/.config/taler/merchant/wire/test.json index 99c9c661..6898b005 100644 --- a/src/lib/test_merchant_api_home/.config/taler/merchant/wire/test.json +++ b/src/lib/test_merchant_api_home/.config/taler/merchant/wire/test.json @@ -1,5 +1,5 @@ { "type":"test", - "bank_uri":"http://localhost:8083/", + "bank_url":"http://localhost:8083/", "account_number":62 } diff --git a/src/lib/test_merchant_api_home/.config/taler/test.json b/src/lib/test_merchant_api_home/.config/taler/test.json index 6c8c61f4..74cdc92b 100644 --- a/src/lib/test_merchant_api_home/.config/taler/test.json +++ b/src/lib/test_merchant_api_home/.config/taler/test.json @@ -1,8 +1,8 @@ { "name": "The exchange", "account_number": 3, - "bank_uri": "http://localhost:8083/", + "bank_url": "http://localhost:8083/", "salt": "6259MV4W9V8D2A75RSGGPKYHQRXRPQZ33EBG263JZRJ6SA5HK0RRKHV70TNA1RVRG77M57CCFVSK2B0EJN3SR8S21F0ZX2MR9DNVG50", "type": "test", "sig": "8C3D3J816S29AA2AJ7P9TS6W13KFNFS2RCVYJEWRBNHRRMTTRAWKY7WA1N3G54E4K3XAC2HN6JDHS42TWR5315J34JHHCKV618K221G" -}
\ No newline at end of file +} |