From 95c71daf5ee1954342490feabb6ec6220fa3f3e8 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Sat, 16 Oct 2021 18:42:39 +0200 Subject: handle new 202 accepted status code on withdraw in client logic --- src/lib/exchange_api_withdraw.c | 21 +++++++++++++++++++-- 1 file changed, 19 insertions(+), 2 deletions(-) (limited to 'src/lib/exchange_api_withdraw.c') diff --git a/src/lib/exchange_api_withdraw.c b/src/lib/exchange_api_withdraw.c index aa1468247..85b7e7dbf 100644 --- a/src/lib/exchange_api_withdraw.c +++ b/src/lib/exchange_api_withdraw.c @@ -1,6 +1,6 @@ /* This file is part of TALER - Copyright (C) 2014-2020 Taler Systems SA + Copyright (C) 2014-2021 Taler Systems SA TALER is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -117,7 +117,24 @@ handle_reserve_withdraw_finished ( break; } case MHD_HTTP_ACCEPTED: - wr.details.accepted.payment_target_uuid; // FIXME + { + struct GNUNET_JSON_Specification spec[] = { + GNUNET_JSON_spec_uint64 ("payment_target_uuid", + &wr.details.accepted.payment_target_uuid), + GNUNET_JSON_spec_end () + }; + + if (GNUNET_OK != + GNUNET_JSON_parse (hr->reply, + spec, + NULL, NULL)) + { + GNUNET_break_op (0); + wr.hr.http_status = 0; + wr.hr.ec = TALER_EC_GENERIC_REPLY_MALFORMED; + break; + } + } break; default: break; -- cgit v1.2.3