commit db6955167ab5b77f5a0c774c54a514069b6ccced
parent d75b154c7ddfb150b24f7b3ad963da797ddd2798
Author: bohdan-potuzhnyi <bohdan.potuzhnyi@gmail.com>
Date: Thu, 12 Dec 2024 16:48:48 +0100
bug fix
Diffstat:
2 files changed, 3 insertions(+), 0 deletions(-)
diff --git a/src/backend/taler-merchant-httpd.c b/src/backend/taler-merchant-httpd.c
@@ -505,6 +505,7 @@ handle_mhd_completion_callback (void *cls,
json_decref (hc->request_body);
if (NULL != hc->instance)
TMH_instance_decref (hc->instance);
+ TMH_db->preflight(TMH_db->cls);
GNUNET_free (hc->full_url);
GNUNET_free (hc);
*con_cls = NULL;
diff --git a/src/backend/taler-merchant-httpd_post-orders-ID-pay.c b/src/backend/taler-merchant-httpd_post-orders-ID-pay.c
@@ -2240,6 +2240,7 @@ phase_execute_pay_transaction (struct PayContext *pc)
else if (GNUNET_DB_STATUS_SUCCESS_NO_RESULTS == qs)
{
/* UNIQUE constraint violation, meaning this token was already used. */
+ TMH_db->rollback(TMH_db->cls);
pay_end (pc,
TALER_MHD_reply_with_error (pc->connection,
MHD_HTTP_CONFLICT,
@@ -2274,6 +2275,7 @@ phase_execute_pay_transaction (struct PayContext *pc)
}
if (pc->deposit_currency_mismatch)
{
+ TMH_db->rollback(TMH_db->cls);
GNUNET_break_op (0);
pay_end (pc,
TALER_MHD_reply_with_error (pc->connection,