merchant

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

commit 007ac6f559d566b906a1d092a0bba3bbc7cfccf9
parent f29d26b8beb6c53b43be724f15dcae89bd3fd2c2
Author: Sebastian <sebasjm@taler-systems.com>
Date:   Sun, 25 Oct 2026 15:58:52 -0300

fix: erased facade url

when updating bank password the merchant is allow to update
the bank revenue configuration using the PATCH endpoint.
If the facade url is not present then is erased.
This patch allows to update credentials without modifying the previous URL
or metadata.

Diffstat:
Msrc/backenddb/update_account.c | 7+++++--
1 file changed, 5 insertions(+), 2 deletions(-)

diff --git a/src/backenddb/update_account.c b/src/backenddb/update_account.c @@ -50,12 +50,15 @@ TALER_MERCHANTDB_update_account ( GNUNET_assert (NULL != pg->current_merchant_id); GNUNET_assert (0 == strcmp (id, pg->current_merchant_id)); + /* Only overwrite fields that were actually supplied. Otherwise a PATCH + that updates just the bank credentials would silently clear the + credit_facade_url and extra_wire_subject_metadata. */ TMH_PQ_prepare_anon (pg, "UPDATE merchant_accounts SET" - " credit_facade_url=$2" + " credit_facade_url=COALESCE($2, credit_facade_url)" ",credit_facade_credentials=" " COALESCE($3::TEXT::JSONB, credit_facade_credentials)" - ",extra_wire_subject_metadata=$4" + ",extra_wire_subject_metadata=COALESCE($4, extra_wire_subject_metadata)" " WHERE h_wire=$1;"); return GNUNET_PQ_eval_prepared_non_select (pg->conn, "",