diff options
-rw-r--r-- | src/exchange-lib/test_exchange_api_new.c | 4 | ||||
-rw-r--r-- | src/exchange-lib/testing_api_cmd_fakebank_transfer.c | 18 | ||||
-rw-r--r-- | src/include/taler_testing_lib.h | 9 |
3 files changed, 22 insertions, 9 deletions
diff --git a/src/exchange-lib/test_exchange_api_new.c b/src/exchange-lib/test_exchange_api_new.c index 580c4e972..870f920ec 100644 --- a/src/exchange-lib/test_exchange_api_new.c +++ b/src/exchange-lib/test_exchange_api_new.c @@ -103,7 +103,7 @@ static char *fakebank_url; #define CMD_TRANSFER_TO_EXCHANGE(label,amount) \ TALER_TESTING_cmd_fakebank_transfer (label, amount, \ fakebank_url, USER_ACCOUNT_NO, EXCHANGE_ACCOUNT_NO, \ - USER_LOGIN_NAME, USER_LOGIN_PASS) + USER_LOGIN_NAME, USER_LOGIN_PASS, "https://exchange.com/") /** * Run wire transfer of funds from some user's account to the @@ -116,7 +116,7 @@ static char *fakebank_url; TALER_TESTING_cmd_fakebank_transfer_with_subject \ (label, amount, fakebank_url, USER_ACCOUNT_NO, \ EXCHANGE_ACCOUNT_NO, USER_LOGIN_NAME, USER_LOGIN_PASS, \ - subject) + subject, "https://exchange.com/") /** * Main function that will tell the interpreter what commands to diff --git a/src/exchange-lib/testing_api_cmd_fakebank_transfer.c b/src/exchange-lib/testing_api_cmd_fakebank_transfer.c index 4c0471dd8..1093918fd 100644 --- a/src/exchange-lib/testing_api_cmd_fakebank_transfer.c +++ b/src/exchange-lib/testing_api_cmd_fakebank_transfer.c @@ -103,6 +103,10 @@ struct FakebankTransferState */ uint64_t serial_id; + /** + * Exchange URL. + */ + const char *exchange_url; }; @@ -214,7 +218,7 @@ fakebank_transfer_run (void *cls, (TALER_TESTING_interpreter_get_context (is), fts->bank_url, &auth, - "https://exchange.com/", /* exchange URL: FIXME */ + fts->exchange_url, subject, &fts->amount, fts->debit_account_no, @@ -303,7 +307,8 @@ TALER_TESTING_cmd_fakebank_transfer (const char *label, uint64_t debit_account_no, uint64_t credit_account_no, const char *auth_username, - const char *auth_password) + const char *auth_password, + const char *exchange_url) { struct TALER_TESTING_Command cmd; struct FakebankTransferState *fts; @@ -314,6 +319,7 @@ TALER_TESTING_cmd_fakebank_transfer (const char *label, fts->debit_account_no = debit_account_no; fts->auth_username = auth_username; fts->auth_password = auth_password; + fts->exchange_url = exchange_url; if (GNUNET_OK != TALER_string_to_amount (amount, &fts->amount)) @@ -346,7 +352,8 @@ TALER_TESTING_cmd_fakebank_transfer_with_subject uint64_t credit_account_no, const char *auth_username, const char *auth_password, - const char *subject) + const char *subject, + const char *exchange_url) { struct TALER_TESTING_Command cmd; struct FakebankTransferState *fts; @@ -358,6 +365,7 @@ TALER_TESTING_cmd_fakebank_transfer_with_subject fts->auth_username = auth_username; fts->auth_password = auth_password; fts->subject = subject; + fts->exchange_url = exchange_url; if (GNUNET_OK != TALER_string_to_amount (amount, &fts->amount)) @@ -390,7 +398,8 @@ TALER_TESTING_cmd_fakebank_transfer_with_ref uint64_t credit_account_no, const char *auth_username, const char *auth_password, - const char *ref) + const char *ref, + const char *exchange_url) { struct TALER_TESTING_Command cmd; struct FakebankTransferState *fts; @@ -402,6 +411,7 @@ TALER_TESTING_cmd_fakebank_transfer_with_ref fts->auth_username = auth_username; fts->auth_password = auth_password; fts->reserve_reference = ref; + fts->exchange_url = exchange_url; if (GNUNET_OK != TALER_string_to_amount (amount, &fts->amount)) diff --git a/src/include/taler_testing_lib.h b/src/include/taler_testing_lib.h index f8063fe3c..2a03b0cad 100644 --- a/src/include/taler_testing_lib.h +++ b/src/include/taler_testing_lib.h @@ -396,7 +396,8 @@ TALER_TESTING_cmd_fakebank_transfer (const char *label, uint64_t debit_account_no, uint64_t credit_account_no, const char *auth_username, - const char *auth_password); + const char *auth_password, + const char *exchange_url); /** @@ -412,7 +413,8 @@ TALER_TESTING_cmd_fakebank_transfer_with_subject uint64_t credit_account_no, const char *auth_username, const char *auth_password, - const char *subject); + const char *subject, + const char *exchange_url); /** @@ -428,7 +430,8 @@ TALER_TESTING_cmd_fakebank_transfer_with_ref uint64_t credit_account_no, const char *auth_username, const char *auth_password, - const char *ref); + const char *ref, + const char *exchange_url); /** |