Macbook Air - old battery charges, replacement battery does not Apologies if this is a duplicate, but I have searched and not found anyone with the specific problem I'm experiencing.

My MacBook Air (A1466, Mid 2012) has a third party battery that is nearing the end of its life. It has about 250 cycles, but can only power the computer for about 30 minutes.

I have bought 2 second hand official Apple batteries from different eBay sellers. The Air doesn't recognise either of them.

With my current (old but working) third-party battery:


Plugging in the PSU charges the battery to full capacity
Capacity drops to about 50% within 30 minutes
I have to plug in again, or the computer will shut off without warning


With either of the replacement batteries:


The computer doesn't recognise the battery
Coconut Battery and System Profiler report no battery present
Computer shuts off immediately if power cord removed


Things I have tried:


Resetting PMU
Resetting NVRAM
Connecting power cord first, and then the battery terminal second


The last step gets the computer to recognise the replacement battery, but I cannot get it to charge. 


I can read the battery's serial number in Coconut Battery, but it is reported as zero capacity. 
The system battery level menu extra reports the battery as 80% full, but not charging
Disconnecting the power cord causes the computer to shut off immediately
The mac cannot be started up from battery alone.


If I replace my old battery, it charges and performs as normal.

This is weird. Surely I can't have bought 2 separate dud batteries? Any advice on how to proceed would be appreciated.
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.