From 5ac448738dfe213bf27d89abe253455ce0a38acf Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Fri, 1 May 2020 19:22:32 +0200 Subject: fix status code --- src/exchange/taler-exchange-httpd_deposit.c | 30 ++++++++++++++++++----------- 1 file changed, 19 insertions(+), 11 deletions(-) (limited to 'src/exchange/taler-exchange-httpd_deposit.c') diff --git a/src/exchange/taler-exchange-httpd_deposit.c b/src/exchange/taler-exchange-httpd_deposit.c index 3f895857b..65251863a 100644 --- a/src/exchange/taler-exchange-httpd_deposit.c +++ b/src/exchange/taler-exchange-httpd_deposit.c @@ -90,10 +90,11 @@ reply_deposit_success (struct MHD_Connection *connection, } return TALER_MHD_reply_json_pack (connection, MHD_HTTP_OK, - "{s:s, s:o, s:o}", - "status", "DEPOSIT_OK", - "sig", GNUNET_JSON_from_data_auto (&sig), - "pub", GNUNET_JSON_from_data_auto (&pub)); + "{s:o, s:o}", + "exchange_sig", + GNUNET_JSON_from_data_auto (&sig), + "exchange_pub", + GNUNET_JSON_from_data_auto (&pub)); } @@ -312,15 +313,22 @@ TEH_handler_deposit (struct MHD_Connection *connection, struct GNUNET_HashCode my_h_wire; struct GNUNET_JSON_Specification spec[] = { GNUNET_JSON_spec_json ("wire", &wire), - TALER_JSON_spec_amount ("contribution", &deposit.amount_with_fee), + TALER_JSON_spec_amount ("contribution", + &deposit.amount_with_fee), GNUNET_JSON_spec_fixed_auto ("denom_pub_hash", &deposit.coin.denom_pub_hash), - TALER_JSON_spec_denomination_signature ("ub_sig", &deposit.coin.denom_sig), - GNUNET_JSON_spec_fixed_auto ("merchant_pub", &deposit.merchant_pub), - GNUNET_JSON_spec_fixed_auto ("h_contract_terms", &deposit.h_contract_terms), - GNUNET_JSON_spec_fixed_auto ("h_wire", &deposit.h_wire), - GNUNET_JSON_spec_fixed_auto ("coin_sig", &deposit.csig), - GNUNET_JSON_spec_absolute_time ("timestamp", &deposit.timestamp), + TALER_JSON_spec_denomination_signature ("ub_sig", + &deposit.coin.denom_sig), + GNUNET_JSON_spec_fixed_auto ("merchant_pub", + &deposit.merchant_pub), + GNUNET_JSON_spec_fixed_auto ("h_contract_terms", + &deposit.h_contract_terms), + GNUNET_JSON_spec_fixed_auto ("h_wire", + &deposit.h_wire), + GNUNET_JSON_spec_fixed_auto ("coin_sig", + &deposit.csig), + GNUNET_JSON_spec_absolute_time ("timestamp", + &deposit.timestamp), GNUNET_JSON_spec_absolute_time ("refund_deadline", &deposit.refund_deadline), GNUNET_JSON_spec_absolute_time ("wire_transfer_deadline", -- cgit v1.2.3