summaryrefslogtreecommitdiff
path: root/src/include/taler_merchantdb_plugin.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-05-20 17:20:40 +0200
committerChristian Grothoff <christian@grothoff.org>2020-05-20 17:20:40 +0200
commit3d6cce7434847d925b51d1600f0eef79041c6591 (patch)
treeb7deb3034d6e1c8d74839499bbd1ff5c30d8b23d /src/include/taler_merchantdb_plugin.h
parent74913ffcfd4e4b1de17c4eeda14601bf1f3c1561 (diff)
downloadmerchant-3d6cce7434847d925b51d1600f0eef79041c6591.tar.gz
merchant-3d6cce7434847d925b51d1600f0eef79041c6591.tar.bz2
merchant-3d6cce7434847d925b51d1600f0eef79041c6591.zip
implement reserve deletion
Diffstat (limited to 'src/include/taler_merchantdb_plugin.h')
-rw-r--r--src/include/taler_merchantdb_plugin.h63
1 files changed, 32 insertions, 31 deletions
diff --git a/src/include/taler_merchantdb_plugin.h b/src/include/taler_merchantdb_plugin.h
index b51fce8d..0960fb93 100644
--- a/src/include/taler_merchantdb_plugin.h
+++ b/src/include/taler_merchantdb_plugin.h
@@ -1630,6 +1630,38 @@ struct TALER_MERCHANTDB_Plugin
const struct TALER_ReservePublicKeyP *reserve_pub);
+ /**
+ * Authorize a tip over @a amount from reserve @a reserve_pub. Remember
+ * the authorization under @a tip_id for later, together with the
+ * @a justification.
+ *
+ * @param cls closure, typically a connection to the db
+ * @param instance_id which instance should generate the tip
+ * @param reserve_pub which reserve is debited, NULL to pick one in the DB
+ * @param amount how high is the tip (with fees)
+ * @param justification why was the tip approved
+ * @param next_url where to send the URL post tip pickup
+ * @param[out] tip_id set to the unique ID for the tip
+ * @param[out] expiration set to when the tip expires
+ * @return transaction status,
+ * #TALER_EC_TIP_AUTHORIZE_RESERVE_EXPIRED if the reserve is known but has expired
+ * #TALER_EC_TIP_AUTHORIZE_RESERVE_UNKNOWN if the reserve is not known
+ * #TALER_EC_TIP_AUTHORIZE_INSUFFICIENT_FUNDS if the reserve has insufficient funds left
+ * #TALER_EC_TIP_AUTHORIZE_DB_HARD_ERROR on hard DB errors
+ * #TALER_EC_TIP_AUTHORIZE_DB_SOFT_ERROR on soft DB errors (client should retry)
+ * #TALER_EC_NONE upon success
+ */
+ enum TALER_ErrorCode
+ (*authorize_tip)(void *cls,
+ const char *instance_id,
+ const struct TALER_ReservePublicKeyP *reserve_pub,
+ const struct TALER_Amount *amount,
+ const char *justification,
+ const char *next_url,
+ struct GNUNET_HashCode *tip_id,
+ struct GNUNET_TIME_Absolute *expiration);
+
+
/* ****************** OLD API ******************** */
@@ -1899,37 +1931,6 @@ struct TALER_MERCHANTDB_Plugin
/**
- * Authorize a tip over @a amount from reserve @a reserve_priv. Remember
- * the authorization under @a tip_id for later, together with the
- * @a justification.
- *
- * @param cls closure, typically a connection to the db
- * @param justification why was the tip approved
- * @param extra extra data that will be given to the customer's wallet
- * @param amount how high is the tip (with fees)
- * @param reserve_priv which reserve is debited
- * @param exchange_url which exchange manages the tip
- * @param[out] expiration set to when the tip expires
- * @param[out] tip_id set to the unique ID for the tip
- * @return transaction status,
- * #TALER_EC_TIP_AUTHORIZE_RESERVE_EXPIRED if the reserve is known but has expired
- * #TALER_EC_TIP_AUTHORIZE_RESERVE_UNKNOWN if the reserve is not known
- * #TALER_EC_TIP_AUTHORIZE_INSUFFICIENT_FUNDS if the reserve has insufficient funds left
- * #TALER_EC_TIP_AUTHORIZE_DB_HARD_ERROR on hard DB errors
- * #TALER_EC_TIP_AUTHORIZE_DB_SOFT_ERROR on soft DB errors (client should retry)
- * #TALER_EC_NONE upon success
- */
- enum TALER_ErrorCode
- (*authorize_tip_TR)(void *cls,
- const char *justification,
- const json_t *extra,
- const struct TALER_Amount *amount,
- const struct TALER_ReservePrivateKeyP *reserve_priv,
- const char *exchange_url,
- struct GNUNET_TIME_Absolute *expiration,
- struct GNUNET_HashCode *tip_id);
-
- /**
* Get the total amount of authorized tips for a tipping reserve.
*
* @param cls closure, typically a connection to the db