diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/backend/taler-merchant-httpd_post-orders-ID-abort.c | 3 | ||||
-rw-r--r-- | src/lib/merchant_api_post_order_abort.c | 4 | ||||
-rw-r--r-- | src/testing/test_merchant_api.c | 8 | ||||
-rw-r--r-- | src/testing/testing_api_cmd_abort_order.c | 12 | ||||
-rw-r--r-- | src/testing/testing_api_cmd_pay_order.c | 2 |
5 files changed, 19 insertions, 10 deletions
diff --git a/src/backend/taler-merchant-httpd_post-orders-ID-abort.c b/src/backend/taler-merchant-httpd_post-orders-ID-abort.c index 89e13095..940db372 100644 --- a/src/backend/taler-merchant-httpd_post-orders-ID-abort.c +++ b/src/backend/taler-merchant-httpd_post-orders-ID-abort.c @@ -352,7 +352,7 @@ generate_success_response (struct AbortContext *ac) if (0 != json_array_append_new ( refunds, - json_pack ("{s:I, s:O, s:o s:o s:o}", + json_pack ("{s:I, s:O}", "exchange_http_status", (json_int_t) rdi->http_status, "exchange_reply", @@ -985,7 +985,6 @@ TMH_post_orders_ID_abort (const struct TMH_RequestHandler *rh, res ? "OK" : "FAILED"); return res; } - { enum GNUNET_GenericReturnValue ret; diff --git a/src/lib/merchant_api_post_order_abort.c b/src/lib/merchant_api_post_order_abort.c index f1a8fc42..f3c8224d 100644 --- a/src/lib/merchant_api_post_order_abort.c +++ b/src/lib/merchant_api_post_order_abort.c @@ -138,7 +138,7 @@ check_abort_refund (struct TALER_MERCHANT_OrderAbortHandle *oah, uint32_t exchange_status; json_t *exchange_reply; struct GNUNET_JSON_Specification spec_es[] = { - GNUNET_JSON_spec_uint32 ("exchange_status", + GNUNET_JSON_spec_uint32 ("exchange_http_status", &exchange_status), GNUNET_JSON_spec_json ("exchange_reply", &exchange_reply), @@ -179,7 +179,7 @@ check_abort_refund (struct TALER_MERCHANT_OrderAbortHandle *oah, { struct TALER_RefundConfirmationPS rr = { - .purpose.purpose = htonl (TALER_SIGNATURE_MERCHANT_REFUND), + .purpose.purpose = htonl (TALER_SIGNATURE_EXCHANGE_CONFIRM_REFUND), .purpose.size = htonl (sizeof (rr)), .h_contract_terms = oah->h_contract_terms, .coin_pub = oah->coins[i].coin_pub, diff --git a/src/testing/test_merchant_api.c b/src/testing/test_merchant_api.c index 2f30ca7a..b02d8c8b 100644 --- a/src/testing/test_merchant_api.c +++ b/src/testing/test_merchant_api.c @@ -1180,15 +1180,15 @@ run (void *cls, 10, 10), #endif + TALER_TESTING_cmd_batch ("pay-again", + pay_again), + TALER_TESTING_cmd_batch ("pay-abort", + pay_abort), TALER_TESTING_cmd_batch ("refund", refund), TALER_TESTING_cmd_batch ("tip", tip), #if 0 - TALER_TESTING_cmd_batch ("pay-again", - pay_again), - TALER_TESTING_cmd_batch ("pay-abort", - pay_abort), TALER_TESTING_cmd_history_default_start ("history-default-start", merchant_url, MHD_HTTP_OK, diff --git a/src/testing/testing_api_cmd_abort_order.c b/src/testing/testing_api_cmd_abort_order.c index d2f4e2aa..c44684e4 100644 --- a/src/testing/testing_api_cmd_abort_order.c +++ b/src/testing/testing_api_cmd_abort_order.c @@ -152,7 +152,15 @@ build_coins (struct TALER_MERCHANT_AbortCoin **ac, TALER_TESTING_get_trait_url (coin_cmd, TALER_TESTING_UT_EXCHANGE_BASE_URL, &icoin->exchange_url)); - // FIXME: initialize icon->amount_with_fee! + { + const struct TALER_Amount *denom_value; + GNUNET_assert (GNUNET_OK + == TALER_TESTING_get_trait_amount_obj (coin_cmd, + 0, + &denom_value)); + icoin->amount_with_fee = *denom_value; + } + } } return GNUNET_OK; @@ -359,7 +367,7 @@ abort_cleanup (void *cls, { struct AbortState *as = cls; - if (NULL != as->acs) + if (NULL != as->oah) { GNUNET_log (GNUNET_ERROR_TYPE_WARNING, "Command `%s' did not complete.\n", diff --git a/src/testing/testing_api_cmd_pay_order.c b/src/testing/testing_api_cmd_pay_order.c index ee47ae5e..c576c316 100644 --- a/src/testing/testing_api_cmd_pay_order.c +++ b/src/testing/testing_api_cmd_pay_order.c @@ -508,6 +508,8 @@ pay_traits (void *cls, order_id), TALER_TESTING_make_trait_merchant_pub (0, merchant_pub), + TALER_TESTING_make_trait_string (0, + ps->amount_with_fee), TALER_TESTING_trait_end () }; |