merchant

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

commit 2646afbf47a2a69ffaf9a6578c45601877a4a796
parent 5f1529ad7d158b917986f08ffc4f7c062ee031c1
Author: Marcello Stanisci <marcello.stanisci@inria.fr>
Date:   Thu,  3 Nov 2016 14:40:13 +0100

moving "instance" field within "merchant"

Diffstat:
Mdoc/version.texi | 4++--
Msrc/backend/taler-merchant-httpd_contract.c | 4+++-
Msrc/lib/test_merchant_api.c | 11+++++++++--
3 files changed, 14 insertions(+), 5 deletions(-)

diff --git a/doc/version.texi b/doc/version.texi @@ -1,4 +1,4 @@ -@set UPDATED 31 October 2016 -@set UPDATED-MONTH October 2016 +@set UPDATED 3 November 2016 +@set UPDATED-MONTH November 2016 @set EDITION 0.1.0 @set VERSION 0.1.0 diff --git a/src/backend/taler-merchant-httpd_contract.c b/src/backend/taler-merchant-httpd_contract.c @@ -154,6 +154,7 @@ MH_handler_contract (struct TMH_RequestHandler *rh, struct TALER_Amount max_fee; uint64_t transaction_id; json_t *products; + json_t *merchant; struct GNUNET_TIME_Absolute timestamp; struct GNUNET_TIME_Absolute refund_deadline; struct GNUNET_TIME_Absolute pay_deadline; @@ -164,6 +165,7 @@ MH_handler_contract (struct TMH_RequestHandler *rh, /* The following entries we don't actually need, except to check that the contract is well-formed */ GNUNET_JSON_spec_json ("products", &products), + GNUNET_JSON_spec_json ("merchant", &merchant), GNUNET_JSON_spec_absolute_time ("timestamp", &timestamp), GNUNET_JSON_spec_absolute_time ("refund_deadline", &refund_deadline), GNUNET_JSON_spec_absolute_time ("pay_deadline", &pay_deadline), @@ -227,7 +229,7 @@ MH_handler_contract (struct TMH_RequestHandler *rh, "contract:products"); } - mi = get_instance (jcontract); + mi = get_instance (merchant); if (NULL == mi) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, diff --git a/src/lib/test_merchant_api.c b/src/lib/test_merchant_api.c @@ -1641,9 +1641,16 @@ interpreter_run (void *cls) JSON_REJECT_DUPLICATES, &error); if (NULL != instance) - json_object_set_new (proposal, + { + + json_t *merchant; + + merchant = json_object (); + json_object_set_new (merchant, "instance", json_string (instance)); + json_object_set (proposal, "merchant", merchant); + } if (NULL == proposal) { GNUNET_log (GNUNET_ERROR_TYPE_ERROR, @@ -2443,7 +2450,7 @@ main (int argc, unsetenv ("XDG_DATA_HOME"); unsetenv ("XDG_CONFIG_HOME"); GNUNET_log_setup ("test-merchant-api", - "WARNING", + "DEBUG", NULL); cfg = GNUNET_CONFIGURATION_create (); GNUNET_assert (GNUNET_OK ==