Hello cc12313
It seems that the power jack (or the main IC that is has) that is responsible for charging the battery and/or providing the current to the motherboard is faulty.
You may want to get it diagnosed by the professionals at an authorized service center, and if required, get the circuit replaced altogether.
It may cost you a few bucks but it would give you a hassle-free user-experience in a long run.
Let me know if any further information/assistance is needed. Good Luck!!