I have spent the last two days dealing with this problem, and I am extremely disappointed in how ATT has dealt with me, (I bought the phone 6 weeks ago) The problem is that the charging port does not have a cover to protect it when not being charged, so dust or any other small particle can get in there and dirty up the port, but ATT will classify this has "corrosion" to void the warranty. I went to a total of 4 stores and spent an hour on the phone with ATT and basically I was told I damaged the phone! I went to 2 different DSC, the first store did nothing more but tell me I am screwed. The second store cleaned the port and restored to factory settings. Beware though, they will tell you that you have to sign a paper admitting there is corrosion. I signed the paper but stated I did not see any sign of corrosion and disagreed with the statement. The phone in now charging, but due to the unprotected port, I am sure I will have this problem again. I have lost confidence in the phone and have no confidence in ATT. I can only imagine where their tech get their training to be deemed as qualified to diagnosis technical problems.
I suggest you buying a battery charger that will charge the battery independently.