My guess is you have to take it apart and clean the contacts. Not really an easy fix, but doable without specialized equipment.
Apple will probably fix it for standard rates, which is $100-ish. If it's jailbroken, do a factory restore before you take it in.