diff options
39 files changed, 136 insertions, 124 deletions
diff --git a/src/backend/taler-merchant-exchangekeyupdate.c b/src/backend/taler-merchant-exchangekeyupdate.c index c1eb11cc..3d9dc299 100644 --- a/src/backend/taler-merchant-exchangekeyupdate.c +++ b/src/backend/taler-merchant-exchangekeyupdate.c @@ -361,7 +361,7 @@ insert_keys_data (const struct TALER_EXCHANGE_Keys *keys) qs = db_plugin->insert_exchange_account ( db_plugin->cls, &keys->master_pub, - account->payto_uri, + account->fpayto_uri, account->conversion_url, debit_restrictions, credit_restrictions, diff --git a/src/backend/taler-merchant-httpd.c b/src/backend/taler-merchant-httpd.c index e46a2db5..9ce53da9 100644 --- a/src/backend/taler-merchant-httpd.c +++ b/src/backend/taler-merchant-httpd.c @@ -337,7 +337,7 @@ TMH_compute_auth (const char *token, void TMH_wire_method_free (struct TMH_WireMethod *wm) { - GNUNET_free (wm->payto_uri); + GNUNET_free (wm->payto_uri.full_payto); GNUNET_free (wm->wire_method); GNUNET_free (wm->credit_facade_url); json_decref (wm->credit_facade_credentials); @@ -2025,9 +2025,11 @@ add_account_cb (void *cls, (void) merchant_priv; wm = GNUNET_new (struct TMH_WireMethod); wm->h_wire = acc->h_wire; - wm->payto_uri = GNUNET_strdup (acc->payto_uri); + wm->payto_uri.full_payto + = GNUNET_strdup (acc->payto_uri.full_payto); wm->wire_salt = acc->salt; - wm->wire_method = TALER_payto_get_method (acc->payto_uri); + wm->wire_method + = TALER_payto_get_method (acc->payto_uri.full_payto); wm->active = acc->active; GNUNET_CONTAINER_DLL_insert (mi->wm_head, mi->wm_tail, diff --git a/src/backend/taler-merchant-httpd.h b/src/backend/taler-merchant-httpd.h index 1e5e955d..7d5e56ae 100644 --- a/src/backend/taler-merchant-httpd.h +++ b/src/backend/taler-merchant-httpd.h @@ -31,9 +31,9 @@ * Shorthand for exit jumps. */ #define EXITIF(cond) \ - do { \ - if (cond) { GNUNET_break (0); goto EXITIF_exit; } \ - } while (0) + do { \ + if (cond) { GNUNET_break (0); goto EXITIF_exit; } \ + } while (0) /** @@ -59,7 +59,7 @@ struct TMH_WireMethod /** * Wire details for this instance */ - char *payto_uri; + struct TALER_FullPayto payto_uri; /** * Salt to use when computing @e h_wire from @e payto_uri. diff --git a/src/backend/taler-merchant-httpd_exchanges.c b/src/backend/taler-merchant-httpd_exchanges.c index f18b7c84..3b73e636 100644 --- a/src/backend/taler-merchant-httpd_exchanges.c +++ b/src/backend/taler-merchant-httpd_exchanges.c @@ -674,6 +674,7 @@ TMH_exchange_check_debit ( struct TALER_Amount *max_amount) { const struct TALER_EXCHANGE_Keys *keys = exchange->keys; + struct TALER_NormalizedPayto np; bool account_ok = false; bool have_kyc = false; struct TALER_Amount kyc_limit; @@ -687,11 +688,14 @@ TMH_exchange_check_debit ( GNUNET_break (0); return GNUNET_SYSERR; } + np = TALER_payto_normalize (wm->payto_uri); + /* For all accounts of the exchange */ for (unsigned int i = 0; i<keys->accounts_len; i++) { const struct TALER_EXCHANGE_WireAccount *account = &keys->accounts[i]; + if (NULL != account->conversion_url) { GNUNET_log (GNUNET_ERROR_TYPE_INFO, @@ -702,12 +706,13 @@ TMH_exchange_check_debit ( if (GNUNET_YES != TALER_EXCHANGE_test_account_allowed (account, false, /* debit */ - wm->payto_uri)) + np)) continue; account_ok = true; /* Check legitimization limits we have with this account at this exchange, if we have any, apply them */ } + GNUNET_free (np.normalized_payto); { bool kyc_ok = false; json_t *jlimits = NULL; @@ -722,7 +727,7 @@ TMH_exchange_check_debit ( GNUNET_break (qs >= 0); GNUNET_log (GNUNET_ERROR_TYPE_INFO, "get_kyc_limits for %s at %s returned %s/%s\n", - wm->payto_uri, + wm->payto_uri.full_payto, exchange->url, kyc_ok ? "KYC OK" : "KYC missing", NULL == jlimits ? "default limits" : "custom limits"); diff --git a/src/backend/taler-merchant-httpd_helper.c b/src/backend/taler-merchant-httpd_helper.c index 8fb5823e..5fc8eb3e 100644 --- a/src/backend/taler-merchant-httpd_helper.c +++ b/src/backend/taler-merchant-httpd_helper.c @@ -35,10 +35,10 @@ TMH_cmp_wire_account ( { const char *credit_facade_url = NULL; const json_t *credit_facade_credentials = NULL; - const char *uri; + struct TALER_FullPayto uri; struct GNUNET_JSON_Specification ispec[] = { - TALER_JSON_spec_payto_uri ("payto_uri", - &uri), + TALER_JSON_spec_full_payto_uri ("payto_uri", + &uri), GNUNET_JSON_spec_mark_optional ( TALER_JSON_spec_web_url ("credit_facade_url", &credit_facade_url), @@ -66,8 +66,8 @@ TMH_cmp_wire_account ( return GNUNET_SYSERR; } if (0 != - strcmp (wm->payto_uri, - uri)) + TALER_full_payto_cmp (wm->payto_uri, + uri)) { return GNUNET_SYSERR; } @@ -111,10 +111,10 @@ TMH_accounts_array_valid (const json_t *accounts) i); const char *credit_facade_url = NULL; const json_t *credit_facade_credentials = NULL; - const char *uri; + struct TALER_FullPayto uri; struct GNUNET_JSON_Specification ispec[] = { - TALER_JSON_spec_payto_uri ("payto_uri", - &uri), + TALER_JSON_spec_full_payto_uri ("payto_uri", + &uri), GNUNET_JSON_spec_mark_optional ( TALER_JSON_spec_web_url ("credit_facade_url", &credit_facade_url), @@ -147,7 +147,7 @@ TMH_accounts_array_valid (const json_t *accounts) { json_t *old_uri = json_array_get (accounts, j); - if (0 == strcmp (uri, + if (0 == strcmp (uri.full_payto, json_string_value ( json_object_get (old_uri, "payto_uri")))) @@ -164,7 +164,7 @@ TMH_accounts_array_valid (const json_t *accounts) { GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Encountered invalid payto://-URI `%s': %s\n", - uri, + uri.full_payto, err); GNUNET_free (err); return false; @@ -175,7 +175,7 @@ TMH_accounts_array_valid (const json_t *accounts) { GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "If credit_facade_url is given, credit_facade_credentials must also be specified (violated for %s)\n", - uri); + uri.full_payto); return false; } if ( (NULL != credit_facade_url) || @@ -490,7 +490,7 @@ TMH_taxes_array_valid (const json_t *taxes) struct TMH_WireMethod * TMH_setup_wire_account ( - const char *payto_uri, + struct TALER_FullPayto payto_uri, const char *credit_facade_url, const json_t *credit_facade_credentials) { @@ -501,7 +501,7 @@ TMH_setup_wire_account ( { GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Invalid URI `%s': %s\n", - payto_uri, + payto_uri.full_payto, emsg); GNUNET_free (emsg); return NULL; @@ -517,12 +517,13 @@ TMH_setup_wire_account ( GNUNET_CRYPTO_random_block (GNUNET_CRYPTO_QUALITY_NONCE, &wm->wire_salt, sizeof (wm->wire_salt)); - wm->payto_uri = GNUNET_strdup (payto_uri); + wm->payto_uri.full_payto + = GNUNET_strdup (payto_uri.full_payto); TALER_merchant_wire_signature_hash (payto_uri, &wm->wire_salt, &wm->h_wire); wm->wire_method - = TALER_payto_get_method (payto_uri); + = TALER_payto_get_method (payto_uri.full_payto); wm->active = true; return wm; } @@ -912,7 +913,7 @@ struct ExchangeMatchContext static void add_matching_account ( void *cls, - const char *payto_uri, + struct TALER_FullPayto payto_uri, const char *conversion_url, const json_t *debit_restrictions, const json_t *credit_restrictions, @@ -921,7 +922,7 @@ add_matching_account ( struct ExchangeMatchContext *rc = cls; char *method; - method = TALER_payto_get_method (payto_uri); + method = TALER_payto_get_method (payto_uri.full_payto); if ( (NULL == rc->wire_method) || (0 == strcmp (method, rc->wire_method)) ) @@ -929,8 +930,8 @@ add_matching_account ( json_t *acc; acc = GNUNET_JSON_PACK ( - GNUNET_JSON_pack_string ("payto_uri", - payto_uri), + TALER_JSON_pack_full_payto ("payto_uri", + payto_uri), GNUNET_JSON_pack_data_auto ("master_sig", master_sig), GNUNET_JSON_pack_allow_null ( diff --git a/src/backend/taler-merchant-httpd_helper.h b/src/backend/taler-merchant-httpd_helper.h index 6783b9d4..97e337cc 100644 --- a/src/backend/taler-merchant-httpd_helper.h +++ b/src/backend/taler-merchant-httpd_helper.h @@ -108,7 +108,7 @@ TMH_template_contract_valid (const json_t *template_contract); */ struct TMH_WireMethod * TMH_setup_wire_account ( - const char *payto_uri, + struct TALER_FullPayto payto_uri, const char *credit_facade_url, const json_t *credit_facade_credentials); @@ -238,12 +238,13 @@ TMH_make_order_status_url (struct MHD_Connection *con, * @param hr a `TALER_EXCHANGE_HttpResponse` */ #define TMH_pack_exchange_reply(hr) \ - GNUNET_JSON_pack_uint64 ("exchange_code", (hr)->ec), \ - GNUNET_JSON_pack_uint64 ("exchange_http_status", (hr)->http_status), \ - GNUNET_JSON_pack_uint64 ("exchange_ec", (hr)->ec), /* LEGACY */ \ - GNUNET_JSON_pack_uint64 ("exchange_hc", (hr)->http_status), /* LEGACY */ \ - GNUNET_JSON_pack_allow_null ( \ - GNUNET_JSON_pack_object_incref ("exchange_reply", (json_t *) (hr)->reply)) + GNUNET_JSON_pack_uint64 ("exchange_code", (hr)->ec), \ + GNUNET_JSON_pack_uint64 ("exchange_http_status", (hr)->http_status), \ + GNUNET_JSON_pack_uint64 ("exchange_ec", (hr)->ec), /* LEGACY */ \ + GNUNET_JSON_pack_uint64 ("exchange_hc", (hr)->http_status), /* LEGACY */ \ + GNUNET_JSON_pack_allow_null ( \ + GNUNET_JSON_pack_object_incref ("exchange_reply", (json_t *) (hr)-> \ + reply)) /** diff --git a/src/backend/taler-merchant-httpd_private-get-accounts-ID.c b/src/backend/taler-merchant-httpd_private-get-accounts-ID.c index 6bc99d26..6e3a3860 100644 --- a/src/backend/taler-merchant-httpd_private-get-accounts-ID.c +++ b/src/backend/taler-merchant-httpd_private-get-accounts-ID.c @@ -83,8 +83,8 @@ TMH_private_get_accounts_ID (const struct TMH_RequestHandler *rh, MHD_HTTP_OK, GNUNET_JSON_pack_bool ("active", tp.active), - GNUNET_JSON_pack_string ("payto_uri", - tp.payto_uri), + TALER_JSON_pack_full_payto ("payto_uri", + tp.payto_uri), GNUNET_JSON_pack_data_auto ("h_wire", &tp.h_wire), GNUNET_JSON_pack_data_auto ("salt", @@ -95,7 +95,7 @@ TMH_private_get_accounts_ID (const struct TMH_RequestHandler *rh, /* We do not return the credentials, as they may be sensitive */ json_decref (tp.credit_facade_credentials); - GNUNET_free (tp.payto_uri); + GNUNET_free (tp.payto_uri.full_payto); GNUNET_free (tp.credit_facade_url); return ret; } diff --git a/src/backend/taler-merchant-httpd_private-get-accounts.c b/src/backend/taler-merchant-httpd_private-get-accounts.c index a5791960..b487d486 100644 --- a/src/backend/taler-merchant-httpd_private-get-accounts.c +++ b/src/backend/taler-merchant-httpd_private-get-accounts.c @@ -20,6 +20,7 @@ */ #include "platform.h" #include "taler-merchant-httpd_private-get-accounts.h" +#include <taler/taler_json_lib.h> /** @@ -43,8 +44,8 @@ add_account (void *cls, GNUNET_JSON_PACK ( GNUNET_JSON_pack_bool ("active", ad->active), - GNUNET_JSON_pack_string ("payto_uri", - ad->payto_uri), + TALER_JSON_pack_full_payto ("payto_uri", + ad->payto_uri), GNUNET_JSON_pack_data_auto ("h_wire", &ad->h_wire)))); } 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 adaa0c9e..0ccee818 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 @@ -102,7 +102,7 @@ struct ExchangeKycRequest /** * Our account's payto URI. */ - char *payto_uri; + struct TALER_FullPayto payto_uri; /** * Base URL of the exchange. @@ -332,7 +332,7 @@ kyc_context_cleanup (void *cls) if (NULL != ekr->keys) TALER_EXCHANGE_keys_decref (ekr->keys); GNUNET_free (ekr->exchange_url); - GNUNET_free (ekr->payto_uri); + GNUNET_free (ekr->payto_uri.full_payto); GNUNET_free (ekr); } if (NULL != kc->eh) @@ -525,7 +525,7 @@ ekr_expand_response (struct ExchangeKycRequest *ekr) json_array_append_new ( ekr->kc->kycs_data, GNUNET_JSON_PACK ( - GNUNET_JSON_pack_string ( + TALER_JSON_pack_full_payto ( "payto_uri", ekr->payto_uri), GNUNET_JSON_pack_data_auto ( @@ -586,7 +586,7 @@ ekr_finished (struct ExchangeKycRequest *ekr) if (NULL != ekr->keys) TALER_EXCHANGE_keys_decref (ekr->keys); GNUNET_free (ekr->exchange_url); - GNUNET_free (ekr->payto_uri); + GNUNET_free (ekr->payto_uri.full_payto); GNUNET_free (ekr); if (NULL != kc->exchange_pending_head) @@ -633,6 +633,7 @@ determine_eligible_accounts ( const struct TALER_EXCHANGE_Keys *keys = ekr->keys; struct TALER_Amount kyc_amount; char *merchant_pub_str; + struct TALER_NormalizedPayto np; ekr->pkaa = json_array (); GNUNET_assert (NULL != ekr->pkaa); @@ -659,12 +660,11 @@ determine_eligible_accounts ( &kc->mi->merchant_pub, sizeof (kc->mi->merchant_pub)); /* For all accounts of the exchange */ + np = TALER_payto_normalize (ekr->payto_uri); for (unsigned int i = 0; i<keys->accounts_len; i++) { const struct TALER_EXCHANGE_WireAccount *account = &keys->accounts[i]; - const char *exchange_account_payto - = account->payto_uri; /* KYC auth transfers are never supported with conversion */ if (NULL != account->conversion_url) @@ -673,10 +673,12 @@ determine_eligible_accounts ( if (GNUNET_YES != TALER_EXCHANGE_test_account_allowed (account, true, /* credit */ - ekr->payto_uri)) + np)) continue; /* exchange account is allowed, add it */ { + const char *exchange_account_payto + = account->fpayto_uri.full_payto; char *payto_kycauth; if (TALER_amount_is_zero (&kyc_amount)) @@ -707,6 +709,7 @@ determine_eligible_accounts ( GNUNET_free (payto_kycauth); } } + GNUNET_free (np.normalized_payto); GNUNET_free (merchant_pub_str); } @@ -749,7 +752,7 @@ kyc_with_exchange (void *cls, GNUNET_log (GNUNET_ERROR_TYPE_INFO, "KYC auth to `%s' impossible for merchant account `%s'\n", ekr->exchange_url, - ekr->payto_uri); + ekr->payto_uri.full_payto); ekr->kyc_auth_conflict = true; } } @@ -777,7 +780,7 @@ static void kyc_status_cb ( void *cls, const struct TALER_MerchantWireHashP *h_wire, - const char *payto_uri, + struct TALER_FullPayto payto_uri, const char *exchange_url, struct GNUNET_TIME_Timestamp last_check, bool kyc_ok, @@ -792,7 +795,7 @@ kyc_status_cb ( GNUNET_log (GNUNET_ERROR_TYPE_INFO, "KYC status for `%s' at `%s' is %u/%s/%s/%s\n", - payto_uri, + payto_uri.full_payto, exchange_url, last_http_status, kyc_ok ? "KYC OK" : "KYC NEEDED", @@ -825,7 +828,8 @@ kyc_status_cb ( ekr->jlimits = json_incref ((json_t *) jlimits); ekr->h_wire = *h_wire; ekr->exchange_url = GNUNET_strdup (exchange_url); - ekr->payto_uri = GNUNET_strdup (payto_uri); + ekr->payto_uri.full_payto + = GNUNET_strdup (payto_uri.full_payto); ekr->last_check = last_check; ekr->kyc_ok = kyc_ok; ekr->kc = kc; 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 c8cd2c12..1e29736d 100644 --- a/src/backend/taler-merchant-httpd_private-get-instances-ID.c +++ b/src/backend/taler-merchant-httpd_private-get-instances-ID.c @@ -49,7 +49,7 @@ get_instances_ID (struct TMH_MerchantInstance *mi, json_array_append_new ( ja, GNUNET_JSON_PACK ( - GNUNET_JSON_pack_string ( + TALER_JSON_pack_full_payto ( "payto_uri", wm->payto_uri), GNUNET_JSON_pack_allow_null ( diff --git a/src/backend/taler-merchant-httpd_private-get-transfers.c b/src/backend/taler-merchant-httpd_private-get-transfers.c index 3e540297..0646cb88 100644 --- a/src/backend/taler-merchant-httpd_private-get-transfers.c +++ b/src/backend/taler-merchant-httpd_private-get-transfers.c @@ -46,7 +46,7 @@ static void transfer_cb (void *cls, const struct TALER_Amount *credit_amount, const struct TALER_WireTransferIdentifierRawP *wtid, - const char *payto_uri, + struct TALER_FullPayto payto_uri, const char *exchange_url, uint64_t transfer_serial_id, struct GNUNET_TIME_Timestamp execution_time, @@ -61,8 +61,8 @@ transfer_cb (void *cls, credit_amount), GNUNET_JSON_pack_data_auto ("wtid", wtid), - GNUNET_JSON_pack_string ("payto_uri", - payto_uri), + TALER_JSON_pack_full_payto ("payto_uri", + payto_uri), GNUNET_JSON_pack_string ("exchange_url", exchange_url), GNUNET_JSON_pack_uint64 ("transfer_serial_id", @@ -96,7 +96,7 @@ TMH_private_get_transfers (const struct TMH_RequestHandler *rh, struct MHD_Connection *connection, struct TMH_HandlerContext *hc) { - const char *payto_uri; + struct TALER_FullPayto payto_uri; struct GNUNET_TIME_Timestamp before = GNUNET_TIME_UNIT_FOREVER_TS; struct GNUNET_TIME_Timestamp after = GNUNET_TIME_UNIT_ZERO_TS; int64_t limit = -20; @@ -104,9 +104,10 @@ TMH_private_get_transfers (const struct TMH_RequestHandler *rh, enum TALER_EXCHANGE_YesNoAll verified; (void) rh; - payto_uri = MHD_lookup_connection_value (connection, - MHD_GET_ARGUMENT_KIND, - "payto_uri"); + payto_uri.full_payto + = (char *) MHD_lookup_connection_value (connection, + MHD_GET_ARGUMENT_KIND, + "payto_uri"); { const char *before_s; 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 70df009e..ad3979ff 100644 --- a/src/backend/taler-merchant-httpd_private-patch-instances-ID.c +++ b/src/backend/taler-merchant-httpd_private-patch-instances-ID.c @@ -43,7 +43,7 @@ static void free_wm (struct TMH_WireMethod *wm) { - GNUNET_free (wm->payto_uri); + GNUNET_free (wm->payto_uri.full_payto); GNUNET_free (wm->wire_method); GNUNET_free (wm); } diff --git a/src/backenddb/pg_account_kyc_get_status.c b/src/backenddb/pg_account_kyc_get_status.c index ef794e63..ee9c84ca 100644 --- a/src/backenddb/pg_account_kyc_get_status.c +++ b/src/backenddb/pg_account_kyc_get_status.c @@ -74,7 +74,7 @@ kyc_status_cb (void *cls, { struct TALER_MerchantWireHashP h_wire; char *exchange_url; - char *payto_uri; + struct TALER_FullPayto payto_uri; struct GNUNET_TIME_Timestamp last_check; bool kyc_ok; struct TALER_AccountAccessTokenP access_token; @@ -87,7 +87,7 @@ kyc_status_cb (void *cls, GNUNET_PQ_result_spec_auto_from_type ("h_wire", &h_wire), GNUNET_PQ_result_spec_string ("payto_uri", - &payto_uri), + &payto_uri.full_payto), GNUNET_PQ_result_spec_string ("exchange_url", &exchange_url), GNUNET_PQ_result_spec_timestamp ("kyc_timestamp", diff --git a/src/backenddb/pg_delete_transfer.c b/src/backenddb/pg_delete_transfer.c index f23d97fa..775c2105 100644 --- a/src/backenddb/pg_delete_transfer.c +++ b/src/backenddb/pg_delete_transfer.c @@ -25,6 +25,7 @@ #include "pg_delete_transfer.h" #include "pg_helper.h" + enum GNUNET_DB_QueryStatus TMH_PG_delete_transfer (void *cls, const char *instance_id, diff --git a/src/backenddb/pg_get_kyc_limits.c b/src/backenddb/pg_get_kyc_limits.c index d6249e56..6d4f464b 100644 --- a/src/backenddb/pg_get_kyc_limits.c +++ b/src/backenddb/pg_get_kyc_limits.c @@ -28,7 +28,7 @@ enum GNUNET_DB_QueryStatus TMH_PG_get_kyc_limits ( void *cls, - const char *merchant_account_uri, + struct TALER_FullPayto merchant_account_uri, const char *instance_id, const char *exchange_url, bool *kyc_ok, @@ -36,7 +36,7 @@ TMH_PG_get_kyc_limits ( { struct PostgresClosure *pg = cls; struct GNUNET_PQ_QueryParam params[] = { - GNUNET_PQ_query_param_string (merchant_account_uri), + GNUNET_PQ_query_param_string (merchant_account_uri.full_payto), GNUNET_PQ_query_param_string (instance_id), GNUNET_PQ_query_param_string (exchange_url), GNUNET_PQ_query_param_end diff --git a/src/backenddb/pg_get_kyc_limits.h b/src/backenddb/pg_get_kyc_limits.h index 830dc9a4..5ecd542e 100644 --- a/src/backenddb/pg_get_kyc_limits.h +++ b/src/backenddb/pg_get_kyc_limits.h @@ -39,7 +39,7 @@ enum GNUNET_DB_QueryStatus TMH_PG_get_kyc_limits ( void *cls, - const char *merchant_account_uri, + struct TALER_FullPayto merchant_account_uri, const char *instance_id, const char *exchange_url, bool *kyc_ok, diff --git a/src/backenddb/pg_get_kyc_status.c b/src/backenddb/pg_get_kyc_status.c index 05423a79..b0618d92 100644 --- a/src/backenddb/pg_get_kyc_status.c +++ b/src/backenddb/pg_get_kyc_status.c @@ -29,7 +29,7 @@ enum GNUNET_DB_QueryStatus TMH_PG_get_kyc_status ( void *cls, - const char *merchant_account_uri, + struct TALER_FullPayto merchant_account_uri, const char *instance_id, const char *exchange_url, bool *auth_ok, @@ -43,7 +43,7 @@ TMH_PG_get_kyc_status ( { struct PostgresClosure *pg = cls; struct GNUNET_PQ_QueryParam params[] = { - GNUNET_PQ_query_param_string (merchant_account_uri), + GNUNET_PQ_query_param_string (merchant_account_uri.full_payto), GNUNET_PQ_query_param_string (instance_id), GNUNET_PQ_query_param_string (exchange_url), GNUNET_PQ_query_param_end diff --git a/src/backenddb/pg_get_kyc_status.h b/src/backenddb/pg_get_kyc_status.h index 9311b240..cfd7a4c3 100644 --- a/src/backenddb/pg_get_kyc_status.h +++ b/src/backenddb/pg_get_kyc_status.h @@ -46,7 +46,7 @@ enum GNUNET_DB_QueryStatus TMH_PG_get_kyc_status ( void *cls, - const char *merchant_account_uri, + struct TALER_FullPayto merchant_account_uri, const char *instance_id, const char *exchange_url, bool *auth_ok, diff --git a/src/backenddb/pg_insert_account.c b/src/backenddb/pg_insert_account.c index 504c4da5..cfada4c4 100644 --- a/src/backenddb/pg_insert_account.c +++ b/src/backenddb/pg_insert_account.c @@ -36,7 +36,7 @@ TMH_PG_insert_account ( GNUNET_PQ_query_param_string (account_details->instance_id), GNUNET_PQ_query_param_auto_from_type (&account_details->h_wire), GNUNET_PQ_query_param_auto_from_type (&account_details->salt), - GNUNET_PQ_query_param_string (account_details->payto_uri), + GNUNET_PQ_query_param_string (account_details->payto_uri.full_payto), NULL ==account_details->credit_facade_url ? GNUNET_PQ_query_param_null () : GNUNET_PQ_query_param_string (account_details->credit_facade_url), diff --git a/src/backenddb/pg_insert_exchange_account.c b/src/backenddb/pg_insert_exchange_account.c index 4495ccc0..536f4f8c 100644 --- a/src/backenddb/pg_insert_exchange_account.c +++ b/src/backenddb/pg_insert_exchange_account.c @@ -30,7 +30,7 @@ enum GNUNET_DB_QueryStatus TMH_PG_insert_exchange_account ( void *cls, const struct TALER_MasterPublicKeyP *master_pub, - const char *payto_uri, + const struct TALER_FullPayto payto_uri, const char *conversion_url, const json_t *debit_restrictions, const json_t *credit_restrictions, @@ -39,7 +39,7 @@ TMH_PG_insert_exchange_account ( struct PostgresClosure *pg = cls; struct GNUNET_PQ_QueryParam params[] = { GNUNET_PQ_query_param_auto_from_type (master_pub), - GNUNET_PQ_query_param_string (payto_uri), + GNUNET_PQ_query_param_string (payto_uri.full_payto), NULL == conversion_url ? GNUNET_PQ_query_param_null () : GNUNET_PQ_query_param_string (conversion_url), diff --git a/src/backenddb/pg_insert_exchange_account.h b/src/backenddb/pg_insert_exchange_account.h index acfcdba2..c41e082d 100644 --- a/src/backenddb/pg_insert_exchange_account.h +++ b/src/backenddb/pg_insert_exchange_account.h @@ -41,7 +41,7 @@ enum GNUNET_DB_QueryStatus TMH_PG_insert_exchange_account ( void *cls, const struct TALER_MasterPublicKeyP *master_pub, - const char *payto_uri, + const struct TALER_FullPayto payto_uri, const char *conversion_url, const json_t *debit_restrictions, const json_t *credit_restrictions, diff --git a/src/backenddb/pg_insert_transfer.c b/src/backenddb/pg_insert_transfer.c index 45a4fa70..debe29dd 100644 --- a/src/backenddb/pg_insert_transfer.c +++ b/src/backenddb/pg_insert_transfer.c @@ -33,7 +33,7 @@ TMH_PG_insert_transfer ( const char *exchange_url, const struct TALER_WireTransferIdentifierRawP *wtid, const struct TALER_Amount *credit_amount, - const char *payto_uri, + struct TALER_FullPayto payto_uri, bool confirmed) { struct PostgresClosure *pg = cls; @@ -42,7 +42,7 @@ TMH_PG_insert_transfer ( GNUNET_PQ_query_param_auto_from_type (wtid), TALER_PQ_query_param_amount_with_currency (pg->conn, credit_amount), - GNUNET_PQ_query_param_string (payto_uri), + GNUNET_PQ_query_param_string (payto_uri.full_payto), GNUNET_PQ_query_param_bool (confirmed), GNUNET_PQ_query_param_string (instance_id), GNUNET_PQ_query_param_end diff --git a/src/backenddb/pg_insert_transfer.h b/src/backenddb/pg_insert_transfer.h index 8385c330..4416b3d7 100644 --- a/src/backenddb/pg_insert_transfer.h +++ b/src/backenddb/pg_insert_transfer.h @@ -45,7 +45,7 @@ TMH_PG_insert_transfer ( const char *exchange_url, const struct TALER_WireTransferIdentifierRawP *wtid, const struct TALER_Amount *credit_amount, - const char *payto_uri, + struct TALER_FullPayto payto_uri, bool confirmed); diff --git a/src/backenddb/pg_insert_transfer_details.c b/src/backenddb/pg_insert_transfer_details.c index aa0ccc53..e9ce58b9 100644 --- a/src/backenddb/pg_insert_transfer_details.c +++ b/src/backenddb/pg_insert_transfer_details.c @@ -37,7 +37,7 @@ TMH_PG_insert_transfer_details ( void *cls, const char *instance_id, const char *exchange_url, - const char *payto_uri, + struct TALER_FullPayto payto_uri, const struct TALER_WireTransferIdentifierRawP *wtid, const struct TALER_EXCHANGE_TransferData *td) { @@ -87,7 +87,7 @@ TMH_PG_insert_transfer_details ( struct GNUNET_PQ_QueryParam params[] = { GNUNET_PQ_query_param_string (instance_id), GNUNET_PQ_query_param_string (exchange_url), - GNUNET_PQ_query_param_string (payto_uri), + GNUNET_PQ_query_param_string (payto_uri.full_payto), GNUNET_PQ_query_param_auto_from_type (wtid), GNUNET_PQ_query_param_timestamp (&td->execution_time), GNUNET_PQ_query_param_auto_from_type (&td->exchange_pub), diff --git a/src/backenddb/pg_insert_transfer_details.h b/src/backenddb/pg_insert_transfer_details.h index 8980024e..c137903a 100644 --- a/src/backenddb/pg_insert_transfer_details.h +++ b/src/backenddb/pg_insert_transfer_details.h @@ -44,7 +44,7 @@ TMH_PG_insert_transfer_details ( void *cls, const char *instance_id, const char *exchange_url, - const char *payto_uri, + struct TALER_FullPayto payto_uri, const struct TALER_WireTransferIdentifierRawP *wtid, const struct TALER_EXCHANGE_TransferData *td); diff --git a/src/backenddb/pg_lookup_account.c b/src/backenddb/pg_lookup_account.c index 992b7408..d759e44e 100644 --- a/src/backenddb/pg_lookup_account.c +++ b/src/backenddb/pg_lookup_account.c @@ -28,13 +28,13 @@ enum GNUNET_DB_QueryStatus TMH_PG_lookup_account (void *cls, const char *instance_id, - const char *payto_uri, + struct TALER_FullPayto payto_uri, uint64_t *account_serial) { struct PostgresClosure *pg = cls; struct GNUNET_PQ_QueryParam params[] = { GNUNET_PQ_query_param_string (instance_id), - GNUNET_PQ_query_param_string (payto_uri), + GNUNET_PQ_query_param_string (payto_uri.full_payto), GNUNET_PQ_query_param_end }; struct GNUNET_PQ_ResultSpec rs[] = { diff --git a/src/backenddb/pg_lookup_account.h b/src/backenddb/pg_lookup_account.h index 63b0aa73..5cbdddf9 100644 --- a/src/backenddb/pg_lookup_account.h +++ b/src/backenddb/pg_lookup_account.h @@ -37,7 +37,7 @@ enum GNUNET_DB_QueryStatus TMH_PG_lookup_account (void *cls, const char *instance_id, - const char *payto_uri, + struct TALER_FullPayto payto_uri, uint64_t *account_serial); #endif diff --git a/src/backenddb/pg_lookup_transfers.c b/src/backenddb/pg_lookup_transfers.c index a2d22719..5f8b8661 100644 --- a/src/backenddb/pg_lookup_transfers.c +++ b/src/backenddb/pg_lookup_transfers.c @@ -73,7 +73,7 @@ lookup_transfers_cb (void *cls, { struct TALER_Amount credit_amount; struct TALER_WireTransferIdentifierRawP wtid; - char *payto_uri; + struct TALER_FullPayto payto_uri; char *exchange_url; uint64_t transfer_serial_id; struct GNUNET_TIME_Timestamp execution_time = GNUNET_TIME_UNIT_FOREVER_TS; @@ -85,7 +85,7 @@ lookup_transfers_cb (void *cls, GNUNET_PQ_result_spec_auto_from_type ("wtid", &wtid), GNUNET_PQ_result_spec_string ("payto_uri", - &payto_uri), + &payto_uri.full_payto), GNUNET_PQ_result_spec_string ("exchange_url", &exchange_url), GNUNET_PQ_result_spec_uint64 ("credit_serial", @@ -128,7 +128,7 @@ lookup_transfers_cb (void *cls, enum GNUNET_DB_QueryStatus TMH_PG_lookup_transfers (void *cls, const char *instance_id, - const char *payto_uri, + struct TALER_FullPayto payto_uri, struct GNUNET_TIME_Timestamp before, struct GNUNET_TIME_Timestamp after, int64_t limit, @@ -152,9 +152,9 @@ TMH_PG_lookup_transfers (void *cls, GNUNET_PQ_query_param_timestamp (&after), GNUNET_PQ_query_param_uint64 (&offset), GNUNET_PQ_query_param_uint64 (&plimit), - NULL == payto_uri + NULL == payto_uri.full_payto ? GNUNET_PQ_query_param_null () /* NULL: do not filter by payto URI */ - : GNUNET_PQ_query_param_string (payto_uri), + : GNUNET_PQ_query_param_string (payto_uri.full_payto), GNUNET_PQ_query_param_bool (! by_time), /* $7: filter by time? */ GNUNET_PQ_query_param_bool (TALER_EXCHANGE_YNA_ALL == verified), /* filter by verified? */ GNUNET_PQ_query_param_bool (TALER_EXCHANGE_YNA_YES == verified), diff --git a/src/backenddb/pg_lookup_transfers.h b/src/backenddb/pg_lookup_transfers.h index 5a522256..1655322e 100644 --- a/src/backenddb/pg_lookup_transfers.h +++ b/src/backenddb/pg_lookup_transfers.h @@ -48,7 +48,7 @@ enum GNUNET_DB_QueryStatus TMH_PG_lookup_transfers (void *cls, const char *instance_id, - const char *payto_uri, + struct TALER_FullPayto payto_uri, struct GNUNET_TIME_Timestamp before, struct GNUNET_TIME_Timestamp after, int64_t limit, diff --git a/src/backenddb/pg_select_account.c b/src/backenddb/pg_select_account.c index eab30377..8481c52b 100644 --- a/src/backenddb/pg_select_account.c +++ b/src/backenddb/pg_select_account.c @@ -42,7 +42,7 @@ TMH_PG_select_account (void *cls, GNUNET_PQ_result_spec_auto_from_type ("salt", &ad->salt), GNUNET_PQ_result_spec_string ("payto_uri", - &ad->payto_uri), + &ad->payto_uri.full_payto), GNUNET_PQ_result_spec_allow_null ( GNUNET_PQ_result_spec_string ("credit_facade_url", &ad->credit_facade_url), diff --git a/src/backenddb/pg_select_account_by_uri.c b/src/backenddb/pg_select_account_by_uri.c index 70471eb4..51de4705 100644 --- a/src/backenddb/pg_select_account_by_uri.c +++ b/src/backenddb/pg_select_account_by_uri.c @@ -29,13 +29,13 @@ enum GNUNET_DB_QueryStatus TMH_PG_select_account_by_uri (void *cls, const char *id, - const char *payto_uri, + struct TALER_FullPayto payto_uri, struct TALER_MERCHANTDB_AccountDetails *ad) { struct PostgresClosure *pg = cls; struct GNUNET_PQ_QueryParam params[] = { GNUNET_PQ_query_param_string (id), - GNUNET_PQ_query_param_string (payto_uri), + GNUNET_PQ_query_param_string (payto_uri.full_payto), GNUNET_PQ_query_param_end }; struct GNUNET_PQ_ResultSpec rs[] = { @@ -58,7 +58,8 @@ TMH_PG_select_account_by_uri (void *cls, ad->credit_facade_url = NULL; ad->credit_facade_credentials = NULL; - ad->payto_uri = GNUNET_strdup (payto_uri); + ad->payto_uri.full_payto + = GNUNET_strdup (payto_uri.full_payto); ad->instance_id = id; check_connection (pg); PREPARE (pg, diff --git a/src/backenddb/pg_select_account_by_uri.h b/src/backenddb/pg_select_account_by_uri.h index 718209be..7a316966 100644 --- a/src/backenddb/pg_select_account_by_uri.h +++ b/src/backenddb/pg_select_account_by_uri.h @@ -38,7 +38,7 @@ enum GNUNET_DB_QueryStatus TMH_PG_select_account_by_uri (void *cls, const char *id, - const char *payto_uri, + struct TALER_FullPayto payto_uri, struct TALER_MERCHANTDB_AccountDetails *ad); #endif diff --git a/src/backenddb/pg_select_accounts.c b/src/backenddb/pg_select_accounts.c index 672db926..006e23ba 100644 --- a/src/backenddb/pg_select_accounts.c +++ b/src/backenddb/pg_select_accounts.c @@ -71,7 +71,7 @@ select_account_cb (void *cls, for (unsigned int i = 0; i < num_results; i++) { - char *payto; + struct TALER_FullPayto payto; char *instance_id; char *facade_url = NULL; json_t *credential = NULL; @@ -84,7 +84,7 @@ select_account_cb (void *cls, GNUNET_PQ_result_spec_auto_from_type ("salt", &acc.salt), GNUNET_PQ_result_spec_string ("payto_uri", - &payto), + &payto.full_payto), GNUNET_PQ_result_spec_string ("merchant_id", &instance_id), GNUNET_PQ_result_spec_allow_null ( diff --git a/src/backenddb/pg_select_accounts_by_exchange.c b/src/backenddb/pg_select_accounts_by_exchange.c index c7637031..b8b54623 100644 --- a/src/backenddb/pg_select_accounts_by_exchange.c +++ b/src/backenddb/pg_select_accounts_by_exchange.c @@ -64,7 +64,7 @@ parse_accounts (void *cls, for (unsigned int i = 0; i < num_results; i++) { - char *payto_uri; + struct TALER_FullPayto payto_uri; char *conversion_url = NULL; json_t *debit_restrictions; json_t *credit_restrictions; @@ -73,7 +73,7 @@ parse_accounts (void *cls, GNUNET_PQ_result_spec_auto_from_type ("master_sig", &master_sig), GNUNET_PQ_result_spec_string ("payto_uri", - &payto_uri), + &payto_uri.full_payto), GNUNET_PQ_result_spec_allow_null ( GNUNET_PQ_result_spec_string ("conversion_url", &conversion_url), diff --git a/src/backenddb/pg_select_open_transfers.c b/src/backenddb/pg_select_open_transfers.c index 40982011..f7752b62 100644 --- a/src/backenddb/pg_select_open_transfers.c +++ b/src/backenddb/pg_select_open_transfers.c @@ -73,7 +73,7 @@ open_transfers_cb (void *cls, uint64_t rowid; char *instance_id; char *exchange_url; - char *payto_uri; + struct TALER_FullPayto payto_uri; struct TALER_WireTransferIdentifierRawP wtid; struct TALER_Amount total; struct GNUNET_TIME_Absolute next_attempt; @@ -85,7 +85,7 @@ open_transfers_cb (void *cls, GNUNET_PQ_result_spec_string ("exchange_url", &exchange_url), GNUNET_PQ_result_spec_string ("payto_uri", - &payto_uri), + &payto_uri.full_payto), GNUNET_PQ_result_spec_auto_from_type ("wtid", &wtid), TALER_PQ_result_spec_amount_with_currency ("credit_amount", diff --git a/src/backenddb/pg_select_wirewatch_accounts.c b/src/backenddb/pg_select_wirewatch_accounts.c index 050caefb..b4424f65 100644 --- a/src/backenddb/pg_select_wirewatch_accounts.c +++ b/src/backenddb/pg_select_wirewatch_accounts.c @@ -66,7 +66,7 @@ handle_results (void *cls, for (unsigned int i = 0; i < num_results; i++) { char *instance; - char *payto_uri; + struct TALER_FullPayto payto_uri; char *facade_url; json_t *credential; uint64_t last_serial; @@ -74,7 +74,7 @@ handle_results (void *cls, GNUNET_PQ_result_spec_string ("merchant_id", &instance), GNUNET_PQ_result_spec_string ("payto_uri", - &payto_uri), + &payto_uri.full_payto), GNUNET_PQ_result_spec_string ("credit_facade_url", &facade_url), GNUNET_PQ_result_spec_allow_null ( diff --git a/src/backenddb/pg_update_wirewatch_progress.c b/src/backenddb/pg_update_wirewatch_progress.c index 629439e3..727258b8 100644 --- a/src/backenddb/pg_update_wirewatch_progress.c +++ b/src/backenddb/pg_update_wirewatch_progress.c @@ -30,13 +30,13 @@ enum GNUNET_DB_QueryStatus TMH_PG_update_wirewatch_progress ( void *cls, const char *instance, - const char *payto_uri, + struct TALER_FullPayto payto_uri, uint64_t last_serial) { struct PostgresClosure *pg = cls; struct GNUNET_PQ_QueryParam params[] = { GNUNET_PQ_query_param_string (instance), - GNUNET_PQ_query_param_string (payto_uri), + GNUNET_PQ_query_param_string (payto_uri.full_payto), GNUNET_PQ_query_param_uint64 (&last_serial), GNUNET_PQ_query_param_end }; diff --git a/src/backenddb/pg_update_wirewatch_progress.h b/src/backenddb/pg_update_wirewatch_progress.h index 0e762adc..5c73e7fc 100644 --- a/src/backenddb/pg_update_wirewatch_progress.h +++ b/src/backenddb/pg_update_wirewatch_progress.h @@ -39,7 +39,7 @@ enum GNUNET_DB_QueryStatus TMH_PG_update_wirewatch_progress ( void *cls, const char *instance, - const char *payto_uri, + struct TALER_FullPayto payto_uri, uint64_t last_serial); diff --git a/src/include/taler_merchantdb_plugin.h b/src/include/taler_merchantdb_plugin.h index cdd5aacd..84ced310 100644 --- a/src/include/taler_merchantdb_plugin.h +++ b/src/include/taler_merchantdb_plugin.h @@ -145,7 +145,7 @@ struct TALER_MERCHANTDB_AccountDetails /** * Actual account address as a payto://-URI. */ - char *payto_uri; + struct TALER_FullPayto payto_uri; /** * Where can the taler-merchant-wirewatch helper @@ -880,7 +880,7 @@ typedef void (*TALER_MERCHANTDB_KycCallback)( void *cls, const struct TALER_MerchantWireHashP *h_wire, - const char *payto_uri, + struct TALER_FullPayto payto_uri, const char *exchange_url, struct GNUNET_TIME_Timestamp last_check, bool kyc_ok, @@ -970,7 +970,7 @@ typedef void uint64_t rowid, const char *instance_id, const char *exchange_url, - const char *payto_uri, + struct TALER_FullPayto payto_uri, const struct TALER_WireTransferIdentifierRawP *wtid, const struct TALER_Amount *total, struct GNUNET_TIME_Absolute next_attempt); @@ -1035,7 +1035,7 @@ typedef void (*TALER_MERCHANTDB_WirewatchWorkCallback)( void *cls, const char *instance, - const char *payto_uri, + struct TALER_FullPayto payto_uri, const char *credit_facade_url, const json_t *credit_facade_credentials, uint64_t last_serial); @@ -1062,7 +1062,7 @@ typedef void void *cls, const struct TALER_Amount *credit_amount, const struct TALER_WireTransferIdentifierRawP *wtid, - const char *payto_uri, + struct TALER_FullPayto payto_uri, const char *exchange_url, uint64_t transfer_serial_id, struct GNUNET_TIME_Timestamp execution_time, @@ -1084,7 +1084,7 @@ typedef void typedef void (*TALER_MERCHANTDB_ExchangeAccountCallback) ( void *cls, - const char *payto_uri, + struct TALER_FullPayto payto_uri, const char *conversion_url, const json_t *debit_restrictions, const json_t *credit_restrictions, @@ -1655,7 +1655,7 @@ struct TALER_MERCHANTDB_Plugin (*select_account_by_uri)( void *cls, const char *id, - const char *payto_uri, + struct TALER_FullPayto payto_uri, struct TALER_MERCHANTDB_AccountDetails *ad); @@ -1779,7 +1779,7 @@ struct TALER_MERCHANTDB_Plugin enum GNUNET_DB_QueryStatus (*get_kyc_status)( void *cls, - const char *merchant_account_uri, + struct TALER_FullPayto merchant_account_uri, const char *instance_id, const char *exchange_url, bool *auth_ok, @@ -1806,7 +1806,7 @@ struct TALER_MERCHANTDB_Plugin enum GNUNET_DB_QueryStatus (*get_kyc_limits)( void *cls, - const char *merchant_account_uri, + struct TALER_FullPayto merchant_account_uri, const char *instance_id, const char *exchange_url, bool *kyc_ok, @@ -2794,7 +2794,7 @@ struct TALER_MERCHANTDB_Plugin (*update_wirewatch_progress)( void *cls, const char *instance, - const char *payto_uri, + struct TALER_FullPayto payto_uri, uint64_t last_serial); @@ -2833,7 +2833,7 @@ struct TALER_MERCHANTDB_Plugin const char *exchange_url, const struct TALER_WireTransferIdentifierRawP *wtid, const struct TALER_Amount *credit_amount, - const char *payto_uri, + struct TALER_FullPayto payto_uri, bool confirmed); @@ -2881,7 +2881,7 @@ struct TALER_MERCHANTDB_Plugin enum GNUNET_DB_QueryStatus (*lookup_account)(void *cls, const char *instance_id, - const char *payto_uri, + struct TALER_FullPayto payto_uri, uint64_t *account_serial); @@ -2903,7 +2903,7 @@ struct TALER_MERCHANTDB_Plugin void *cls, const char *instance_id, const char *exchange_url, - const char *payto_uri, + struct TALER_FullPayto payto_uri, const struct TALER_WireTransferIdentifierRawP *wtid, const struct TALER_EXCHANGE_TransferData *td); @@ -2962,7 +2962,6 @@ struct TALER_MERCHANTDB_Plugin * @param cls closure * @param instance_id the instance to look up details at * @param exchange_url the exchange that made the transfer - * @param payto_uri account that received the transfer * @param wtid wire transfer subject * @param[out] total_amount amount that was debited from our * aggregate balance at the exchange (in total, sum of @@ -3011,9 +3010,7 @@ struct TALER_MERCHANTDB_Plugin * Lookup transfer summary (used if we already verified the details). * * @param cls closure - * @param instance_id instance to lookup payments for * @param exchange_url the exchange that made the transfer - * @param payto_uri account that received the transfer * @param wtid wire transfer subject * @param cb function to call with detailed transfer data * @param cb_cls closure for @a cb @@ -3032,9 +3029,7 @@ struct TALER_MERCHANTDB_Plugin * Lookup transfer details. Used if we still need to verify the details. * * @param cls closure - * @param instance_id instance to lookup payments for * @param exchange_url the exchange that made the transfer - * @param payto_uri account that received the transfer * @param wtid wire transfer subject * @param cb function to call with detailed transfer data * @param cb_cls closure for @a cb @@ -3069,7 +3064,7 @@ struct TALER_MERCHANTDB_Plugin (*lookup_transfers)( void *cls, const char *instance_id, - const char *payto_uri, + struct TALER_FullPayto payto_uri, struct GNUNET_TIME_Timestamp before, struct GNUNET_TIME_Timestamp after, int64_t limit, @@ -3149,7 +3144,7 @@ struct TALER_MERCHANTDB_Plugin (*insert_exchange_account)( void *cls, const struct TALER_MasterPublicKeyP *master_pub, - const char *payto_uri, + const struct TALER_FullPayto payto_uri, const char *conversion_url, const json_t *debit_restrictions, const json_t *credit_restrictions, |