diff options
author | Christian Grothoff <christian@grothoff.org> | 2020-05-13 19:15:14 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2020-05-13 19:15:14 +0200 |
commit | 9bac37cbe6a2774782a515458098883bbf98b4b6 (patch) | |
tree | c1be0b61cea40afdee565527fa76fb72cb560c8f /src/include | |
parent | a48af85c36a3340ee9303b57428f2929b08995e4 (diff) | |
download | merchant-9bac37cbe6a2774782a515458098883bbf98b4b6.tar.gz merchant-9bac37cbe6a2774782a515458098883bbf98b4b6.tar.bz2 merchant-9bac37cbe6a2774782a515458098883bbf98b4b6.zip |
sketch for GET /transfers cmd
Diffstat (limited to 'src/include')
-rw-r--r-- | src/include/taler_merchant_service.h | 3 | ||||
-rw-r--r-- | src/include/taler_merchant_testing_lib.h | 58 |
2 files changed, 61 insertions, 0 deletions
diff --git a/src/include/taler_merchant_service.h b/src/include/taler_merchant_service.h index 850bf150..ce0d22c2 100644 --- a/src/include/taler_merchant_service.h +++ b/src/include/taler_merchant_service.h @@ -2369,6 +2369,9 @@ TALER_MERCHANT_transfers_get_cancel ( struct TALER_MERCHANT_GetTransfersHandle *gth); +/* ******************* /reserves *************** */ + + /* ********************* OLD ************************** */ diff --git a/src/include/taler_merchant_testing_lib.h b/src/include/taler_merchant_testing_lib.h index 77c6b57d..87c10a5d 100644 --- a/src/include/taler_merchant_testing_lib.h +++ b/src/include/taler_merchant_testing_lib.h @@ -407,6 +407,8 @@ TALER_TESTING_cmd_merchant_delete_product (const char *label, unsigned int http_status); +/* ******************* /orders **************** */ + /** * Make the "proposal" command. * @@ -505,6 +507,62 @@ TALER_TESTING_cmd_merchant_order_refund (const char *label, unsigned int http_code); +/* ******************* /transfers *************** */ + + +/** + * Define a POST /transfers CMD. Details like the WTID and + * other required parameters will be extracted from the bank + * history, using the latest transfer of the specified + * @a credit_amount to the @a merchant_url. + * + * @param label command label. + * @param merchant_url base URL of the backend serving the + * "refund increase" request. + * @param auth credentials to access the exchange's bank account + * @param bank_url URL of the exchange's bank account + * @param credit_amount amount credited + * @param http_code expected HTTP response code + * @param ... NULL-terminated list of labels (const char *) of + * deposit (commands) we expect to be aggregated in the transfer + * (assuming @a http_code is #MHD_HTTP_OK) + * @return the command. + */ +struct TALER_TESTING_Command +TALER_TESTING_cmd_merchant_post_transfer ( + const char *label, + const struct TALER_BANK_AuthenticationData *auth, + const char *bank_url, + const char *merchant_url, + const char *credit_amount, + unsigned int http_code, + ...); + + +/** + * Define a GET /transfers CMD. + * + * @param label command label. + * @param merchant_url base URL of the backend serving the + * "refund increase" request. + * @param payto_uri payto URI to filter by, NULL for no filter + * @param http_code expected HTTP response code + * @param ... NULL-terminated list of labels (const char *) of + * transfer (commands) we expect to be returned in the list + * (assuming @a http_code is #MHD_HTTP_OK) + * @return the command. + */ +struct TALER_TESTING_Command +TALER_TESTING_cmd_merchant_get_transfers (const char *label, + const char *merchant_url, + const char *payto_uri, + unsigned int http_code, + ...); + + +/* ******************* /reserves *************** */ + + /* ******************** OLD ******************* */ |