Try an SMC reset.
Disconnect all external devices.
If the battery is bad, then it can interfere with powering on the laptop or cause issues with the Magsafe charger. Try disconnecting the battery and power on the laptop using only the charger.
Sometimes an Apple power adapter can get into a weird state when the laptop has charging/battery issues. When this happens you need to unplug the charger from the electrical outlet for a minute to reset the internal circuitry of the power adapter.
Even if this is a 2012 "Vintage" laptop you may still be able to have Apple replace the battery for you. I highly recommend an original Apple battery if you have a choice since the quality of third party Lithium-ion batteries is extremely poor. If you need to purchase a third party battery, then OWC is your best option.
Edit: Also make sure you are using a large enough power adapter for that laptop.