summaryrefslogtreecommitdiff
path: root/src/include/taler_merchantdb_plugin.h
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2020-06-09 12:00:15 +0200
committerChristian Grothoff <christian@grothoff.org>2020-06-09 12:00:15 +0200
commitb5b3f8adc175519530ee17137e532393727682ca (patch)
treed9d5f3ed5f73a76bd8d312abbc8a69312ffde18a /src/include/taler_merchantdb_plugin.h
parentfcf60499c3ab3e23c458cecdf8f51dd7cf5e16d3 (diff)
downloadmerchant-b5b3f8adc175519530ee17137e532393727682ca.tar.gz
merchant-b5b3f8adc175519530ee17137e532393727682ca.tar.bz2
merchant-b5b3f8adc175519530ee17137e532393727682ca.zip
start to build get-orders-ID
Diffstat (limited to 'src/include/taler_merchantdb_plugin.h')
-rw-r--r--src/include/taler_merchantdb_plugin.h110
1 files changed, 38 insertions, 72 deletions
diff --git a/src/include/taler_merchantdb_plugin.h b/src/include/taler_merchantdb_plugin.h
index 44a316ad..6f3db87c 100644
--- a/src/include/taler_merchantdb_plugin.h
+++ b/src/include/taler_merchantdb_plugin.h
@@ -531,6 +531,28 @@ struct TALER_MERCHANTDB_TipDetails
/**
+ * Function called with information about a coin that was deposited.
+ *
+ * @param cls closure
+ * @param deposit_serial which deposit operation is this about
+ * @param exchange_url URL of the exchange that issued the coin
+ * @param amount_with_fee amount the exchange will deposit for this coin
+ * @param deposit_fee fee the exchange will charge for this coin
+ * @param h_wire hash of merchant's wire details
+ * @param coin_pub public key of the coin
+ */
+typedef void
+(*TALER_MERCHANTDB_DepositedCoinsCallback)(
+ void *cls,
+ uint64_t deposit_serial,
+ const char *exchange_url,
+ const struct GNUNET_HashCode *h_wire,
+ const struct TALER_Amount *amount_with_fee,
+ const struct TALER_Amount *deposit_fee,
+ const struct TALER_CoinSpendPublicKeyP *coin_pub);
+
+
+/**
* Callback with reserve details.
*
* @param cls closure
@@ -558,45 +580,6 @@ typedef void
const struct TALER_MERCHANTDB_TipDetails *tips);
-/* **************** OLD: ******************** */
-
-/**
- * Typically called by `find_contract_terms_by_date`.
- *
- * @param cls closure
- * @param order_id order id
- * @param row_id serial numer of the transaction in the table,
- * @param contract_terms proposal data related to order id
- */
-typedef void
-(*TALER_MERCHANTDB_ProposalDataCallback)(void *cls,
- const char *order_id,
- uint64_t row_id,
- const json_t *contract_terms);
-
-
-/**
- * Function called with information about a transaction.
- *
- * @param cls closure
- * @param merchant_pub merchant's public key
- * @param h_contract_terms proposal data's hashcode
- * @param h_wire hash of our wire details
- * @param timestamp time of the confirmation
- * @param refund refund deadline
- * @param total_amount total amount we receive for the contract after fees
- */
-typedef void
-(*TALER_MERCHANTDB_TransactionCallback)(
- void *cls,
- const struct TALER_MerchantPublicKeyP *merchant_pub,
- const struct GNUNET_HashCode *h_contract_terms,
- const struct GNUNET_HashCode *h_wire,
- struct GNUNET_TIME_Absolute timestamp,
- struct GNUNET_TIME_Absolute refund,
- const struct TALER_Amount *total_amount);
-
-
/**
* Function called with information about a coin that was deposited.
*
@@ -628,39 +611,6 @@ typedef void
/**
- * Function called with information about a wire transfer identifier.
- *
- * @param cls closure
- * @param proof proof from exchange about what the wire transfer was for
- */
-typedef void
-(*TALER_MERCHANTDB_ProofCallback)(void *cls,
- const json_t *proof);
-
-
-/**
- * Function called with information about a refund.
- *
- * @param cls closure
- * @param coin_pub public coin from which the refund comes from
- * @param exchange_url URL of the exchange that issued @a coin_pub
- * @param rtransaction_id identificator of the refund
- * @param reason human-readable explanation of the refund
- * @param refund_amount refund amount which is being taken from @a coin_pub
- * @param refund_fee cost of this refund operation
- */
-typedef void
-(*TALER_MERCHANTDB_CoinRefundCallback)(
- void *cls,
- const struct TALER_CoinSpendPublicKeyP *coin_pub,
- const char *exchange_url,
- uint64_t rtransaction_id,
- const char *reason,
- const struct TALER_Amount *refund_amount,
- const struct TALER_Amount *refund_fee);
-
-
-/**
* Details about a pickup operation executed by the merchant.
*/
struct TALER_MERCHANTDB_PickupDetails
@@ -1287,6 +1237,22 @@ struct TALER_MERCHANTDB_Plugin
/**
+ * Retrieve details about coins that were deposited for an order.
+ *
+ * @param cls closure
+ * @param order_serial identifies the order
+ * @param cb function to call for each deposited coin
+ * @param cb_cls closure for @a cb
+ * @return transaction status
+ */
+ enum GNUNET_DB_QueryStatus
+ (*lookup_deposits_by_order)(void *cls,
+ uint64_t order_serial,
+ TALER_MERCHANTDB_DepositedCoinsCallback cb,
+ void *cb_cls);
+
+
+ /**
* Retrieve wire transfer details for all deposits associated with
* a given @a order_serial.
* FIXME: not implemented yet!