diff options
author | Christian Grothoff <christian@grothoff.org> | 2021-08-01 22:44:27 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2021-08-01 22:44:27 +0200 |
commit | 9b1ee0bc440ac0e3eacba749ca3c936940ac8d1d (patch) | |
tree | 084dfe5f8a33d88e2407e87431cb1fe6b3143a8c | |
parent | 58ea150272d9d360d1298dba6bce207a0b63833b (diff) | |
download | taler-mdb-9b1ee0bc440ac0e3eacba749ca3c936940ac8d1d.tar.gz taler-mdb-9b1ee0bc440ac0e3eacba749ca3c936940ac8d1d.tar.bz2 taler-mdb-9b1ee0bc440ac0e3eacba749ca3c936940ac8d1d.zip |
-json pack refactoring
-rw-r--r-- | src/main.c | 17 |
1 files changed, 9 insertions, 8 deletions
@@ -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) |