merchant

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

commit 790146569e9f530ca99899c7d595dbc0bb1460a1
parent cc3abb6a1b51467490b3e27dd79d0ea8b46af53a
Author: Christian Grothoff <grothoff@gnunet.org>
Date:   Mon,  4 Aug 2025 17:49:25 +0200

add validation state

Diffstat:
Msrc/backenddb/merchant-0022.sql | 4++++
Msrc/backenddb/pg_lookup_instances.c | 14+++++++++++++-
Msrc/include/taler_merchantdb_plugin.h | 10++++++++++
3 files changed, 27 insertions(+), 1 deletion(-)

diff --git a/src/backenddb/merchant-0022.sql b/src/backenddb/merchant-0022.sql @@ -34,5 +34,9 @@ ALTER TABLE merchant_instances COMMENT ON COLUMN merchant_instances.phone_number IS 'Phone number of the merchant to use for password reset (and to contact the merchant as the backend operator); optional if 2-FA is not used and/or for legacy instances'; +COMMENT ON COLUMN merchant_instances.phone_validated + IS 'TRUE if the merchant backend validated the phone number'; +COMMENT ON COLUMN merchant_instances.email_validated + IS 'TRUE if the merchant backend validated the e-mail address'; COMMIT; diff --git a/src/backenddb/pg_lookup_instances.c b/src/backenddb/pg_lookup_instances.c @@ -1,6 +1,6 @@ /* This file is part of TALER - Copyright (C) 2022, 2023 Taler Systems SA + Copyright (C) 2022--2025 Taler Systems SA TALER is free software; you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software @@ -105,6 +105,10 @@ lookup_instances_cb (void *cls, &is.jurisdiction), GNUNET_PQ_result_spec_bool ("use_stefan", &is.use_stefan), + GNUNET_PQ_result_spec_bool ("phone_validated", + &is.phone_validated), + GNUNET_PQ_result_spec_bool ("email_validated", + &is.email_validated), GNUNET_PQ_result_spec_relative_time ( "default_wire_transfer_delay", &is.default_wire_transfer_delay), @@ -189,6 +193,8 @@ TMH_PG_lookup_instances (void *cls, ",mi.website" ",mi.email" ",mi.phone_number" + ",mi.phone_validated" + ",mi.email_validated" ",mi.logo" ",mk.merchant_priv" " FROM merchant_instances mi" @@ -211,6 +217,8 @@ TMH_PG_lookup_instances (void *cls, ",mi.website" ",mi.email" ",mi.phone_number" + ",mi.phone_validated" + ",mi.email_validated" ",mi.logo" ",mk.merchant_priv" " FROM merchant_instances mi" @@ -267,6 +275,8 @@ TMH_PG_lookup_instance (void *cls, ",mi.website" ",mi.email" ",mi.phone_number" + ",mi.phone_validated" + ",mi.email_validated" ",mi.logo" ",mk.merchant_priv" " FROM merchant_instances mi" @@ -290,6 +300,8 @@ TMH_PG_lookup_instance (void *cls, ",mi.website" ",mi.email" ",mi.phone_number" + ",mi.phone_validated" + ",mi.email_validated" ",mi.logo" ",mk.merchant_priv" " FROM merchant_instances mi" diff --git a/src/include/taler_merchantdb_plugin.h b/src/include/taler_merchantdb_plugin.h @@ -211,6 +211,16 @@ struct TALER_MERCHANTDB_InstanceSettings bool use_stefan; /** + * True of @e phone was validated. + */ + bool phone_validated; + + /** + * True of @e email was validated. + */ + bool email_validated; + + /** * If the frontend does NOT specify an execution date, how long should * we tell the exchange to wait to aggregate transactions before * executing the wire transfer? This delay is added to the current