diff options
author | Christian Grothoff <christian@grothoff.org> | 2020-06-23 19:51:47 +0200 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2020-06-23 19:51:47 +0200 |
commit | cecafaab58860d7b49ce72d139270f8517ea6025 (patch) | |
tree | 6d5dfadbef55aad781451dbf167f1b9d06dfd719 /src/lib | |
parent | f8c01f4b46a8391f3196889e5df7f8ebdfb6475d (diff) | |
download | merchant-cecafaab58860d7b49ce72d139270f8517ea6025.tar.gz merchant-cecafaab58860d7b49ce72d139270f8517ea6025.tar.bz2 merchant-cecafaab58860d7b49ce72d139270f8517ea6025.zip |
use and handle all /pay status codes
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/merchant_api_post_order_pay.c | 6 |
1 files changed, 5 insertions, 1 deletions
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); |