Macbook Air - old battery charges, replacement battery does not
The comments are correct: despite buying 2 different batteries from eBay sellers with good reputations, both were faulty. I bought a new battery from iFixit, which works fine. 

Lesson learned: don't buy batteries on eBay.