diff options
author | priscilla <priscilla.huang@efrei.net> | 2022-12-21 11:26:50 -0500 |
---|---|---|
committer | priscilla <priscilla.huang@efrei.net> | 2022-12-21 11:26:50 -0500 |
commit | a36a978df4d0a4bc065ebd1e4ad08cdb9e19d7ea (patch) | |
tree | fe2d307ab0823bc9eb6377055ef3df8243567565 /src/lib | |
parent | 97ccd1b689b0ce5980d76ffb9c5624bc7f6c6723 (diff) |
update using templates
Diffstat (limited to 'src/lib')
-rw-r--r-- | src/lib/merchant_api_post_using_templates.c | 13 |
1 files changed, 6 insertions, 7 deletions
diff --git a/src/lib/merchant_api_post_using_templates.c b/src/lib/merchant_api_post_using_templates.c index 278fcac8..9a4aa93d 100644 --- a/src/lib/merchant_api_post_using_templates.c +++ b/src/lib/merchant_api_post_using_templates.c @@ -101,6 +101,10 @@ handle_post_using_templates_finished (void *cls, break; case MHD_HTTP_NO_CONTENT: break; + case MHD_HTTP_NOT_ACCEPTABLE: + hr.ec = TALER_JSON_get_error_code (json); + hr.hint = TALER_JSON_get_error_hint (json); + break; case MHD_HTTP_BAD_REQUEST: hr.ec = TALER_JSON_get_error_code (json); hr.hint = TALER_JSON_get_error_hint (json); @@ -108,11 +112,6 @@ handle_post_using_templates_finished (void *cls, * or the merchant is buggy (or API version conflict); * just pass JSON reply to the application */ break; - case MHD_HTTP_UNAUTHORIZED: - hr.ec = TALER_JSON_get_error_code (json); - hr.hint = TALER_JSON_get_error_hint (json); - /* Nothing really to verify, merchant says we need to authenticate. */ - break; case MHD_HTTP_FORBIDDEN: hr.ec = TALER_JSON_get_error_code (json); hr.hint = TALER_JSON_get_error_hint (json); @@ -160,7 +159,7 @@ TALER_MERCHANT_using_templates_post ( struct GNUNET_CURL_Context *ctx, const char *backend_url, const char *summary, - struct TALER_Amount amount, + const struct TALER_Amount *amount, TALER_MERCHANT_UsingTemplatesPostCallback cb, void *cb_cls) { @@ -173,7 +172,7 @@ TALER_MERCHANT_using_templates_post ( summary)), GNUNET_JSON_pack_allow_null ( TALER_JSON_pack_amount ("amount", - &amount))); + amount))); utph = GNUNET_new (struct TALER_MERCHANT_UsingTemplatesPostHandle); utph->ctx = ctx; utph->cb = cb; |