merchant

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

commit 6883d8a3b5727f00f1dedc50d8a770ae943d13ce
parent 64be1fe4863900091a085e20630a8049d1ee37c0
Author: Christian Grothoff <christian@grothoff.org>
Date:   Sat,  6 Apr 2019 16:27:51 +0200

add preflights, fix indentation

Diffstat:
Msrc/backend/taler-merchant-httpd_tip-authorize.c | 1+
Msrc/backend/taler-merchant-httpd_tip-pickup.c | 8++++++--
Msrc/backend/taler-merchant-httpd_tip-reserve-helper.c | 2++
3 files changed, 9 insertions(+), 2 deletions(-)

diff --git a/src/backend/taler-merchant-httpd_tip-authorize.c b/src/backend/taler-merchant-httpd_tip-authorize.c @@ -225,6 +225,7 @@ MH_handler_tip_authorize (struct TMH_RequestHandler *rh, "exchange for tipping not configured for the instance"); } tac->ctr.reserve_priv = mi->tip_reserve; + db->preflight (db->cls); ec = db->authorize_tip_TR (db->cls, tac->justification, &tac->amount, diff --git a/src/backend/taler-merchant-httpd_tip-pickup.c b/src/backend/taler-merchant-httpd_tip-pickup.c @@ -195,6 +195,7 @@ run_pickup (struct MHD_Connection *connection, pc->ec, pc->error_hint); } + db->preflight (db->cls); ec = db->pickup_tip_TR (db->cls, &pc->total, &pc->tip_id, @@ -377,6 +378,7 @@ prepare_pickup (struct PickupContext *pc) { enum GNUNET_DB_QueryStatus qs; + db->preflight (db->cls); qs = db->lookup_tip_by_id (db->cls, &pc->tip_id, &pc->exchange_url, @@ -488,8 +490,10 @@ MH_handler_tip_pickup (struct TMH_RequestHandler *rh, struct GNUNET_HashCode tip_id; json_t *planchets; struct GNUNET_JSON_Specification spec[] = { - GNUNET_JSON_spec_fixed_auto ("tip_id", &tip_id), - GNUNET_JSON_spec_json ("planchets", &planchets), + GNUNET_JSON_spec_fixed_auto ("tip_id", + &tip_id), + GNUNET_JSON_spec_json ("planchets", + &planchets), GNUNET_JSON_spec_end() }; struct PickupContext *pc; diff --git a/src/backend/taler-merchant-httpd_tip-reserve-helper.c b/src/backend/taler-merchant-httpd_tip-reserve-helper.c @@ -183,6 +183,7 @@ handle_status (void *cls, GNUNET_CRYPTO_hash (history[i].details.in_details.wire_reference, history[i].details.in_details.wire_reference_size, &uuid); + db->preflight (db->cls); qs = db->enable_tip_reserve_TR (db->cls, &ctr->reserve_priv, &uuid, @@ -311,6 +312,7 @@ TMH_check_tip_reserve (struct CheckTipReserve *ctr, const char *tip_exchange) { MHD_suspend_connection (ctr->connection); + db->preflight (db->cls); GNUNET_CONTAINER_DLL_insert (ctr_head, ctr_tail, ctr);