Cosmic-ray observations of the heliosphere with the PAMELA experiment