merchant

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

commit 99662a2dd3cb8de5c99dd628648465d586659a7f
parent 7e7af4255d1e250041bc1e651cce13eff7f2b728
Author: Marcello Stanisci <stanisci.m@gmail.com>
Date:   Thu,  7 Jun 2018 10:15:17 +0200

Fix un-aggregated payment.

Diffstat:
Msrc/merchant-tools/taler-merchant-generate-payments_new.c | 86++++++++++++++++++++++++++++++++++++++++---------------------------------------
1 file 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 @@ -268,47 +268,6 @@ 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"), - /* 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 @@ -332,7 +291,7 @@ run (void *cls, {\"currency\":\"USD\",\ \"value\":10,\ \"fraction\":0},\ - \"summary\": \"2-coins payment\",\ + \"summary\": \"2-coins untracked payment\",\ \"fulfillment_url\": \"https://example.com/\",\ \"products\": [ {\"description\":\"2-coins payment\",\ \"value\":\"{USD:10}\"} ] }", @@ -353,6 +312,49 @@ run (void *cls, ("aggregate-2", cfg_filename), + /* Must be _after_ any aggregation takes place. */ + 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,