From cecafaab58860d7b49ce72d139270f8517ea6025 Mon Sep 17 00:00:00 2001 From: Christian Grothoff Date: Tue, 23 Jun 2020 19:51:47 +0200 Subject: use and handle all /pay status codes --- src/lib/merchant_api_post_order_pay.c | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'src/lib') diff --git a/src/lib/merchant_api_post_order_pay.c b/src/lib/merchant_api_post_order_pay.c index 477c3a31..27f380f8 100644 --- a/src/lib/merchant_api_post_order_pay.c +++ b/src/lib/merchant_api_post_order_pay.c @@ -245,7 +245,6 @@ handle_pay_finished (void *cls, GNUNET_log (GNUNET_ERROR_TYPE_INFO, "/pay completed with response code %u\n", (unsigned int) response_code); - // FIXME: check response codes here match documentation match what service generates! switch (response_code) { case 0: @@ -306,6 +305,11 @@ handle_pay_finished (void *cls, * or the merchant is buggy (or API version conflict); * just pass JSON reply to the application */ break; + case MHD_HTTP_PAYMENT_REQUIRED: + /* was originally paid, but then refunded */ + hr.ec = TALER_JSON_get_error_code (json); + hr.hint = TALER_JSON_get_error_hint (json); + break; case MHD_HTTP_FORBIDDEN: hr.ec = TALER_JSON_get_error_code (json); hr.hint = TALER_JSON_get_error_hint (json); -- cgit v1.2.3