Checkout denies test card, says I'm in live mode, despite using test API key

This site has been in production for about a year, using the live API key. I’m setting up a new local development environment, using the test API key, but checkout in the local environment claims I’m in live mode, and rejects the test card. This is very much not the case - the key in use is the test key.

Am I doing something wrong here?

edit: Snipcart v2, by the way, since subscriptions aren’t available in v3.