aboutsummaryrefslogtreecommitdiff
path: root/src/lib/exchange_api_withdraw.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2021-10-16 18:42:39 +0200
committerChristian Grothoff <christian@grothoff.org>2021-10-16 18:42:39 +0200
commit95c71daf5ee1954342490feabb6ec6220fa3f3e8 (patch)
treec029572e352913796e4b0a3af5b3e5912484614d /src/lib/exchange_api_withdraw.c
parent681449a6e04e6b20bffdbd503db21145c2255ed2 (diff)
downloadexchange-95c71daf5ee1954342490feabb6ec6220fa3f3e8.tar.xz
handle new 202 accepted status code on withdraw in client logic
Diffstat (limited to 'src/lib/exchange_api_withdraw.c')
-rw-r--r--src/lib/exchange_api_withdraw.c21
1 files changed, 19 insertions, 2 deletions
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;