aboutsummaryrefslogtreecommitdiff
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.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/src/backend/taler-merchant-httpd_pay.c b/src/backend/taler-merchant-httpd_pay.c
index f3775c26..300ab9e5 100644
--- a/src/backend/taler-merchant-httpd_pay.c
+++ b/src/backend/taler-merchant-httpd_pay.c
@@ -1405,6 +1405,19 @@ parse_pay (struct MHD_Connection *connection,
1405 1405
1406 session_id = json_string_value (json_object_get (root, 1406 session_id = json_string_value (json_object_get (root,
1407 "session_id")); 1407 "session_id"));
1408
1409 if (0 != memcmp (&merchant_pub,
1410 &pc->mi->pubkey,
1411 sizeof (struct GNUNET_CRYPTO_EddsaPublicKey)))
1412 {
1413 TALER_LOG_INFO ("Unknown merchant public key included in payment (usually wrong instance chosen)\n");
1414 TMH_RESPONSE_reply_rc (connection,
1415 MHD_HTTP_NOT_FOUND,
1416 TALER_EC_PAY_WRONG_INSTANCE,
1417 "Payment sent to wrong instance (merchant_pub unknown to the merchant)");
1418 return GNUNET_NO;
1419 }
1420
1408 if (NULL != session_id) 1421 if (NULL != session_id)
1409 pc->session_id = GNUNET_strdup (session_id); 1422 pc->session_id = GNUNET_strdup (session_id);
1410 pc->order_id = GNUNET_strdup (order_id); 1423 pc->order_id = GNUNET_strdup (order_id);