aboutsummaryrefslogtreecommitdiff
path: root/src/merchant-tools/taler-merchant-generate-payments_new.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/merchant-tools/taler-merchant-generate-payments_new.c')
-rw-r--r--src/merchant-tools/taler-merchant-generate-payments_new.c80
1 files changed, 44 insertions, 36 deletions
diff --git a/src/merchant-tools/taler-merchant-generate-payments_new.c b/src/merchant-tools/taler-merchant-generate-payments_new.c
index 202f3c81..ca42d52d 100644
--- a/src/merchant-tools/taler-merchant-generate-payments_new.c
+++ b/src/merchant-tools/taler-merchant-generate-payments_new.c
@@ -204,42 +204,6 @@ run (void *cls,
"USD:4.99",
"USD:0.01"),
- /* Doing the 2-coins payment; needed to generate the
- * "failed dependency" response error, at /track/transaction.
- * NOTE: not used here, but done just in case a testing
- * program would need it. */
- TALER_TESTING_cmd_proposal
- ("create-proposal-4&5",
- merchant_url,
- is->ctx,
- MHD_HTTP_OK,
- "{\"max_fee\":\
- {\"currency\":\"USD\",\
- \"value\":0,\
- \"fraction\":50000000},\
- \"refund_deadline\":\"\\/Date(0)\\/\",\
- \"pay_deadline\":\"\\/Date(99999999999)\\/\",\
- \"amount\":\
- {\"currency\":\"USD\",\
- \"value\":10,\
- \"fraction\":0},\
- \"summary\": \"2-coins payment\",\
- \"fulfillment_url\": \"https://example.com/\",\
- \"products\": [ {\"description\":\"2-coins payment\",\
- \"value\":\"{USD:10}\"} ] }",
- NULL),
-
- TALER_TESTING_cmd_pay ("deposit-4&5",
- merchant_url,
- is->ctx,
- MHD_HTTP_OK,
- "create-proposal-4&5",
- "withdraw-coin-4;" \
- "withdraw-coin-5",
- "EUR:10",
- "EUR:9.98", // no sense now
- "EUR:0.02"), // no sense now
-
TALER_TESTING_cmd_rewind_ip
("rewind-payments",
FIRST_INSTRUCTION,
@@ -345,6 +309,50 @@ run (void *cls,
"deposit-simple-3",
"USD:0.01"),
+ /* Doing the 2-coins payment; needed to generate the
+ * "failed dependency" response error, at /track/transaction.
+ * NOTE: not used here, but done just in case a testing
+ * program would need it. And this MUST happen here, as
+ * no tracking operation happens next and so the merchant
+ * won't be able to use a cached version in its database
+ * when serving /track/..; therefore it will relate to the
+ * exchange that can be twisted by the testing logic. */
+ TALER_TESTING_cmd_proposal
+ ("create-proposal-4&5",
+ merchant_url,
+ is->ctx,
+ MHD_HTTP_OK,
+ "{\"max_fee\":\
+ {\"currency\":\"USD\",\
+ \"value\":0,\
+ \"fraction\":50000000},\
+ \"refund_deadline\":\"\\/Date(0)\\/\",\
+ \"pay_deadline\":\"\\/Date(99999999999)\\/\",\
+ \"amount\":\
+ {\"currency\":\"USD\",\
+ \"value\":10,\
+ \"fraction\":0},\
+ \"summary\": \"2-coins payment\",\
+ \"fulfillment_url\": \"https://example.com/\",\
+ \"products\": [ {\"description\":\"2-coins payment\",\
+ \"value\":\"{USD:10}\"} ] }",
+ NULL),
+
+ TALER_TESTING_cmd_pay ("deposit-4&5",
+ merchant_url,
+ is->ctx,
+ MHD_HTTP_OK,
+ "create-proposal-4&5",
+ "withdraw-coin-4;" \
+ "withdraw-coin-5",
+ "EUR:10",
+ "EUR:9.98", // no sense now
+ "EUR:0.02"), // no sense now
+
+ TALER_TESTING_cmd_exec_aggregator
+ ("aggregate-2",
+ cfg_filename),
+
TALER_TESTING_cmd_rewind_ip
("rewind-tracks",
TRACKS_INSTRUCTION,