merchant

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

commit b2192b1f0a07cba87e0e79b9ad889d98bb573906
parent 469c9784e6b716ebba407950b3e191d4d3ed9f1f
Author: Christian Grothoff <christian@grothoff.org>
Date:   Sun, 27 Dec 2015 09:26:14 +0100

initialize refund_deadline

Diffstat:
Msrc/lib/test_merchant_api.c | 14+++++++++-----
1 file changed, 9 insertions(+), 5 deletions(-)

diff --git a/src/lib/test_merchant_api.c b/src/lib/test_merchant_api.c @@ -290,7 +290,8 @@ struct Command } reserve_withdraw; /** - * Information for a #OC_DEPOSIT command. + * Information for a #OC_PAY command. + * FIXME: support tests where we pay with multiple coins at once. */ struct { @@ -997,6 +998,7 @@ interpreter_run (void *cls, json_t *contract; struct GNUNET_HashCode h_wire; struct GNUNET_HashCode h_contract; + struct GNUNET_TIME_Absolute refund_deadline; /* get amount */ if (GNUNET_OK != @@ -1057,9 +1059,11 @@ interpreter_run (void *cls, TALER_hash_json (contract, &h_contract); json_decref (contract); - - /* FIXME: fill in rest of arguments properly, in particular - refund_deadline is not correct right now... */ + + if (0 == cmd->details.pay.refund_deadline.rel_value_us) + refund_deadline = GNUNET_TIME_UNIT_ZERO_ABS; /* no refunds */ + else + refund_deadline = GNUNET_TIME_relative_to_absolute (cmd->details.pay.refund_deadline); cmd->details.pay.ph = TALER_MERCHANT_pay_wallet (merchant, MERCHANT_URI, @@ -1069,7 +1073,7 @@ interpreter_run (void *cls, GNUNET_TIME_absolute_get (), cmd->details.pay.transaction_id, &merchant_pub, - GNUNET_TIME_UNIT_ZERO_ABS /* refund dead */, + refund_deadline, 1 /* num_coins */, &pc /* coins */, &max_fee,