merchant

Merchant backend to process payments, run by merchants
Log | Files | Refs | Submodules | README | LICENSE

commit 190d229f43aa14adc6cd58336beb541b36b7f43f
parent 88d6efd15aa31cef256101f8eca7e6e2341191f6
Author: Marcello Stanisci <marcello.stanisci@inria.fr>
Date:   Wed,  7 Jun 2017 11:49:03 +0200

comments + passing refund reason to refund cb

Diffstat:
Msrc/backenddb/plugin_merchantdb_postgres.c | 1+
Msrc/include/taler_merchantdb_plugin.h | 11+++++++++++
2 files changed, 12 insertions(+), 0 deletions(-)

diff --git a/src/backenddb/plugin_merchantdb_postgres.c b/src/backenddb/plugin_merchantdb_postgres.c @@ -157,6 +157,7 @@ postgres_initialize (void *cls) " rtransaction_id SERIAL" ",h_contract_terms BYTEA NOT NULL" ",coin_pub BYTEA NOT NULL CHECK (LENGTH(coin_pub)=32)" + ",reason VARCHAR NOT NULL" ",refund_amount_val INT8 NOT NULL" ",refund_amount_frac INT8 NOT NULL" ",refund_amount_curr VARCHAR(" TALER_CURRENCY_LEN_STR ") NOT NULL" diff --git a/src/include/taler_merchantdb_plugin.h b/src/include/taler_merchantdb_plugin.h @@ -125,10 +125,21 @@ typedef void 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 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 + */ typedef void (*TALER_MERCHANTDB_RefundCallback)(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);