This question already has an answer here:
I have a MacBook Pro early 2015.Recently I am facing an issue with the battery. It's not charging.
The MacBook works fine when connected to charger, but it turns off when the charger is removed.
I did a SMC reset, tried another charger too no results. I also tested my charger on another Mac which works just fine.
I took it to the Apple service centre and they said I need to replace the logic board which costs tons of money.
I am confused, do I really need to spend this much money if my laptop just works fine with charger plugged in?
Please suggest me what could be the best solution. Thanks in advance.