diff options
author | Marcello Stanisci <marcello.stanisci@inria.fr> | 2017-06-08 10:37:35 +0200 |
---|---|---|
committer | Marcello Stanisci <marcello.stanisci@inria.fr> | 2017-06-08 10:38:32 +0200 |
commit | de160b1fb8c55f553d87ad7a19f82c143f2a11bc (patch) | |
tree | 6eb26a4a599a386f472407e775be1bb91e4c1ee0 /src/backenddb/test_merchantdb.c | |
parent | 55e0f3759fe57f2063b66613e46f5107b2212700 (diff) | |
download | merchant-de160b1fb8c55f553d87ad7a19f82c143f2a11bc.tar.gz merchant-de160b1fb8c55f553d87ad7a19f82c143f2a11bc.tar.bz2 merchant-de160b1fb8c55f553d87ad7a19f82c143f2a11bc.zip |
get refunds from database, only testing for zero rows returned.
Diffstat (limited to 'src/backenddb/test_merchantdb.c')
-rw-r--r-- | src/backenddb/test_merchantdb.c | 33 |
1 files changed, 30 insertions, 3 deletions
diff --git a/src/backenddb/test_merchantdb.c b/src/backenddb/test_merchantdb.c index 3bec78de..04e67073 100644 --- a/src/backenddb/test_merchantdb.c +++ b/src/backenddb/test_merchantdb.c @@ -200,6 +200,28 @@ transaction_cb (void *cls, } /** + * Function called with information about a refund. + * + * @param cls closure + * @param coin_pub public coin from which the refund comes from + * @param rtransaction_id identificator of the refund + * @param reason human-readable explaination of the refund + * @param refund_amount refund amount which is being taken from coin_pub + * @param refund_fee cost of this refund operation + */ +void +refund_cb(void *cls, + const struct TALER_CoinSpendPublicKeyP *coin_pub, + uint64_t rtransaction_id, + const char *reason, + const struct TALER_Amount *refund_amount, + const struct TALER_Amount *refund_fee) +{ + GNUNET_log (GNUNET_ERROR_TYPE_DEBUG, "refund_cb\n"); + /* FIXME, more logic here? */ +} + +/** * Callback for `find_contract_terms_by_date`. * * @param cls closure @@ -485,9 +507,9 @@ run (void *cls) NULL)); FAILIF (GNUNET_OK != plugin->find_transfers_by_hash (plugin->cls, - &h_contract_terms, - &transfer_cb, - NULL)); + &h_contract_terms, + &transfer_cb, + NULL)); FAILIF (GNUNET_OK != plugin->find_deposits_by_wtid (plugin->cls, &wtid, @@ -499,6 +521,11 @@ run (void *cls) &wtid, &proof_cb, NULL)); + FAILIF (GNUNET_NO != + plugin->get_refunds_from_contract_terms_hash (plugin->cls, + &h_contract_terms, + &refund_cb, + NULL)); if (-1 == result) result = 0; |