merchant

Merchant backend to process payments, run by merchants
Log | Files | Refs | Submodules | README | LICENSE

commit e76fe059808293206f43b293bf2dc2cdde1a6df2
parent 3304bdbe0cdd6e0d19cc88c07b22df29541f5b1c
Author: Marcello Stanisci <stanisci.m@gmail.com>
Date:   Wed,  6 Jun 2018 12:09:29 +0200

Payment generator got 202 tracks.

We deliberately leave one deposit unaggregated
at the payment generator, in order to be able to
test a 202 Accepted response from /track/transaction.

Diffstat:
Msrc/merchant-tools/taler-merchant-generate-payments_new.c | 52+++++++++++++++++++++++++++++++++++++++++++++++++++-
1 file changed, 51 insertions(+), 1 deletion(-)

diff --git a/src/merchant-tools/taler-merchant-generate-payments_new.c b/src/merchant-tools/taler-merchant-generate-payments_new.c @@ -126,7 +126,7 @@ run (void *cls, CMD_TRANSFER_TO_EXCHANGE ("create-reserve-1", - "USD:10.02"), + "USD:15.03"), TALER_TESTING_cmd_exec_wirewatch ("wirewatch-1", @@ -146,6 +146,15 @@ run (void *cls, "USD:5", MHD_HTTP_OK), + /* This coin will be spent but never aggregated, + * in order to get 202 responses from tracks. */ + TALER_TESTING_cmd_withdraw_amount + ("withdraw-coin-3", + is->exchange, + "create-reserve-1", + "USD:5", + MHD_HTTP_OK), + TALER_TESTING_cmd_proposal ("create-proposal-1", merchant_url, @@ -242,6 +251,47 @@ run (void *cls, "track-transaction-1", "deposit-simple-2"), + TALER_TESTING_cmd_proposal + ("create-proposal-3", + 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\":5,\ + \"fraction\":0},\ + \"summary\": \"unaggregated deposit!\",\ + \"fulfillment_url\": \"https://example.com/\",\ + \"products\": [ {\"description\":\"unaggregated cream\",\ + \"value\":\"{USD:5}\"} ] }", + NULL), + + TALER_TESTING_cmd_pay + ("deposit-simple-3", + merchant_url, + is->ctx, + MHD_HTTP_OK, + "create-proposal-3", + "withdraw-coin-3", + "USD:5", + "USD:4.99", + "USD:0.01"), + + TALER_TESTING_cmd_merchant_track_transaction + ("track-transaction-2", + merchant_url, + is->ctx, + MHD_HTTP_ACCEPTED, + "dummy", // "check bank" CMD, never used, to be deleted. + "deposit-simple-3", + "USD:0.01"), + TALER_TESTING_cmd_rewind_ip ("rewind-tracks", TRACKS_INSTRUCTION,