diff options
author | Florian Dold <florian.dold@gmail.com> | 2017-02-12 18:13:49 +0100 |
---|---|---|
committer | Florian Dold <florian.dold@gmail.com> | 2017-02-12 18:13:49 +0100 |
commit | f6aca4dce222986bfcbdcecac3aa04229eb870a9 (patch) | |
tree | 313ce8eceb3a93636f228acbb56c25853517dc2d /src | |
parent | 88f323a71e891c609874d1bb4fa11acebbb72ac0 (diff) | |
download | merchant-f6aca4dce222986bfcbdcecac3aa04229eb870a9.tar.gz merchant-f6aca4dce222986bfcbdcecac3aa04229eb870a9.tar.bz2 merchant-f6aca4dce222986bfcbdcecac3aa04229eb870a9.zip |
set refund deadline if not in frontend offer
Diffstat (limited to 'src')
-rw-r--r-- | src/backend/taler-merchant-httpd_proposal.c | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/backend/taler-merchant-httpd_proposal.c b/src/backend/taler-merchant-httpd_proposal.c index 0552d7ea..db728aa8 100644 --- a/src/backend/taler-merchant-httpd_proposal.c +++ b/src/backend/taler-merchant-httpd_proposal.c @@ -184,6 +184,12 @@ proposal_put (struct MHD_Connection *connection, json_t *order) json_object_set (order, "timestamp", GNUNET_JSON_from_time_abs (now)); } + if (NULL == json_string_value (json_object_get (order, "refund_deadline"))) + { + struct GNUNET_TIME_Absolute zero = { 0 }; + json_object_set (order, "refund_deadline", GNUNET_JSON_from_time_abs (zero)); + } + /* extract fields we need to sign separately */ res = TMH_PARSE_json_data (connection, order, spec); if (GNUNET_NO == res) |