summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2021-08-01 22:44:27 +0200
committerChristian Grothoff <christian@grothoff.org>2021-08-01 22:44:27 +0200
commit9b1ee0bc440ac0e3eacba749ca3c936940ac8d1d (patch)
tree084dfe5f8a33d88e2407e87431cb1fe6b3143a8c
parent58ea150272d9d360d1298dba6bce207a0b63833b (diff)
downloadtaler-mdb-9b1ee0bc440ac0e3eacba749ca3c936940ac8d1d.tar.gz
taler-mdb-9b1ee0bc440ac0e3eacba749ca3c936940ac8d1d.tar.bz2
taler-mdb-9b1ee0bc440ac0e3eacba749ca3c936940ac8d1d.zip
-json pack refactoring
-rw-r--r--src/main.c17
1 files changed, 9 insertions, 8 deletions
diff --git a/src/main.c b/src/main.c
index 51b49f5..f4156d8 100644
--- 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)