summaryrefslogtreecommitdiff
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.c15
1 files changed, 11 insertions, 4 deletions
diff --git a/src/backend/taler-merchant-httpd_proposal.c b/src/backend/taler-merchant-httpd_proposal.c
index 59bd62a8..df69bb68 100644
--- a/src/backend/taler-merchant-httpd_proposal.c
+++ b/src/backend/taler-merchant-httpd_proposal.c
@@ -138,7 +138,6 @@ proposal_put (struct MHD_Connection *connection,
struct TALER_ProposalDataPS pdps;
struct GNUNET_CRYPTO_EddsaSignature merchant_sig;
struct TALER_Amount total;
- struct TALER_Amount max_fee;
const char *order_id;
json_t *products;
json_t *merchant;
@@ -148,9 +147,9 @@ proposal_put (struct MHD_Connection *connection,
struct GNUNET_JSON_Specification spec[] = {
TALER_JSON_spec_amount ("amount", &total),
GNUNET_JSON_spec_string ("order_id", &order_id),
- TALER_JSON_spec_amount ("max_fee", &max_fee),
- /* The following entries we don't actually need, except to check that
- the order is well-formed */
+ /**
+ * The following entries we don't actually need,
+ * except to check that the order is well-formed */
GNUNET_JSON_spec_json ("products", &products),
GNUNET_JSON_spec_json ("merchant", &merchant),
GNUNET_JSON_spec_absolute_time ("timestamp", &timestamp),
@@ -229,6 +228,14 @@ proposal_put (struct MHD_Connection *connection,
}
if (NULL == json_object_get (order,
+ "max_fee"))
+ {
+ json_object_set_new (order,
+ "max_fee",
+ TALER_JSON_from_amount (&default_max_deposit_fee));
+ }
+
+ if (NULL == json_object_get (order,
"wire_fee_amortization"))
{
json_object_set_new (order,