merchant

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

commit cb0bdc2223b79abdc17d1058b642ca6eb8c3880d
parent 25111b5197111d037f836d298221c8ea9dad2d5e
Author: Marcello Stanisci <marcello.stanisci@inria.fr>
Date:   Mon, 14 Dec 2015 17:47:45 +0100

fixing #4085

Diffstat:
Msrc/backend/merchant.conf | 1-
Msrc/backend/taler-merchant-httpd_contract.c | 4++++
Msrc/backend/taler-merchant-httpd_pay.c | 1+
3 files changed, 5 insertions(+), 1 deletion(-)

diff --git a/src/backend/merchant.conf b/src/backend/merchant.conf @@ -46,7 +46,6 @@ PUBLIC_KEY = 9QXF7XY7E9VPV47B5Z806NDFSX2VJ79SVHHD29QEQ3BG31ANHZ60 [merchantdb-postgres] CONFIG = postgres:///talerdemo - # "wire-" sections include wire details, here for SEPA. [wire-sepa] IBAN = DE67830654080004822650 diff --git a/src/backend/taler-merchant-httpd_contract.c b/src/backend/taler-merchant-httpd_contract.c @@ -68,6 +68,10 @@ MH_handler_contract (struct TMH_RequestHandler *rh, if ((GNUNET_NO == res) || (NULL == root)) return MHD_YES; + if (GNUNET_OK != TALER_hash_json (j_wire, &h_wire)) + return TMH_RESPONSE_reply_internal_error (connection, + "failed to hash wire details"); + /* add fields to the "root" that the backend should provide */ json_object_set (root, "mints", diff --git a/src/backend/taler-merchant-httpd_pay.c b/src/backend/taler-merchant-httpd_pay.c @@ -674,6 +674,7 @@ MH_handler_pay (struct TMH_RequestHandler *rh, return TMH_RESPONSE_reply_external_error (connection, "no coins given"); } + /* note: 1 coin = 1 deposit confirmation expected */ pc->dc = GNUNET_new_array (pc->coins_cnt, struct MERCHANT_DepositConfirmation);