merchant

Merchant backend to process payments, run by merchants
Log | Files | Refs | Submodules | README | LICENSE

commit 5d4bc8b44194fc9ce624ca3016e646e555e0aa2a
parent 3e8a86defc90fbde42c9505c90341fe981160d1e
Author: Florian Dold <florian.dold@gmail.com>
Date:   Tue, 24 May 2016 02:32:25 +0200

include last /keys response when denomination not found

Diffstat:
Msrc/backend/taler-merchant-httpd_pay.c | 11+++++------
1 file changed, 5 insertions(+), 6 deletions(-)

diff --git a/src/backend/taler-merchant-httpd_pay.c b/src/backend/taler-merchant-httpd_pay.c @@ -223,9 +223,6 @@ struct PayContext }; - - - /** * Resume the given pay context and send the given response. * Stores the response in the @a pc and signals MHD to resume @@ -254,6 +251,7 @@ resume_pay_with_response (struct PayContext *pc, TMH_trigger_daemon (); /* we resumed, kick MHD */ } + /** * Convert denomination key to its base32 representation * @@ -491,9 +489,10 @@ process_pay_with_exchange (void *cls, GNUNET_break_op (0); resume_pay_with_response (pc, MHD_HTTP_BAD_REQUEST, - TMH_RESPONSE_make_json_pack ("{s:s, s:o}", - "hint", "unknown denom to exchange", - "denom_pub", GNUNET_JSON_from_rsa_public_key (dc->denom.rsa_public_key))); + TMH_RESPONSE_make_json_pack ("{s:s, s:o, s:o}", + "error", "denomination not found", + "denom_pub", GNUNET_JSON_from_rsa_public_key (dc->denom.rsa_public_key), + "exchange_keys", TALER_EXCHANGE_get_keys_raw (mh))); denom_enc = denomination_to_string_alloc (&dc->denom); GNUNET_log (GNUNET_ERROR_TYPE_ERROR, "unknown denom to exchange: %s\n", denom_enc); GNUNET_free (denom_enc);