The contacts (the gold connectors between the battery and the phone) may not working due to dirt, lint, or any other obstructions. Clean the contacts using a q-tip or soft toothbrush. If the contacts are bent or damaged in any other way, then they must be realigned or replaced.