summaryrefslogtreecommitdiff
path: root/src/backenddb/plugin_merchantdb_postgres.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backenddb/plugin_merchantdb_postgres.c')
-rw-r--r--src/backenddb/plugin_merchantdb_postgres.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/src/backenddb/plugin_merchantdb_postgres.c b/src/backenddb/plugin_merchantdb_postgres.c
index 30567ed7..ae4fc359 100644
--- a/src/backenddb/plugin_merchantdb_postgres.c
+++ b/src/backenddb/plugin_merchantdb_postgres.c
@@ -1933,6 +1933,7 @@ static enum GNUNET_DB_QueryStatus
postgres_refund_coin (void *cls,
const char *instance_id,
const struct GNUNET_HashCode *h_contract_terms,
+ struct GNUNET_TIME_Absolute refund_timestamp,
const struct TALER_CoinSpendPublicKeyP *coin_pub,
const char *reason)
{
@@ -1940,6 +1941,7 @@ postgres_refund_coin (void *cls,
struct GNUNET_PQ_QueryParam params[] = {
GNUNET_PQ_query_param_string (instance_id),
GNUNET_PQ_query_param_auto_from_type (h_contract_terms),
+ GNUNET_PQ_query_param_absolute_time (&refund_timestamp),
GNUNET_PQ_query_param_auto_from_type (coin_pub),
GNUNET_PQ_query_param_string (reason),
GNUNET_PQ_query_param_end
@@ -6859,6 +6861,7 @@ libtaler_plugin_merchantdb_postgres_init (void *cls)
"INSERT INTO merchant_refunds"
"(order_serial"
",rtransaction_id"
+ ",refund_timestamp"
",coin_pub"
",reason"
",refund_amount_val"
@@ -6867,12 +6870,13 @@ libtaler_plugin_merchantdb_postgres_init (void *cls)
"SELECT "
" order_serial"
",0" /* rtransaction_id always 0 for /abort */
+ ",$3"
",coin_pub"
- ",$4"
+ ",$5"
",amount_with_fee_val"
",amount_with_fee_frac"
" FROM merchant_deposits"
- " WHERE coin_pub=$3"
+ " WHERE coin_pub=$4"
" AND order_serial="
" (SELECT order_serial"
" FROM merchant_contract_terms"
@@ -6881,7 +6885,7 @@ libtaler_plugin_merchantdb_postgres_init (void *cls)
" (SELECT merchant_serial"
" FROM merchant_instances"
" WHERE merchant_id=$1))",
- 4),
+ 5),
/* for postgres_lookup_order_status() */
GNUNET_PQ_make_prepare ("lookup_order_status",