commit ae3d1db454a46b817935525823caf05bd5c96590
parent 2e2d1c865135a3bdcdf7b142588e092e1228200e
Author: Christian Grothoff <christian@grothoff.org>
Date: Sun, 11 Apr 2021 00:34:29 +0200
more refund-related logging
Diffstat:
2 files changed, 12 insertions(+), 1 deletion(-)
diff --git a/src/backend/taler-merchant-httpd_private-post-orders.c b/src/backend/taler-merchant-httpd_private-post-orders.c
@@ -813,7 +813,11 @@ patch_order (struct MHD_Connection *connection,
(void) GNUNET_TIME_round_abs (&rd);
if (0 == refund_delay.rel_value_us)
+ {
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ "Refund delay is zero, no refunds are possible for this order\n");
rd = now; /* if delay was 0, ensure that refund_deadline == timestamp */
+ }
GNUNET_assert (0 ==
json_object_set_new (order,
"refund_deadline",
@@ -1084,7 +1088,6 @@ merge_inventory (struct MHD_Connection *connection,
if (NULL == json_object_get (order,
"products"))
{
- json_dumpf (order, stderr, JSON_INDENT (2));
GNUNET_assert (NULL != order);
GNUNET_assert (0 ==
json_object_set_new (order,
@@ -1240,6 +1243,9 @@ TMH_private_post_orders (const struct TMH_RequestHandler *rh,
return (GNUNET_NO == ret)
? MHD_YES
: MHD_NO;
+ GNUNET_log (GNUNET_ERROR_TYPE_INFO,
+ "Refund delay is %llu\n",
+ (unsigned long long) refund_delay.rel_value_us);
/* parse and handle the create_token (optionally given) */
if (NULL != json_object_get (hc->request_body,
diff --git a/src/lib/merchant_api_post_order_refund.c b/src/lib/merchant_api_post_order_refund.c
@@ -136,6 +136,11 @@ handle_refund_finished (void *cls,
hr.hint = TALER_JSON_get_error_hint (json);
/* Nothing really to verify, merchant says we need to authenticate. */
break;
+ case MHD_HTTP_FORBIDDEN:
+ hr.ec = TALER_JSON_get_error_code (json);
+ hr.hint = TALER_JSON_get_error_hint (json);
+ /* Nothing really to verify, merchant says we need to authenticate. */
+ break;
case MHD_HTTP_NOT_FOUND:
case MHD_HTTP_CONFLICT:
hr.ec = TALER_JSON_get_error_code (json);