diff options
Diffstat (limited to 'src/testing/test_merchant_api.c')
-rw-r--r-- | src/testing/test_merchant_api.c | 39 |
1 files changed, 19 insertions, 20 deletions
diff --git a/src/testing/test_merchant_api.c b/src/testing/test_merchant_api.c index 72546e4c..d4cebcf6 100644 --- a/src/testing/test_merchant_api.c +++ b/src/testing/test_merchant_api.c @@ -60,8 +60,6 @@ */ static char *config_file; -#define PAYTO_I1 "payto://x-taler-bank/localhost/3?receiver-name=3" - /** * Exchange base URL. Could also be taken from config. */ @@ -70,17 +68,17 @@ static char *config_file; /** * Payto URI of the customer (payer). */ -static const char *payer_payto; +static struct TALER_FullPayto payer_payto; /** * Payto URI of the exchange (escrow account). */ -static const char *exchange_payto; +static struct TALER_FullPayto exchange_payto; /** * Payto URI of the merchant (receiver). */ -static const char *merchant_payto; +static struct TALER_FullPayto merchant_payto; /** * Credentials for the test. @@ -216,7 +214,7 @@ run (void *cls, TALER_TESTING_cmd_merchant_post_account ( "instance-create-default-account", merchant_url, - PAYTO_I1, + merchant_payto, NULL, NULL, MHD_HTTP_OK), TALER_TESTING_cmd_merchant_kyc_get ( @@ -490,7 +488,7 @@ run (void *cls, merchant_payto), TALER_TESTING_cmd_merchant_post_transfer ("post-transfer-1", &cred.ba, - PAYTO_I1, + merchant_payto, merchant_url, "EUR:4.98", MHD_HTTP_NO_CONTENT, @@ -500,7 +498,7 @@ run (void *cls, config_file), TALER_TESTING_cmd_merchant_post_transfer2 ("post-transfer-bad", merchant_url, - PAYTO_I1, + merchant_payto, "EUR:4.98", NULL, /*non-routable IP address @@ -510,7 +508,7 @@ run (void *cls, MHD_HTTP_NO_CONTENT), TALER_TESTING_cmd_merchant_get_transfers ("get-transfers-1", merchant_url, - PAYTO_I1, + merchant_payto, MHD_HTTP_OK, "post-transfer-1", "post-transfer-bad", @@ -977,7 +975,7 @@ run (void *cls, TALER_TESTING_cmd_merchant_post_account ( "instance-create-i1a-account", merchant_url_i1a, - PAYTO_I1, + merchant_payto, NULL, NULL, MHD_HTTP_OK), TALER_TESTING_cmd_merchant_get_product ("get-nx-product-i1a-1", @@ -1855,7 +1853,7 @@ run (void *cls, TALER_TESTING_cmd_merchant_post_account ( "instance-create-default-account", merchant_url, - PAYTO_I1, + merchant_payto, NULL, NULL, MHD_HTTP_OK), TALER_TESTING_cmd_merchant_post_instances ( @@ -1989,7 +1987,7 @@ run (void *cls, TALER_TESTING_cmd_merchant_post_account ( "instance-create-default-account-after-purge", merchant_url, - PAYTO_I1, + merchant_payto, NULL, NULL, MHD_HTTP_OK), TALER_TESTING_cmd_merchant_get_products ( @@ -2166,15 +2164,16 @@ main (int argc, cipher); GNUNET_free (cipher); } - payer_payto = - "payto://x-taler-bank/localhost/" USER_ACCOUNT_NAME "?receiver-name=" - USER_ACCOUNT_NAME; - exchange_payto = - "payto://x-taler-bank/localhost/" EXCHANGE_ACCOUNT_NAME "?receiver-name=" + payer_payto.full_payto = + (char *) "payto://x-taler-bank/localhost/" USER_ACCOUNT_NAME + "?receiver-name=" USER_ACCOUNT_NAME; + exchange_payto.full_payto = + (char *) "payto://x-taler-bank/localhost/" EXCHANGE_ACCOUNT_NAME + "?receiver-name=" EXCHANGE_ACCOUNT_NAME; - merchant_payto = - "payto://x-taler-bank/localhost/" MERCHANT_ACCOUNT_NAME "?receiver-name=" - MERCHANT_ACCOUNT_NAME; + merchant_payto.full_payto = + (char *) "payto://x-taler-bank/localhost/" MERCHANT_ACCOUNT_NAME + "?receiver-name=" MERCHANT_ACCOUNT_NAME; merchant_url = "http://localhost:8080/"; GNUNET_asprintf (&merchant_url_i1a, "%sinstances/i1a/", |