Have you tried cleaning the contacts with a cotton bud and a (tiny) amount of nail polish remover? If it's been stored at any point without the black plastic cap then it's possible it's just dirty. Likewise do the ones on the camera, but do it with it upside down to avoid getting crud inside the camera itself.
Cheers,
James