taler-mdb

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

commit 0c2b40f2d7817a448bb4c4a6c12ddeb1cdf32b1b
parent a551891015fb28647fc0d9b33e105a12b785b0f3
Author: Christian Grothoff <christian@grothoff.org>
Date:   Fri, 11 Sep 2020 15:03:59 +0200

quantity required?

Diffstat:
Msrc/main.c | 26++++++++++++++------------
1 file changed, 14 insertions(+), 12 deletions(-)

diff --git a/src/main.c b/src/main.c @@ -1562,18 +1562,20 @@ launch_payment (struct Product *product) /* create the json object for the order request */ if (NULL != product->preview) { - orderReq = json_pack ("{ s:s, s:[ { s:s, s:s, s:o } ], s:o, s:s, s:o }", - "summary", product->description, - "products", - /* */ "description", product->description, - /* */ "image", product->preview, - /* */ "price", TALER_JSON_from_amount ( - &product->price), - "amount", TALER_JSON_from_amount (&product->price), - "fulfillment_message", msg, - "auto_refund", GNUNET_JSON_from_time_rel ( - MAX_REFUND_DELAY) - ); + orderReq = json_pack ( + "{ s:s, s:[ { s:s, s:s, s:o, s:I } ], s:o, s:s, s:o }", + "summary", product->description, + "products", + /* */ "description", product->description, + /* */ "image", product->preview, + /* */ "price", TALER_JSON_from_amount ( + &product->price), + /* */ "quantity", (json_int_t) 1, + "amount", TALER_JSON_from_amount (&product->price), + "fulfillment_message", msg, + "auto_refund", GNUNET_JSON_from_time_rel ( + MAX_REFUND_DELAY) + ); } else {