summaryrefslogtreecommitdiff
path: root/src/authorization/anastasis_authorization_plugin_iban.c
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2022-04-13 10:53:36 +0200
committerChristian Grothoff <christian@grothoff.org>2022-04-13 10:53:36 +0200
commit49aebaedc3d200c8c9ce306f8e3ea5bdc4449a50 (patch)
tree4dd590ad96656752308af959a02c3de5843fa678 /src/authorization/anastasis_authorization_plugin_iban.c
parent3d27addfb97a6d4f10eedecce8d707c5d18774b7 (diff)
downloadanastasis-49aebaedc3d200c8c9ce306f8e3ea5bdc4449a50.tar.gz
anastasis-49aebaedc3d200c8c9ce306f8e3ea5bdc4449a50.tar.bz2
anastasis-49aebaedc3d200c8c9ce306f8e3ea5bdc4449a50.zip
major work on test_iban
Diffstat (limited to 'src/authorization/anastasis_authorization_plugin_iban.c')
-rw-r--r--src/authorization/anastasis_authorization_plugin_iban.c30
1 files changed, 19 insertions, 11 deletions
diff --git a/src/authorization/anastasis_authorization_plugin_iban.c b/src/authorization/anastasis_authorization_plugin_iban.c
index 3887ecd..b48aa56 100644
--- a/src/authorization/anastasis_authorization_plugin_iban.c
+++ b/src/authorization/anastasis_authorization_plugin_iban.c
@@ -450,16 +450,24 @@ iban_challenge (struct ANASTASIS_AUTHORIZATION_State *as,
resp = TALER_MHD_MAKE_JSON_PACK (
GNUNET_JSON_pack_string ("challenge_type",
"IBAN_WIRE"),
- GNUNET_JSON_pack_uint64 ("answer_code",
- as->code),
- TALER_JSON_pack_amount ("challenge_amount",
- &ctx->expected_amount),
- GNUNET_JSON_pack_string ("credit_iban",
- ctx->business_iban),
- GNUNET_JSON_pack_string ("business_name",
- ctx->business_name),
- GNUNET_JSON_pack_string ("wire_transfer_subject",
- subject));
+ GNUNET_JSON_pack_object_steal (
+ "wire_details",
+ GNUNET_JSON_PACK (
+ GNUNET_JSON_pack_uint64 (
+ "answer_code",
+ as->code),
+ TALER_JSON_pack_amount (
+ "challenge_amount",
+ &ctx->expected_amount),
+ GNUNET_JSON_pack_string (
+ "credit_iban",
+ ctx->business_iban),
+ GNUNET_JSON_pack_string (
+ "business_name",
+ ctx->business_name),
+ GNUNET_JSON_pack_string (
+ "wire_transfer_subject",
+ subject))));
}
else
{
@@ -485,7 +493,7 @@ iban_challenge (struct ANASTASIS_AUTHORIZATION_State *as,
"text/plain"));
}
mres = MHD_queue_response (connection,
- MHD_HTTP_ACCEPTED,
+ MHD_HTTP_OK,
resp);
MHD_destroy_response (resp);
if (MHD_YES != mres)