diff options
Diffstat (limited to 'src/merchant-tools/taler-merchant-generate-payments_new.c')
-rw-r--r-- | src/merchant-tools/taler-merchant-generate-payments_new.c | 86 |
1 files changed, 44 insertions, 42 deletions
diff --git a/src/merchant-tools/taler-merchant-generate-payments_new.c b/src/merchant-tools/taler-merchant-generate-payments_new.c index ca42d52d..3bc7e5a0 100644 --- a/src/merchant-tools/taler-merchant-generate-payments_new.c +++ b/src/merchant-tools/taler-merchant-generate-payments_new.c | |||
@@ -268,47 +268,6 @@ run (void *cls, | |||
268 | "track-transaction-1", | 268 | "track-transaction-1", |
269 | "deposit-simple-2"), | 269 | "deposit-simple-2"), |
270 | 270 | ||
271 | TALER_TESTING_cmd_proposal | ||
272 | ("create-proposal-3", | ||
273 | merchant_url, | ||
274 | is->ctx, | ||
275 | MHD_HTTP_OK, | ||
276 | "{\"max_fee\":\ | ||
277 | {\"currency\":\"USD\",\ | ||
278 | \"value\":0,\ | ||
279 | \"fraction\":50000000},\ | ||
280 | \"refund_deadline\":\"\\/Date(0)\\/\",\ | ||
281 | \"pay_deadline\":\"\\/Date(99999999999)\\/\",\ | ||
282 | \"amount\":\ | ||
283 | {\"currency\":\"USD\",\ | ||
284 | \"value\":5,\ | ||
285 | \"fraction\":0},\ | ||
286 | \"summary\": \"unaggregated deposit!\",\ | ||
287 | \"fulfillment_url\": \"https://example.com/\",\ | ||
288 | \"products\": [ {\"description\":\"unaggregated cream\",\ | ||
289 | \"value\":\"{USD:5}\"} ] }", | ||
290 | NULL), | ||
291 | |||
292 | TALER_TESTING_cmd_pay | ||
293 | ("deposit-simple-3", | ||
294 | merchant_url, | ||
295 | is->ctx, | ||
296 | MHD_HTTP_OK, | ||
297 | "create-proposal-3", | ||
298 | "withdraw-coin-3", | ||
299 | "USD:5", | ||
300 | "USD:4.99", | ||
301 | "USD:0.01"), | ||
302 | |||
303 | TALER_TESTING_cmd_merchant_track_transaction | ||
304 | ("track-transaction-2", | ||
305 | merchant_url, | ||
306 | is->ctx, | ||
307 | MHD_HTTP_ACCEPTED, | ||
308 | "dummy", // "check bank" CMD, never used, to be deleted. | ||
309 | "deposit-simple-3", | ||
310 | "USD:0.01"), | ||
311 | |||
312 | /* Doing the 2-coins payment; needed to generate the | 271 | /* Doing the 2-coins payment; needed to generate the |
313 | * "failed dependency" response error, at /track/transaction. | 272 | * "failed dependency" response error, at /track/transaction. |
314 | * NOTE: not used here, but done just in case a testing | 273 | * NOTE: not used here, but done just in case a testing |
@@ -332,7 +291,7 @@ run (void *cls, | |||
332 | {\"currency\":\"USD\",\ | 291 | {\"currency\":\"USD\",\ |
333 | \"value\":10,\ | 292 | \"value\":10,\ |
334 | \"fraction\":0},\ | 293 | \"fraction\":0},\ |
335 | \"summary\": \"2-coins payment\",\ | 294 | \"summary\": \"2-coins untracked payment\",\ |
336 | \"fulfillment_url\": \"https://example.com/\",\ | 295 | \"fulfillment_url\": \"https://example.com/\",\ |
337 | \"products\": [ {\"description\":\"2-coins payment\",\ | 296 | \"products\": [ {\"description\":\"2-coins payment\",\ |
338 | \"value\":\"{USD:10}\"} ] }", | 297 | \"value\":\"{USD:10}\"} ] }", |
@@ -353,6 +312,49 @@ run (void *cls, | |||
353 | ("aggregate-2", | 312 | ("aggregate-2", |
354 | cfg_filename), | 313 | cfg_filename), |
355 | 314 | ||
315 | /* Must be _after_ any aggregation takes place. */ | ||
316 | TALER_TESTING_cmd_proposal | ||
317 | ("create-proposal-3", | ||
318 | merchant_url, | ||
319 | is->ctx, | ||
320 | MHD_HTTP_OK, | ||
321 | "{\"max_fee\":\ | ||
322 | {\"currency\":\"USD\",\ | ||
323 | \"value\":0,\ | ||
324 | \"fraction\":50000000},\ | ||
325 | \"refund_deadline\":\"\\/Date(0)\\/\",\ | ||
326 | \"pay_deadline\":\"\\/Date(99999999999)\\/\",\ | ||
327 | \"amount\":\ | ||
328 | {\"currency\":\"USD\",\ | ||
329 | \"value\":5,\ | ||
330 | \"fraction\":0},\ | ||
331 | \"summary\": \"unaggregated deposit!\",\ | ||
332 | \"fulfillment_url\": \"https://example.com/\",\ | ||
333 | \"products\": [ {\"description\":\"unaggregated cream\",\ | ||
334 | \"value\":\"{USD:5}\"} ] }", | ||
335 | NULL), | ||
336 | |||
337 | TALER_TESTING_cmd_pay | ||
338 | ("deposit-simple-3", | ||
339 | merchant_url, | ||
340 | is->ctx, | ||
341 | MHD_HTTP_OK, | ||
342 | "create-proposal-3", | ||
343 | "withdraw-coin-3", | ||
344 | "USD:5", | ||
345 | "USD:4.99", | ||
346 | "USD:0.01"), | ||
347 | |||
348 | TALER_TESTING_cmd_merchant_track_transaction | ||
349 | ("track-transaction-2", | ||
350 | merchant_url, | ||
351 | is->ctx, | ||
352 | MHD_HTTP_ACCEPTED, | ||
353 | "dummy", // "check bank" CMD, never used, to be deleted. | ||
354 | "deposit-simple-3", | ||
355 | "USD:0.01"), | ||
356 | |||
357 | |||
356 | TALER_TESTING_cmd_rewind_ip | 358 | TALER_TESTING_cmd_rewind_ip |
357 | ("rewind-tracks", | 359 | ("rewind-tracks", |
358 | TRACKS_INSTRUCTION, | 360 | TRACKS_INSTRUCTION, |