aboutsummaryrefslogtreecommitdiff
path: root/src/backend/taler-merchant-httpd_proposal.c
diff options
context:
space:
mode:
Diffstat (limited to 'src/backend/taler-merchant-httpd_proposal.c')
-rw-r--r--src/backend/taler-merchant-httpd_proposal.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/backend/taler-merchant-httpd_proposal.c b/src/backend/taler-merchant-httpd_proposal.c
index bb9ccbb0..107f93cf 100644
--- a/src/backend/taler-merchant-httpd_proposal.c
+++ b/src/backend/taler-merchant-httpd_proposal.c
@@ -221,6 +221,7 @@ proposal_put (struct MHD_Connection *connection,
json_t *merchant;
struct GNUNET_TIME_Absolute timestamp;
struct GNUNET_TIME_Absolute refund_deadline;
+ struct GNUNET_TIME_Absolute wire_transfer_deadline;
struct GNUNET_TIME_Absolute pay_deadline;
struct GNUNET_JSON_Specification spec[] = {
TALER_JSON_spec_amount ("amount", &total),
@@ -239,6 +240,8 @@ proposal_put (struct MHD_Connection *connection,
&refund_deadline),
GNUNET_JSON_spec_absolute_time ("pay_deadline",
&pay_deadline),
+ GNUNET_JSON_spec_absolute_time ("wire_transfer_deadline",
+ &wire_transfer_deadline),
GNUNET_JSON_spec_end ()
};
enum GNUNET_DB_QueryStatus qs;
@@ -472,6 +475,17 @@ proposal_put (struct MHD_Connection *connection,
"Impossible to parse the order");
}
+ if (wire_transfer_deadline.abs_value_us <
+ refund_deadline.abs_value_us)
+ {
+ GNUNET_JSON_parse_free (spec);
+ return TMH_RESPONSE_reply_arg_invalid
+ (connection,
+ TALER_EC_PARAMETER_MALFORMED,
+ "order:wire_transfer_deadline;order:refund_deadline");
+ }
+
+
/* check contract is well-formed */
if (GNUNET_OK != check_products (products))
{