exchange

Base system with REST service to issue digital coins, run by the payment service provider
Log | Files | Refs | Submodules | README | LICENSE

complete_legitimization_process_start.h (2700B)


      1 /*
      2   This file is part of TALER
      3   Copyright (C) 2026 Taler Systems SA
      4 
      5   TALER is free software; you can redistribute it and/or modify it under the
      6   terms of the GNU General Public License as published by the Free Software
      7   Foundation; either version 3, or (at your option) any later version.
      8 
      9   TALER is distributed in the hope that it will be useful, but WITHOUT ANY
     10   WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR
     11   A PARTICULAR PURPOSE.  See the GNU General Public License for more details.
     12 
     13   You should have received a copy of the GNU General Public License along with
     14   TALER; see the file COPYING.  If not, see <http://www.gnu.org/licenses/>
     15 */
     16 /**
     17  * @file src/include/exchange-database/complete_legitimization_process_start.h
     18  * @brief conditionally complete external KYC process initiation
     19  */
     20 #ifndef EXCHANGE_DATABASE_COMPLETE_LEGITIMIZATION_PROCESS_START_H
     21 #define EXCHANGE_DATABASE_COMPLETE_LEGITIMIZATION_PROCESS_START_H
     22 
     23 #include "taler/taler_error_codes.h"
     24 #include "taler/taler_util.h"
     25 #include "exchangedb_lib.h"
     26 
     27 
     28 /**
     29  * Store the result of provider initiation if the caller still owns the
     30  * process generation.  Matching @a expected_start_time prevents a late
     31  * callback from overwriting a newer initiation in the same row.
     32  *
     33  * Primary test table: `legitimization_processes` (see
     34  * test_legitimization_processes.c).
     35  *
     36  * @param pg database context
     37  * @param process_row process row to update
     38  * @param expected_start_time generation the caller reserved
     39  * @param provider_name expected provider configuration name
     40  * @param h_payto expected account
     41  * @param provider_account_id account identifier returned by provider, or NULL
     42  * @param provider_legitimization_id process identifier returned by provider, or NULL
     43  * @param redirect_url provider redirect URL, or NULL on failure
     44  * @param process_expiration time until the unfinished process may be reused
     45  * @param ec initiation result
     46  * @param error_message_hint optional human-readable error details
     47  * @param finished true if initiation failed and the process is finished
     48  * @return one result if updated, no results if superseded, negative on error
     49  */
     50 enum GNUNET_DB_QueryStatus
     51 TALER_EXCHANGEDB_complete_legitimization_process_start (
     52   struct TALER_EXCHANGEDB_PostgresContext *pg,
     53   uint64_t process_row,
     54   struct GNUNET_TIME_Absolute expected_start_time,
     55   const char *provider_name,
     56   const struct TALER_NormalizedPaytoHashP *h_payto,
     57   const char *provider_account_id,
     58   const char *provider_legitimization_id,
     59   const char *redirect_url,
     60   struct GNUNET_TIME_Absolute process_expiration,
     61   enum TALER_ErrorCode ec,
     62   const char *error_message_hint,
     63   bool finished);
     64 
     65 #endif