aboutsummaryrefslogtreecommitdiff
path: root/src/include/taler_merchantdb_plugin.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2023-02-21 14:21:01 +0100
committerChristian Grothoff <christian@grothoff.org>2023-02-21 14:21:01 +0100
commit243045a63fac366ca9c3cb8f97220b76249a8f51 (patch)
treedc25c6b8534653c60861ec7a5a6fd4760df96495 /src/include/taler_merchantdb_plugin.h
parente5a9bd4c35135cd58a106355d1651c8dfc7b9da5 (diff)
POS secret support
Diffstat (limited to 'src/include/taler_merchantdb_plugin.h')
-rw-r--r--src/include/taler_merchantdb_plugin.h69
1 files changed, 43 insertions, 26 deletions
diff --git a/src/include/taler_merchantdb_plugin.h b/src/include/taler_merchantdb_plugin.h
index 496bc77c..0cedf3ee 100644
--- a/src/include/taler_merchantdb_plugin.h
+++ b/src/include/taler_merchantdb_plugin.h
@@ -1416,8 +1416,6 @@ struct TALER_MERCHANTDB_Plugin
* @param[out] h_post_data set to the hash of the POST data that created the order
* @param[out] contract_terms where to store the retrieved contract terms,
* NULL to only test if the order exists
- * @param pos_key [out] encoded key for payment verification
- * @param pricing_algorithm [out] to show the price in the payment verification
* @return transaction status
*/
enum GNUNET_DB_QueryStatus
@@ -1426,9 +1424,7 @@ struct TALER_MERCHANTDB_Plugin
const char *order_id,
struct TALER_ClaimTokenP *claim_token,
struct TALER_MerchantPostDataHashP *h_post_data,
- json_t **contract_terms,
- char *pos_key,
- uint64_t pricing_algorithm);
+ json_t **contract_terms);
/**
@@ -1478,7 +1474,7 @@ struct TALER_MERCHANTDB_Plugin
* @param claim_token token to use for access control
* @param contract_terms proposal data to store
* @param pos_key encoded key for payment verification
- * @param pricing_algorithm to show the price in the payment verification
+ * @param pos_algorithm algorithm to compute the payment verification
* @return transaction status
*/
enum GNUNET_DB_QueryStatus
@@ -1490,7 +1486,7 @@ struct TALER_MERCHANTDB_Plugin
const struct TALER_ClaimTokenP *claim_token,
const json_t *contract_terms,
const char *pos_key,
- uint64_t pricing_algorithm);
+ enum TALER_MerchantConfirmationAlgorithm pos_algorithm);
/**
@@ -1539,19 +1535,43 @@ struct TALER_MERCHANTDB_Plugin
* @param[out] paid set to true if the order is fully paid
* @param[out] claim_token set to the claim token, NULL to only check for existence
* @param[out] pos_key encoded key for payment verification
- * @param pricing_algorithm [out] to show the price in the payment verification
+ * @param[out] pos_algorithm set to algorithm to compute the payment verification
* @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,
- bool *paid,
- struct TALER_ClaimTokenP *claim_token,
- char *pos_key,
- uint64_t pricing_algorithm);
+ (*lookup_contract_terms2)(
+ void *cls,
+ const char *instance_id,
+ const char *order_id,
+ json_t **contract_terms,
+ uint64_t *order_serial,
+ bool *paid,
+ struct TALER_ClaimTokenP *claim_token,
+ char **pos_key,
+ enum TALER_MerchantConfirmationAlgorithm *pricing_algorithm);
+
+
+ /**
+ * 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] paid set to true if the order is fully paid
+ * @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,
+ bool *paid,
+ struct TALER_ClaimTokenP *claim_token);
/**
@@ -1567,19 +1587,16 @@ struct TALER_MERCHANTDB_Plugin
* @param order_id order_id used to store
* @param claim_token the token belonging to the order
* @param[out] order_serial set to the serial of the order
- * @param pos_key encoded key for payment verification
- * @param pricing_algorithm to show the price in the payment verification
* @return transaction status, #GNUNET_DB_STATUS_HARD_ERROR if @a contract_terms
* is malformed
*/
enum GNUNET_DB_QueryStatus
- (*insert_contract_terms)(void *cls,
- const char *instance_id,
- const char *order_id,
- json_t *contract_terms,
- uint64_t *order_serial,
- const char *pos_key,
- uint64_t pricing_algorithm);
+ (*insert_contract_terms)(
+ void *cls,
+ const char *instance_id,
+ const char *order_id,
+ json_t *contract_terms,
+ uint64_t *order_serial);
/**