summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorChristian Grothoff <christian@grothoff.org>2016-05-04 15:32:03 +0200
committerChristian Grothoff <christian@grothoff.org>2016-05-04 15:32:03 +0200
commit44388a35c3ca38915252ce8ed70f248a65f04350 (patch)
treebb4d1f749a37aeb365674421d4d9838d66d1176b
parent0716ec08de631c835c0821c67003f3c4adcf9dd4 (diff)
downloadmerchant-44388a35c3ca38915252ce8ed70f248a65f04350.tar.gz
merchant-44388a35c3ca38915252ce8ed70f248a65f04350.tar.bz2
merchant-44388a35c3ca38915252ce8ed70f248a65f04350.zip
break on issues
-rw-r--r--src/lib/merchant_api_pay.c12
-rw-r--r--src/lib/test_merchant_api.c4
-rw-r--r--src/lib/test_merchant_api.conf12
3 files changed, 20 insertions, 8 deletions
diff --git a/src/lib/merchant_api_pay.c b/src/lib/merchant_api_pay.c
index 3c8975d7..17c44910 100644
--- a/src/lib/merchant_api_pay.c
+++ b/src/lib/merchant_api_pay.c
@@ -393,13 +393,12 @@ TALER_MERCHANT_pay_frontend (struct GNUNET_CURL_Context *ctx,
}
}
} /* end of sanity check */
- pay_obj = json_pack ("{s:o, s:o," /* H_wire/H_contract */
+
+ pay_obj = json_pack ("{s:o," /* H_contract */
" s:I, s:o," /* transaction id, timestamp */
" s:o, s:s," /* refund_deadline, exchange */
" s:o, s:o," /* coins, max_fee */
- " s:o}", /* amount */
- "H_wire", GNUNET_JSON_from_data (&h_wire,
- sizeof (h_wire)),
+ " s:o, s:o}",/* amount, signature */
"H_contract", GNUNET_JSON_from_data (h_contract,
sizeof (struct GNUNET_HashCode)),
"transaction_id", (json_int_t) transaction_id,
@@ -408,8 +407,9 @@ TALER_MERCHANT_pay_frontend (struct GNUNET_CURL_Context *ctx,
"exchange", exchange_uri,
"coins", j_coins,
"max_fee", TALER_JSON_from_amount (max_fee),
- "amount", TALER_JSON_from_amount (amount)
- );
+ "amount", TALER_JSON_from_amount (amount),
+ "merchant_sig", GNUNET_JSON_from_data (merchant_sig,
+ sizeof (struct TALER_MerchantSignatureP)));
if (0 != execution_deadline.abs_value_us)
{
diff --git a/src/lib/test_merchant_api.c b/src/lib/test_merchant_api.c
index ebf21bed..77450b72 100644
--- a/src/lib/test_merchant_api.c
+++ b/src/lib/test_merchant_api.c
@@ -1102,7 +1102,7 @@ interpreter_run (void *cls)
timestamp = GNUNET_TIME_absolute_get ();
GNUNET_TIME_round_abs (&timestamp);
memset (&merchant_sig, 0, sizeof (merchant_sig)); // FIXME: init properly!
-
+ GNUNET_break (0);
cmd->details.pay.ph
= TALER_MERCHANT_pay_wallet (ctx,
MERCHANT_URI "pay",
@@ -1320,7 +1320,7 @@ run (void *cls)
{ .oc = OC_ADMIN_ADD_INCOMING,
.label = "create-reserve-1",
.expected_response_code = MHD_HTTP_OK,
- .details.pay.wire_details = "{ \"type\":\"test\", \"bank_uri\":\"http://localhost/\", \"account_number\":62 }",
+ .details.admin_add_incoming.wire = "{ \"type\":\"test\", \"bank_uri\":\"http://localhost/\", \"account_number\":62 }",
.details.admin_add_incoming.amount = "EUR:5.01" },
/* Withdraw a 5 EUR coin, at fee of 1 ct */
{ .oc = OC_WITHDRAW_SIGN,
diff --git a/src/lib/test_merchant_api.conf b/src/lib/test_merchant_api.conf
index 0d8b6b4b..7e1d6e4b 100644
--- a/src/lib/test_merchant_api.conf
+++ b/src/lib/test_merchant_api.conf
@@ -121,3 +121,15 @@ fee_deposit = EUR:0.01
fee_refresh = EUR:0.03
fee_refund = EUR:0.01
rsa_keysize = 1024
+
+[coin_eur_5]
+value = EUR:5
+duration_overlap = 5 minutes
+duration_withdraw = 7 days
+duration_spend = 2 years
+duration_legal = 3 years
+fee_withdraw = EUR:0.01
+fee_deposit = EUR:0.01
+fee_refresh = EUR:0.03
+fee_refund = EUR:0.01
+rsa_keysize = 1024