any possible reason causing galaxy s3 charging issue?

Hi, so the battery came with my galaxy s3 R530 has died and I just replaced a battery from eBay, but now my phone is having a weird issue--- it will only charge when the phone is off while charging with USB cable. I am waiting for another battery from mpj for troubleshooting. Does anyone know any other possible reason causing this issue? Thank you.