summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorMarcello Stanisci <stanisci.m@gmail.com>2018-12-18 14:53:14 +0100
committerMarcello Stanisci <stanisci.m@gmail.com>2018-12-18 14:53:14 +0100
commit31ea5ff0dd8a5ea05bd681477bbc1313be1b4be8 (patch)
treea68dfaa9975faa1dc8c34ea51373f06eda8708f8 /src
parenta3a0b36a9eb1053ea665d63375ab5f4830e5e8d9 (diff)
downloadmerchant-31ea5ff0dd8a5ea05bd681477bbc1313be1b4be8.tar.gz
merchant-31ea5ff0dd8a5ea05bd681477bbc1313be1b4be8.tar.bz2
merchant-31ea5ff0dd8a5ea05bd681477bbc1313be1b4be8.zip
/refund: #5284
Diffstat (limited to 'src')
-rw-r--r--src/include/taler_merchant_testing_lib.h6
-rw-r--r--src/lib/test_merchant_api_new.c6
-rw-r--r--src/lib/testing_api_cmd_refund.c23
3 files changed, 2 insertions, 33 deletions
diff --git a/src/include/taler_merchant_testing_lib.h b/src/include/taler_merchant_testing_lib.h
index 2664cfc7..adb164b6 100644
--- a/src/include/taler_merchant_testing_lib.h
+++ b/src/include/taler_merchant_testing_lib.h
@@ -217,7 +217,6 @@ TALER_TESTING_cmd_pay_abort_refund
* @param label command label.
* @param merchant_url base URL of the merchant serving the
* "refund lookup" request.
- * @param ctx CURL context.
* @param increase_reference reference to a "refund increase" CMD
* that will offer the amount to check the looked up refund
* against. Must NOT be NULL.
@@ -233,7 +232,6 @@ struct TALER_TESTING_Command
TALER_TESTING_cmd_refund_lookup
(const char *label,
const char *merchant_url,
- struct GNUNET_CURL_Context *ctx,
const char *increase_reference,
const char *pay_reference,
const char *order_id,
@@ -246,7 +244,6 @@ TALER_TESTING_cmd_refund_lookup
* @param label command label.
* @param merchant_url base URL of the merchant serving the
* "refund lookup" request.
- * @param ctx CURL context.
* @param increase_reference reference to a "refund increase" CMD
* that will offer the amount to check the looked up refund
* against. Can be NULL, takes precedence over @a
@@ -265,7 +262,6 @@ struct TALER_TESTING_Command
TALER_TESTING_cmd_refund_lookup_with_amount
(const char *label,
const char *merchant_url,
- struct GNUNET_CURL_Context *ctx,
const char *increase_reference,
const char *pay_reference,
const char *order_id,
@@ -279,7 +275,6 @@ TALER_TESTING_cmd_refund_lookup_with_amount
* @param label command label.
* @param merchant_url base URL of the backend serving the
* "refund increase" request.
- * @param ctx CURL context.
* @param reason refund justification, human-readable.
* @param order_id order id of the contract to refund.
* @param refund_amount amount to be refund-increased.
@@ -292,7 +287,6 @@ struct TALER_TESTING_Command
TALER_TESTING_cmd_refund_increase
(const char *label,
const char *merchant_url,
- struct GNUNET_CURL_Context *ctx,
const char *reason,
const char *order_id,
const char *refund_amount,
diff --git a/src/lib/test_merchant_api_new.c b/src/lib/test_merchant_api_new.c
index 5ebceb85..c6a5f85c 100644
--- a/src/lib/test_merchant_api_new.c
+++ b/src/lib/test_merchant_api_new.c
@@ -455,7 +455,6 @@ run (void *cls,
TALER_TESTING_cmd_refund_increase
("refund-increase-1",
merchant_url,
- is->ctx,
"refund test",
"1",
"EUR:0.1",
@@ -465,7 +464,6 @@ run (void *cls,
/* Ordinary refund. */
TALER_TESTING_cmd_refund_lookup ("refund-lookup-1",
merchant_url,
- is->ctx,
"refund-increase-1",
"deposit-simple",
"1",
@@ -474,7 +472,6 @@ run (void *cls,
/* Trying to pick up refund from non existent proposal. */
TALER_TESTING_cmd_refund_lookup ("refund-lookup-non-existent",
merchant_url,
- is->ctx,
"refund-increase-1",
"deposit-simple",
"non-existend-id",
@@ -507,7 +504,6 @@ run (void *cls,
TALER_TESTING_cmd_refund_increase
("refund-increase-unpaid-proposal",
merchant_url,
- is->ctx,
"refund test",
"1-unpaid",
"EUR:0.1",
@@ -518,7 +514,6 @@ run (void *cls,
TALER_TESTING_cmd_refund_increase
("refund-increase-unpaid-proposal",
merchant_url,
- is->ctx,
"refund test",
"non-existent-id",
"EUR:0.1",
@@ -595,7 +590,6 @@ run (void *cls,
TALER_TESTING_cmd_refund_lookup_with_amount
("refund-lookup-unincreased",
merchant_url,
- is->ctx,
NULL,
"pay-unincreased-proposal",
"unincreased-proposal",
diff --git a/src/lib/testing_api_cmd_refund.c b/src/lib/testing_api_cmd_refund.c
index 8adb77d7..d0efaf16 100644
--- a/src/lib/testing_api_cmd_refund.c
+++ b/src/lib/testing_api_cmd_refund.c
@@ -46,11 +46,6 @@ struct RefundIncreaseState
const char *merchant_url;
/**
- * CURL context.
- */
- struct GNUNET_CURL_Context *ctx;
-
- /**
* Order id of the contract to refund.
*/
const char *order_id;
@@ -98,11 +93,6 @@ struct RefundLookupState
const char *merchant_url;
/**
- * CURL context.
- */
- struct GNUNET_CURL_Context *ctx;
-
- /**
* Order id to look up.
*/
const char *order_id;
@@ -226,7 +216,7 @@ refund_increase_run (void *cls,
if (GNUNET_OK != TALER_string_to_amount (ris->refund_amount,
&refund_amount))
TALER_TESTING_FAIL (is);
- ris->rio = TALER_MERCHANT_refund_increase (ris->ctx,
+ ris->rio = TALER_MERCHANT_refund_increase (is->ctx,
ris->merchant_url,
ris->order_id,
&refund_amount,
@@ -455,7 +445,7 @@ refund_lookup_run (void *cls,
struct RefundLookupState *rls = cls;
rls->is = is;
- rls->rlo = TALER_MERCHANT_refund_lookup (rls->ctx,
+ rls->rlo = TALER_MERCHANT_refund_lookup (is->ctx,
rls->merchant_url,
rls->order_id,
"default",
@@ -502,7 +492,6 @@ refund_increase_traits (void *cls,
* @param label command label.
* @param merchant_url base URL of the backend serving the
* "refund increase" request.
- * @param ctx CURL context.
* @param reason refund justification, human-readable.
* @param order_id order id of the contract to refund.
* @param refund_amount amount to be refund-increased.
@@ -515,7 +504,6 @@ struct TALER_TESTING_Command
TALER_TESTING_cmd_refund_increase
(const char *label,
const char *merchant_url,
- struct GNUNET_CURL_Context *ctx,
const char *reason,
const char *order_id,
const char *refund_amount,
@@ -527,7 +515,6 @@ TALER_TESTING_cmd_refund_increase
ris = GNUNET_new (struct RefundIncreaseState);
ris->merchant_url = merchant_url;
- ris->ctx = ctx;
ris->order_id = order_id;
ris->refund_amount = refund_amount;
ris->refund_fee = refund_fee;
@@ -549,7 +536,6 @@ TALER_TESTING_cmd_refund_increase
* @param label command label.
* @param merchant_url base URL of the merchant serving the
* "refund lookup" request.
- * @param ctx CURL context.
* @param increase_reference reference to a "refund increase" CMD
* that will offer the amount to check the looked up refund
* against. Must NOT be NULL.
@@ -565,7 +551,6 @@ struct TALER_TESTING_Command
TALER_TESTING_cmd_refund_lookup
(const char *label,
const char *merchant_url,
- struct GNUNET_CURL_Context *ctx,
const char *increase_reference,
const char *pay_reference,
const char *order_id,
@@ -576,7 +561,6 @@ TALER_TESTING_cmd_refund_lookup
rls = GNUNET_new (struct RefundLookupState);
rls->merchant_url = merchant_url;
- rls->ctx = ctx;
rls->order_id = order_id;
rls->pay_reference = pay_reference;
rls->increase_reference = increase_reference;
@@ -598,7 +582,6 @@ TALER_TESTING_cmd_refund_lookup
* @param label command label.
* @param merchant_url base URL of the merchant serving the
* "refund lookup" request.
- * @param ctx CURL context.
* @param increase_reference reference to a "refund increase" CMD
* that will offer the amount to check the looked up refund
* against. Can be NULL, takes precedence over @a
@@ -617,7 +600,6 @@ struct TALER_TESTING_Command
TALER_TESTING_cmd_refund_lookup_with_amount
(const char *label,
const char *merchant_url,
- struct GNUNET_CURL_Context *ctx,
const char *increase_reference,
const char *pay_reference,
const char *order_id,
@@ -629,7 +611,6 @@ TALER_TESTING_cmd_refund_lookup_with_amount
rls = GNUNET_new (struct RefundLookupState);
rls->merchant_url = merchant_url;
- rls->ctx = ctx;
rls->order_id = order_id;
rls->pay_reference = pay_reference;
rls->increase_reference = increase_reference;