diff options
author | Christian Grothoff <christian@grothoff.org> | 2020-06-04 21:48:34 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2020-06-04 21:48:34 +0200 |
commit | ea5d4f680dd1394889e61adbb805d6d8decfe9e1 (patch) | |
tree | 857b85825def1de596fbb797c4729058b0535eab /src/include/taler_merchantdb_plugin.h | |
parent | 96affdc638c66e04adccbf1cf3ff427cd37f0ada (diff) | |
download | merchant-ea5d4f680dd1394889e61adbb805d6d8decfe9e1.tar.gz merchant-ea5d4f680dd1394889e61adbb805d6d8decfe9e1.tar.bz2 merchant-ea5d4f680dd1394889e61adbb805d6d8decfe9e1.zip |
more work on private-get-orders-ID
Diffstat (limited to 'src/include/taler_merchantdb_plugin.h')
-rw-r--r-- | src/include/taler_merchantdb_plugin.h | 67 |
1 files changed, 67 insertions, 0 deletions
diff --git a/src/include/taler_merchantdb_plugin.h b/src/include/taler_merchantdb_plugin.h index 1ca4f9a0..e508f56b 100644 --- a/src/include/taler_merchantdb_plugin.h +++ b/src/include/taler_merchantdb_plugin.h @@ -337,6 +337,26 @@ typedef void /** + * Typically called by `lookup_transfer_details_by_order`. + * FIXME: not implemented yet! + * + * @param cls closure + * @param wtid wire transfer subject of the wire transfer for the coin + * @param deposit_value contribution of the coin to the total wire transfer value + * @param deposit_fee deposit fee charged by the exchange for the coin + * @param transfer_confirmed did the merchant confirm that a wire transfer with + * @a wtid over the total amount happened? + */ +typedef void +(*TALER_MERCHANTDB_OrderTransferDetailsCallback)( + void *cls, + const struct TALER_WireTransferIdentifierRawP *wtid, + const struct TALER_Amount *deposit_value, + const struct TALER_Amount *deposit_fee, + bool transfer_confirmed); + + +/** * Function called with detailed information about a refund. * * @param cls closure @@ -1261,6 +1281,53 @@ struct TALER_MERCHANTDB_Plugin /** + * Retrieve wire transfer details for all deposits associated with + * a given @a order_serial. + * FIXME: not implemented yet! + * + * @param cls closure + * @param order_serial identifies the order + * @param cb function called with the wire transfer details + * @param cb_cls closure for @a cb + * @return transaction status + */ + enum GNUNET_DB_QueryStatus + (*lookup_transfer_details_by_order)( + void *cls, + uint64_t order_serial, + TALER_MERCHANTDB_OrderTransferDetailsCallback cb, + void *cb_cls); + + + /** + * Insert wire transfer details for a deposit. + * FIXME: not implemented yet! + * + * @param cls closure + * @param deposit_serial serial number of the deposit + * @param dd deposit transfer data from the exchange to store + * @return transaction status + */ + enum GNUNET_DB_QueryStatus + (*insert_deposit_to_transfer)(void *cls, + uint64_t deposit_serial, + const struct TALER_EXCHANGE_DepositData *dd); + + + /** + * Set 'wired' status for an order to 'true'. + * FIXME: not implemented yet! + * + * @param cls closure + * @param order_serial serial number of the order + * @return transaction status + */ + enum GNUNET_DB_QueryStatus + (*mark_order_wired)(void *cls, + uint64_t order_serial); + + + /** * Function called when some backoffice staff decides to award or * increase the refund on an existing contract. This function * MUST be called from within a transaction scope setup by the |