Pamela's measurements of magnetospheric effects on high-energy solar particles