[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[taler-merchant] branch master updated: check on order creation
From: |
gnunet |
Subject: |
[taler-merchant] branch master updated: check on order creation |
Date: |
Fri, 01 Nov 2019 22:18:51 +0100 |
This is an automated email from the git hooks/post-receive script.
dold pushed a commit to branch master
in repository merchant.
The following commit(s) were added to refs/heads/master by this push:
new 3292bbb check on order creation
3292bbb is described below
commit 3292bbb94f53b867c91ddcb22cce84c8af9d4449
Author: Florian Dold <address@hidden>
AuthorDate: Fri Nov 1 22:18:48 2019 +0100
check on order creation
---
src/backend/taler-merchant-httpd_proposal.c | 14 ++++++++++++++
1 file changed, 14 insertions(+)
diff --git a/src/backend/taler-merchant-httpd_proposal.c
b/src/backend/taler-merchant-httpd_proposal.c
index bb9ccbb..107f93c 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))
{
--
To stop receiving notification emails like this one, please contact
address@hidden.
[Prev in Thread] |
Current Thread |
[Next in Thread] |
- [taler-merchant] branch master updated: check on order creation,
gnunet <=