Using HTTPS and httpWebRequest
Changing the URL to https should be enough provided that there are no issues with the certificate.
SSL will check for 3 things when it comes to certificates:
- The cert was issued to the URI that you are hitting
- The cert is not expired
- The cert was issued by a trusted authority (e.g.: Verisign)
Of these criteria, #3 is the most commonly failed check. You can programatically ignore any or all of these errors (at your own risk). Here is an example on how to do that.
That said, if this is for the Paypal api, you should not have any certificate errors.