From 8dfb3b87b47ca2d25f6bdcbdfa2acc517fbe6ae2 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sat, 21 May 2016 19:22:03 +0200 Subject: testing refund, fixing bugs, refund test passes --- src/exchange-lib/exchange_api_refund.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/exchange-lib/exchange_api_refund.c') diff --git a/src/exchange-lib/exchange_api_refund.c b/src/exchange-lib/exchange_api_refund.c index 82ae5e8ab..3a840c7c4 100644 --- a/src/exchange-lib/exchange_api_refund.c +++ b/src/exchange-lib/exchange_api_refund.c @@ -169,6 +169,10 @@ handle_refund_finished (void *cls, /* Nothing really to verify, this should never happen, we should pass the JSON reply to the application */ break; + case MHD_HTTP_GONE: + /* Kind of normal: the money was already sent to the merchant + (it was too late for the refund). */ + break; case MHD_HTTP_INTERNAL_SERVER_ERROR: /* Server had an internal issue; we should retry, but this API leaves this to the application */ @@ -266,7 +270,7 @@ TALER_EXCHANGE_refund (struct TALER_EXCHANGE_Handle *exchange, " s:I, s:I," /* transaction id, rtransaction id */ " s:o, s:o}", /* merchant_pub, merchant_sig */ "refund_amount", TALER_JSON_from_amount (amount), - "refund_fee", TALER_JSON_from_amount (amount), + "refund_fee", TALER_JSON_from_amount (refund_fee), "H_contract", GNUNET_JSON_from_data_auto (h_contract), "coin_pub", GNUNET_JSON_from_data_auto (coin_pub), "transaction_id", (json_int_t) transaction_id, -- cgit v1.2.3