summaryrefslogtreecommitdiff
path: root/src/backend/taler-merchant-httpd_pay.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/taler-merchant-httpd_pay.c')
-rw-r--r--src/backend/taler-merchant-httpd_pay.c4
1 files changed, 4 insertions, 0 deletions
diff --git a/src/backend/taler-merchant-httpd_pay.c b/src/backend/taler-merchant-httpd_pay.c
index 10f55d4b..67166eaf 100644
--- a/src/backend/taler-merchant-httpd_pay.c
+++ b/src/backend/taler-merchant-httpd_pay.c
@@ -710,6 +710,10 @@ MH_handler_pay (struct TMH_RequestHandler *rh,
}
}
+ /* Check if this payment attempt has already taken place */
+ if (GNUNET_OK == db->check_payment (db->cls, pc->transaction_id))
+ return TMH_RESPONSE_reply_external_error (connection, "payment already attempted");
+
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "Looking up chosen mint '%s'\n", pc->chosen_mint);
/* Find the responsible mint, this may take a while... */