taler-mdb

GNU Taler Extensions and Integrations
Log | Files | Refs | Submodules | README | LICENSE

commit 9b1ee0bc440ac0e3eacba749ca3c936940ac8d1d
parent 58ea150272d9d360d1298dba6bce207a0b63833b
Author: Christian Grothoff <christian@grothoff.org>
Date:   Sun,  1 Aug 2021 22:44:27 +0200

-json pack refactoring

Diffstat:
Msrc/main.c | 17+++++++++--------
1 file changed, 9 insertions(+), 8 deletions(-)

diff --git a/src/main.c b/src/main.c @@ -1577,14 +1577,15 @@ launch_payment (struct Product *product) } else { - orderReq = json_pack ("{ s:s, s:o, s:s, s:o }", - "summary", - product->description, - "amount", TALER_JSON_from_amount (&product->price), - "fulfillment_message", msg, - "auto_refund", GNUNET_JSON_from_time_rel ( - MAX_REFUND_DELAY) - ); + orderReq = GNUNET_JSON_PACK ( + GNUNET_JSON_pack_string ("summary", + product->description), + TALER_JSON_pack_amount ("amount", + &product->price), + GNUNET_JSON_pack_string ("fulfillment_message", + msg), + GNUNET_JSON_pack_time_rel ("auto_refund", + MAX_REFUND_DELAY)); } GNUNET_free (msg); if (NULL == orderReq)