summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorFlorian Dold <florian.dold@gmail.com>2016-05-24 01:20:25 +0200
committerFlorian Dold <florian.dold@gmail.com>2016-05-24 01:20:25 +0200
commit3e8a86defc90fbde42c9505c90341fe981160d1e (patch)
tree1b6e166c9b406a12c848da0a2ab0f1c6437fa67f
parentb5c7e1fec6d694b989168be2a0839b21be0b71fa (diff)
downloadmerchant-3e8a86defc90fbde42c9505c90341fe981160d1e.tar.gz
merchant-3e8a86defc90fbde42c9505c90341fe981160d1e.tar.bz2
merchant-3e8a86defc90fbde42c9505c90341fe981160d1e.zip
Revert "check for duplicate transaction ID"
Fixes issue #4519. "/contract" is needed for contract restoration, even after a contract has been payed for. This reverts commit d7eb23ad965c0207e561261588cbf742f93df935.
-rw-r--r--src/backend/taler-merchant-httpd_contract.c23
-rw-r--r--src/backend/taler-merchant-httpd_pay.c3
-rw-r--r--src/lib/merchant_api_contract.c1
3 files changed, 0 insertions, 27 deletions
diff --git a/src/backend/taler-merchant-httpd_contract.c b/src/backend/taler-merchant-httpd_contract.c
index af18ce11..1f55ada9 100644
--- a/src/backend/taler-merchant-httpd_contract.c
+++ b/src/backend/taler-merchant-httpd_contract.c
@@ -187,29 +187,6 @@ MH_handler_contract (struct TMH_RequestHandler *rh,
"products in contract request malformed");
}
- /* Check if this transaction ID erroneously corresponds to a
- contract that already paid, in which case we should refuse
- to sign it again (frontend buggy, it should use a fresh
- transaction ID each time)! */
- if (GNUNET_OK ==
- db->check_payment (db->cls,
- transaction_id))
- {
- struct MHD_Response *resp;
- int ret;
-
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- "Transaction %llu already paid in the past, refusing to sign!\n",
- (unsigned long long) transaction_id);
- resp = MHD_create_response_from_buffer (strlen ("Duplicate transaction ID!"),
- "Duplicate transaction ID!",
- MHD_RESPMEM_PERSISTENT);
- ret = MHD_queue_response (connection,
- MHD_HTTP_FORBIDDEN,
- resp);
- MHD_destroy_response (resp);
- return ret;
- }
/* add fields to the contract that the backend should provide */
json_object_set (jcontract,
diff --git a/src/backend/taler-merchant-httpd_pay.c b/src/backend/taler-merchant-httpd_pay.c
index 4ba5081f..e362c3c9 100644
--- a/src/backend/taler-merchant-httpd_pay.c
+++ b/src/backend/taler-merchant-httpd_pay.c
@@ -882,9 +882,6 @@ MH_handler_pay (struct TMH_RequestHandler *rh,
/* Payment succeeded in the past; take short cut
and accept immediately */
- GNUNET_log (GNUNET_ERROR_TYPE_INFO,
- "Transaction %llu already paid in the past, taking short cut.\n",
- (unsigned long long) pc->transaction_id);
resp = MHD_create_response_from_buffer (0,
NULL,
MHD_RESPMEM_PERSISTENT);
diff --git a/src/lib/merchant_api_contract.c b/src/lib/merchant_api_contract.c
index c556cc30..1938afa6 100644
--- a/src/lib/merchant_api_contract.c
+++ b/src/lib/merchant_api_contract.c
@@ -123,7 +123,6 @@ handle_contract_finished (void *cls,
(or API version conflict); just pass JSON reply to the application */
break;
case MHD_HTTP_FORBIDDEN:
- /* Duplicate transaction ID, frontend is buggy! */
break;
case MHD_HTTP_UNAUTHORIZED:
/* Nothing really to verify, merchant says one of the signatures is