merchant

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

commit ee116731c6ac4b5db85d9dcb57495c74e22c9fd4
parent 20fa0cd7f044d3d074e5cb1208409b9dadccb7aa
Author: Florian Dold <florian.dold@gmail.com>
Date:   Sat, 26 Aug 2017 00:15:31 +0200

use order_id as summary if contract doesn't have it

Diffstat:
Msrc/backend/taler-merchant-httpd_history.c | 8++++++--
1 file changed, 6 insertions(+), 2 deletions(-)

diff --git a/src/backend/taler-merchant-httpd_history.c b/src/backend/taler-merchant-httpd_history.c @@ -45,19 +45,23 @@ pd_cb (void *cls, json_t *amount; json_t *timestamp; json_t *instance; - json_t *summary; + json_t *summary=NULL; GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "/history's row_id: %llu\n", (unsigned long long) row_id); GNUNET_assert (-1 != json_unpack ((json_t *) contract_terms, - "{s:o, s:o, s:{s:o}, s:o}", + "{s:o, s:o, s:{s:o}, s?:o}", "amount", &amount, "timestamp", &timestamp, "merchant", "instance", &instance, "summary", &summary)); + if (NULL == summary) { + summary = json_string (order_id); + } + GNUNET_break (NULL != (entry = json_pack ("{s:I, s:s, s:O, s:O, s:O, s:O}", "row_id", row_id, "order_id", order_id,