merchant

Merchant backend to process payments, run by merchants
Log | Files | Refs | Submodules | README | LICENSE

commit f8a783870bf0262efc056b93b7b31eb98dbe5a43
parent c9a7d33aad0e084b07b811bb97ee4bd292bf8986
Author: Christian Grothoff <christian@grothoff.org>
Date:   Fri,  9 Oct 2026 22:48:24 +0200

check currency of exchange matches client's claim

Diffstat:
Msrc/backend/taler-merchant-httpd_post-orders-ORDER_ID-pay.c | 10++++++++++
1 file changed, 10 insertions(+), 0 deletions(-)

diff --git a/src/backend/taler-merchant-httpd_post-orders-ORDER_ID-pay.c b/src/backend/taler-merchant-httpd_post-orders-ORDER_ID-pay.c @@ -1672,6 +1672,16 @@ process_pay_with_keys ( if (NULL != eg->keys) TALER_EXCHANGE_keys_decref (eg->keys); eg->keys = TALER_EXCHANGE_keys_incref (keys); + if (0 != strcasecmp (keys->currency, + eg->total.currency)) + { + GNUNET_break_op (0); + resume_pay_with_error ( + pc, + TALER_EC_MERCHANT_GENERIC_CURRENCY_MISMATCH, + eg->exchange_url); + return; + } if (! TMH_EXCHANGES_is_below_limit (keys, TALER_KYCLOGIC_KYC_TRIGGER_TRANSACTION, &eg->total))