Hi,
The problem may lie inside the laptop where the battery and laptop meets. Does your laptop say it's charging while it's connected to your laptop because if it does the problem may lie in your battery. If it doesn't say that it's charging that means it's with the motherboard that has the problem. A repair is need to fix that issue specially with the connection of battery to the motherboard.