merchant

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

commit 759f073fb18a9f6e8f1565dafe42ed74d0ee6ded
parent c3b2fba56aa5a72b9e075d9725c746683109be17
Author: Christian Grothoff <christian@grothoff.org>
Date:   Fri, 21 Jul 2017 22:22:01 +0200

fix merchant_api_track_transfer to actually pass wire method to service

Diffstat:
Msrc/lib/merchant_api_track_transfer.c | 2+-
Msrc/lib/test_merchant_api.c | 13+++++++++----
2 files changed, 10 insertions(+), 5 deletions(-)

diff --git a/src/lib/merchant_api_track_transfer.c b/src/lib/merchant_api_track_transfer.c @@ -248,7 +248,7 @@ TALER_MERCHANT_track_transfer (struct GNUNET_CURL_Context *ctx, base = MAH_path_to_url_ (backend_uri, "/track/transfer"); GNUNET_asprintf (&tdo->url, - "%s?wtid=%s&exchange=%s&instance=%s&wire_method", + "%s?wtid=%s&exchange=%s&instance=%s&wire_method=%s", base, wtid_str, exchange_uri, diff --git a/src/lib/test_merchant_api.c b/src/lib/test_merchant_api.c @@ -2490,6 +2490,7 @@ run (void *cls) .details.reserve_status.reserve_reference = "create-reserve-1", .details.reserve_status.expected_balance = "EUR:0" }, + /* Create proposal */ { .oc = OC_PROPOSAL, .label = "create-proposal-1", @@ -2501,7 +2502,7 @@ run (void *cls) \"fraction\":50000000},\ \"order_id\":\"1\",\ \"refund_deadline\":\"\\/Date(0)\\/\",\ - \"pay_deadline\":\"\\/Date(9999999999)\\/\",\ + \"pay_deadline\":\"\\/Date(99999999999)\\/\",\ \"amount\":\ {\"currency\":\"EUR\",\ \"value\":5,\ @@ -2510,6 +2511,8 @@ run (void *cls) \"products\":\ [ {\"description\":\"ice cream\",\ \"value\":\"{EUR:5}\"} ] }"}, + + /* execute simple payment */ { .oc = OC_PAY, .label = "deposit-simple", .expected_response_code = MHD_HTTP_OK, @@ -2517,6 +2520,7 @@ run (void *cls) .details.pay.coin_ref = "withdraw-coin-1;withdraw-coin-2", .details.pay.amount_with_fee = "EUR:5", .details.pay.amount_without_fee = "EUR:4.99" }, + /* Try to replay payment reusing coin */ { .oc = OC_PAY, .label = "replay-simple", @@ -2525,6 +2529,7 @@ run (void *cls) .details.pay.coin_ref = "withdraw-coin-1", .details.pay.amount_with_fee = "EUR:5", .details.pay.amount_without_fee = "EUR:4.99" }, + /* Create another contract */ { .oc = OC_PROPOSAL, .label = "create-proposal-2", @@ -2556,6 +2561,7 @@ run (void *cls) .details.pay.coin_ref = "withdraw-coin-1", .details.pay.amount_with_fee = "EUR:5", .details.pay.amount_without_fee = "EUR:4.99" }, + /* Fill second reserve with EUR:1 */ { .oc = OC_ADMIN_ADD_INCOMING, .label = "create-reserve-2", @@ -2603,13 +2609,12 @@ run (void *cls) /* Check nothing happened on the bank side so far */ { .oc = OC_CHECK_BANK_TRANSFERS_EMPTY, .label = "check_bank_empty" }, - - + /* Run transfers. */ { .oc = OC_RUN_AGGREGATOR, .label = "run-aggregator" }, - /* Obtain WTID of the transfer */ + /* Obtain WTID of the transfer generated by "deposit-simple" */ { .oc = OC_CHECK_BANK_TRANSFER, .label = "check_bank_transfer-498c", .details.check_bank_transfer.amount = "EUR:4.98",