iPhone 4 Stopped Charging
From iPhone and iPod touch: Charging the battery:


  If your battery doesn't charge, or if your device shows a low-battery image, black screen, or "accessory not supported" alert, follow these steps.
  
  
  Inspect the connector at the bottom of the phone:
  
  Make sure that there are no bent pins in the connector.
  Make sure that the connector is free from debris.
  If there are bent pins or debris, please contact Apple Support.
  
  Otherwise, continue troubleshooting.
  Make sure that the outlet you're using works.
  Make sure that the Apple USB cable and Apple USB power adapter work.
  Plug the device in to power and let it charge until your device turns on. This could take between 10 and 30 minutes. If you don't have an Apple USB power adapter, try connecting to a computer's high-power USB 2.0 port (not a keyboard). The computer must be on.
  If the device still exhibits an issue, try turning your device off and then on again while connected to power.
  If the issue persists, please contact Apple Support.