diff options
author | Christian Grothoff <christian@grothoff.org> | 2019-11-23 23:04:11 +0100 |
---|---|---|
committer | Christian Grothoff <christian@grothoff.org> | 2019-11-23 23:04:11 +0100 |
commit | 6362ade0e6ee926beab51000ad27ae3d2bcb190c (patch) | |
tree | 2fd9c9c97d039a6aa90efcf1647382bd8eff5d64 /src/lib/merchant_api_pay.c | |
parent | 8e7243af8cab46ce70ef74a95ec0e4c030692f61 (diff) | |
download | merchant-6362ade0e6ee926beab51000ad27ae3d2bcb190c.tar.gz merchant-6362ade0e6ee926beab51000ad27ae3d2bcb190c.tar.bz2 merchant-6362ade0e6ee926beab51000ad27ae3d2bcb190c.zip |
adapt to exchange API changes
Diffstat (limited to 'src/lib/merchant_api_pay.c')
-rw-r--r-- | src/lib/merchant_api_pay.c | 18 |
1 files changed, 9 insertions, 9 deletions
diff --git a/src/lib/merchant_api_pay.c b/src/lib/merchant_api_pay.c index cf25337e..45fa769c 100644 --- a/src/lib/merchant_api_pay.c +++ b/src/lib/merchant_api_pay.c @@ -274,7 +274,7 @@ check_coin_history (const struct TALER_MERCHANT_PaidCoin *pc, /** - * We got a 403 response back from the exchange (or the merchant). + * We got a 409 response back from the exchange (or the merchant). * Now we need to check the provided cryptographic proof that the * coin was actually already spent! * @@ -284,8 +284,8 @@ check_coin_history (const struct TALER_MERCHANT_PaidCoin *pc, * @return #GNUNET_OK if proof checks out */ static int -check_forbidden (struct TALER_MERCHANT_Pay *ph, - const json_t *json) +check_conflict (struct TALER_MERCHANT_Pay *ph, + const json_t *json) { json_t *history; struct TALER_CoinSpendPublicKeyP coin_pub; @@ -361,15 +361,15 @@ 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_FORBIDDEN: - if (GNUNET_OK != check_forbidden (ph, - json)) + case MHD_HTTP_CONFLICT: + if (GNUNET_OK != check_conflict (ph, + json)) { GNUNET_break_op (0); response_code = 0; } break; - case MHD_HTTP_UNAUTHORIZED: + case MHD_HTTP_FORBIDDEN: /* Nothing really to verify, merchant says one of the * signatures is invalid; as we checked them, this * should never happen, we should pass the JSON reply @@ -426,9 +426,9 @@ handle_pay_finished (void *cls, merchant is buggy (or API version conflict); just pass JSON reply to the application */ break; - case MHD_HTTP_FORBIDDEN: + case MHD_HTTP_CONFLICT: break; - case MHD_HTTP_UNAUTHORIZED: + case MHD_HTTP_FORBIDDEN: /* Nothing really to verify, merchant says one of the signatures is invalid; as we checked them, this should never happen, we should pass the JSON |