If you haven't replaced the battery yet lets NOT DO THAT!!
Instead lets walk through a basic diagnostic process to find out whats wrong:
- You need to ask the customer for some level of background info like what happened when it stopped working, Did the system get banged or dropped? Did the system encounter a liquid spill and when. Did it get wet from rain or sitting down on a wet surface?
- Next inspect the system for physical damage what do you see?
- In laptops inspect the MagSafe connections and the MagSafe charger do they look good? Refer to this Apple T/N: Apple Portables: Troubleshooting MagSafe adapters making sure the adapter is the correct one and the cord and the connector ends are in good shape.
- Test their adapter with the system what happens. Test the system with your known good adapter what happens
- If the system has an onboard battery tester try it out what does it show
- Listen... Do you here the fans
- Do an SMC reset and check again any sound?
Now lets get the answers and post them here under each bullet point.
OK, so the MagSafe connector was dirty which is why it was having troubles.
When you replace a battery you need to let the system charge the battery fully, then you need to drain it fully and do a SMC reset. We do this again a second time! This calibrates SMC to learn the low point of the battery. Without going through this calibrating process you can encounter odd behavior of the system shutting down (sleep mode and/or deep sleep mode depending on what you have set in energy saver).
How to reset the System Management Controller (SMC) on your Mac & Use the Energy Saver settings on your Mac
Here's some other sites run down on battery calibration:
I would also down load this free app: CoconutBattery This is the goto to see whats happening with your battery, MagSafe & the systems charging logic.