diff options
author | Christian Grothoff <grothoff@gnunet.org> | 2023-04-01 15:24:16 +0200 |
---|---|---|
committer | Christian Grothoff <grothoff@gnunet.org> | 2023-04-01 15:24:16 +0200 |
commit | 98ddd97d475d8ea8f382efb0061caaa3134cc124 (patch) | |
tree | d5a6eaa5d24dd0d15c4ef2d78df8ca07bf4f7985 /src/testing/testing_api_cmd_pay_order.c | |
parent | 12c4693a67b7e993e7d6504777e4fbbb76f43dda (diff) | |
download | merchant-98ddd97d475d8ea8f382efb0061caaa3134cc124.tar.gz merchant-98ddd97d475d8ea8f382efb0061caaa3134cc124.tar.bz2 merchant-98ddd97d475d8ea8f382efb0061caaa3134cc124.zip |
-get tests to pass
Diffstat (limited to 'src/testing/testing_api_cmd_pay_order.c')
-rw-r--r-- | src/testing/testing_api_cmd_pay_order.c | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/src/testing/testing_api_cmd_pay_order.c b/src/testing/testing_api_cmd_pay_order.c index cff679a8..3a4e0cc7 100644 --- a/src/testing/testing_api_cmd_pay_order.c +++ b/src/testing/testing_api_cmd_pay_order.c @@ -254,17 +254,20 @@ pay_cb (void *cls, if (MHD_HTTP_OK == pr->hr.http_status) { ps->merchant_sig = pr->details.success.merchant_sig; +#if FIXME // FIXME: check if pr->details.success.pos_confirmation; // for that, get pos_secret from ps->proposal_reference CMD and amount from pay/order creation cmd using traits struct TALER_Amount amount_with_fee; GNUNET_assert (GNUNET_OK == TALER_string_to_amount (ps->amount_with_fee, &amount_with_fee)); + // FIXME: crashes here, because ps->pos_key is NULL ps->pos_confirmation = TALER_build_pos_confirmation (ps->pos_key, ps->pos_alg, &amount_with_fee, GNUNET_TIME_timestamp_get()); ps->pos_confirmation = pr->details.success.pos_confirmation; +#endif } TALER_TESTING_interpreter_next (ps->is); } @@ -294,8 +297,8 @@ pay_run (void *cls, const struct TALER_PrivateContractHashP *h_proposal; struct TALER_Amount total_amount; struct TALER_Amount max_fee; - const char *error_name; - unsigned int error_line; + const char *error_name = NULL; + unsigned int error_line = 0; struct TALER_MERCHANT_PayCoin *pay_coins; unsigned int npay_coins; const struct TALER_MerchantSignatureP *merchant_sig; @@ -312,6 +315,8 @@ pay_run (void *cls, TALER_TESTING_get_trait_contract_terms (proposal_cmd, &contract_terms)) TALER_TESTING_FAIL (is); + if (NULL == contract_terms) + TALER_TESTING_FAIL (is); { /* Get information that needs to be put verbatim in the * deposit permission */ |