diff options
author | Christian Grothoff <christian@grothoff.org> | 2024-01-04 01:03:34 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2024-01-04 01:03:34 +0100 |
commit | d2d2d773cb2cc23f198d07392bab463beb2e2e04 (patch) | |
tree | 4f8eb381f1f64d47cc3668b40889416ea35fc31f /src/include/taler_merchantdb_plugin.h | |
parent | 881381503f7f51b294c2740e9fcf7f28ef43f973 (diff) |
remove unnecessary DB interaction in GET private/orders/ID
Diffstat (limited to 'src/include/taler_merchantdb_plugin.h')
-rw-r--r-- | src/include/taler_merchantdb_plugin.h | 50 |
1 files changed, 29 insertions, 21 deletions
diff --git a/src/include/taler_merchantdb_plugin.h b/src/include/taler_merchantdb_plugin.h index 27950232..7e2b748c 100644 --- a/src/include/taler_merchantdb_plugin.h +++ b/src/include/taler_merchantdb_plugin.h @@ -1979,21 +1979,48 @@ struct TALER_MERCHANTDB_Plugin * * @param cls closure * @param instance_id instance's identifier - * @param order_id order_id used to lookup. + * @param order_id order_id used to lookup + * @param session_id session_id to compare, can be NULL * @param[out] contract_terms where to store the result, NULL to only check for existence * @param[out] order_serial set to the order's serial number * @param[out] paid set to true if the order is fully paid + * @param[out] wired set to true if the exchange wired the funds + * @param[out] session_matches set to true if @a session_id matches session stored for this contract * @param[out] claim_token set to the claim token, NULL to only check for existence * @return transaction status */ enum GNUNET_DB_QueryStatus - (*lookup_contract_terms)( + (*lookup_contract_terms3)( void *cls, const char *instance_id, const char *order_id, + const char *session_id, json_t **contract_terms, uint64_t *order_serial, bool *paid, + bool *wired, + bool *session_matches, + struct TALER_ClaimTokenP *claim_token); + + + /** + * Retrieve contract terms given its @a order_id + * + * @param cls closure + * @param instance_id instance's identifier + * @param order_id order_id used to lookup. + * @param[out] contract_terms where to store the result, NULL to only check for existence + * @param[out] order_serial set to the order's serial number + * @param[out] claim_token set to the claim token, NULL to only check for existence + * @return transaction status + */ + enum GNUNET_DB_QueryStatus + (*lookup_contract_terms)( + void *cls, + const char *instance_id, + const char *order_id, + json_t **contract_terms, + uint64_t *order_serial, struct TALER_ClaimTokenP *claim_token); @@ -2262,25 +2289,6 @@ struct TALER_MERCHANTDB_Plugin /** - * Retrieve payment and wire status for a given @a order_serial and - * session ID. - * - * @param cls closure - * @param order_serial identifies the order - * @param session_id session for which to check the payment status, NULL for any - * @param[out] paid set to the payment status of the contract - * @param[out] wired set to the wire transfer status of the exchange payment - * @return transaction status - */ - enum GNUNET_DB_QueryStatus - (*lookup_payment_status)(void *cls, - uint64_t order_serial, - const char *session_id, - bool *paid, - bool *wired); - - - /** * Retrieve details about coins that were deposited for an order. * * @param cls closure |