Simply put it, In web.config you need change <trust level="Medium" originUrl=".*" /> to <trust level="Full" originUrl=".*" />
Full trust allows native code to execute and is a requirement for a lot of 3rd Party components, including the most popular PayPal API. Actually any asp.net shopping cart system in the world which supports PayPal Pro or PayPal Express Checkout has to run under full trust. Also major credit card processing components including nsoftware and .netcharge need to run full trust. So shopping cart systems using the components have to run under full trust too.
Please search google for more information on this.
Many thanks,
Frank