summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--src/backend/taler-merchant-httpd_contract.c4
-rw-r--r--src/backend/taler-merchant-httpd_pay.c14
2 files changed, 15 insertions, 3 deletions
diff --git a/src/backend/taler-merchant-httpd_contract.c b/src/backend/taler-merchant-httpd_contract.c
index 8fbfefe7..1039b6cd 100644
--- a/src/backend/taler-merchant-httpd_contract.c
+++ b/src/backend/taler-merchant-httpd_contract.c
@@ -231,7 +231,9 @@ MH_handler_contract (struct TMH_RequestHandler *rh,
return TMH_RESPONSE_reply_external_error (connection,
"Unknown receiver given");
}
-
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "Signing contract on behalf of receiver '%s'\n",
+ mi->id);
/* add fields to the contract that the backend should provide */
json_object_set (jcontract,
"exchanges",
diff --git a/src/backend/taler-merchant-httpd_pay.c b/src/backend/taler-merchant-httpd_pay.c
index e6265ba1..3e11c6e9 100644
--- a/src/backend/taler-merchant-httpd_pay.c
+++ b/src/backend/taler-merchant-httpd_pay.c
@@ -918,8 +918,18 @@ MH_handler_pay (struct TMH_RequestHandler *rh,
return (GNUNET_NO == res) ? MHD_YES : MHD_NO;
}
pc->mi = get_instance (root);
- GNUNET_assert (NULL !=
- (pc->mi = get_instance (root)));
+
+ if (NULL == pc->mi)
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_ERROR,
+ "Not able to find the specified receiver\n");
+ json_decref (root);
+ return TMH_RESPONSE_reply_external_error (connection,
+ "Unknown receiver given");
+ }
+ GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
+ "The receiver for this deposit is '%s'\n",
+ pc->mi->id);
pc->chosen_exchange = GNUNET_strdup (chosen_exchange);
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Parsed JSON for /pay.\n");