summaryrefslogtreecommitdiff
path: root/src/backenddb/pg_increase_refund.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backenddb/pg_increase_refund.c')
-rw-r--r--src/backenddb/pg_increase_refund.c15
1 files changed, 8 insertions, 7 deletions
diff --git a/src/backenddb/pg_increase_refund.c b/src/backenddb/pg_increase_refund.c
index 5fd548d7..d274b1e9 100644
--- a/src/backenddb/pg_increase_refund.c
+++ b/src/backenddb/pg_increase_refund.c
@@ -364,7 +364,7 @@ process_deposits_for_refund_cb (
GNUNET_PQ_query_param_auto_from_type (&rcd[i].coin_pub),
GNUNET_PQ_query_param_string (ctx->reason),
TALER_PQ_query_param_amount_with_currency (pg->conn,
- increment),
+ increment),
GNUNET_PQ_query_param_end
};
@@ -451,20 +451,21 @@ TMH_PG_increase_refund (void *cls,
PREPARE (pg,
"find_deposits_for_refund",
"SELECT"
- " coin_pub"
- ",order_serial"
- ",amount_with_fee"
- " FROM merchant_deposits"
+ " dep.coin_pub"
+ ",dco.order_serial"
+ ",dep.amount_with_fee"
+ " FROM merchant_deposits dep"
+ " JOIN merchant_deposit_confirmations dco"
+ " USING (deposit_confirmation_serial)"
" WHERE order_serial="
" (SELECT order_serial"
" FROM merchant_contract_terms"
" WHERE order_id=$2"
- " AND paid=TRUE"
+ " AND paid"
" AND merchant_serial="
" (SELECT merchant_serial"
" FROM merchant_instances"
" WHERE merchant_id=$1))");
-
GNUNET_log (GNUNET_ERROR_TYPE_DEBUG,
"Asked to refund %s on order %s\n",
TALER_amount2s (refund),