Have you noticed that it stops charging when you move the phone or charging cord while it's charging? That's an indication of a bad cord.
If it just completely stops taking a charge no matter what, that could either mean a bad battery, or bad charging port. I would try another charger or USB cord first, and if that doesn't work, try a new battery. If that doesn't work, it's most likely the charging port on the phone itself, which means you will need a replacement. I'm not sure if the charging port is considered warranty or insurance, though.
Also, I wouldn't suggest using a computer to try to get a substantial charge out of it. Charging via computer is very slow, and does not charge near as well as a wall charger.