1

I've received this exception multiple times over the past few days:

PayPal.Exception.ConnectionException Invalid HTTP response The underlying connection was closed: An unexpected error occurred on a send.

PayPal.Exception.ConnectionException: Invalid HTTP response The underlying connection was closed: An unexpected error occurred on a send. at PayPal.HttpConnection.Execute(String payLoad, HttpWebRequest httpRequest) at PayPal.APIService.MakeRequestUsing(IAPICallPreHandler apiCallHandler) at PayPal.PayPalAPIInterfaceService.PayPalAPIInterfaceServiceService.SetExpressCheckout(SetExpressCheckoutReq setExpressCheckoutReq, String apiUserName)

I can't track down what's causing it - nor is there much information out there about the error.

This is happening when we initiate a request to PayPal to get an auth token back (so customers are never redirected to PayPal from our site).

The error seems to happen very infrequently - we run a busy site and the exception's only came through a few times and have taken many PayPal orders, so it's not affecting the majority of customers.

Thanks Steven

Steven Sproat
  • 4,398
  • 4
  • 27
  • 40
  • Did you ever find a cause? – dmeglio Apr 20 '16 at 12:45
  • Nope, this fixed itself magically. We did discover that our SSL certificate had a problem with an immediate certificate in the chain (somehow our SSL configuration reverted, as we did have an A rating on qualis SSL checker, and it dropped to a B around the time we had an issue). After we fixed the certificate, the number of errors dropped off a lot, but we'd still get very infrequent instances of the error, which made me wonder if Paypal was doing some kind of caching, 4-5 days after the SSL change the errors stopped completely. Very very odd! :) – Steven Sproat Apr 21 '16 at 09:14
  • FYI, the last time it happened was on the 5th of April 2016. – Steven Sproat Apr 21 '16 at 09:15
  • 1
    I just want to share what my problem was since I think it is different than yours. I was using the PayPal API 1.6.0.0. It turns out (somehow I never got the email notice?) That in March 2016 PayPal disabled everything except TLS 1.2 on their sandbox server. TLS 1.2 support was added in their 1.7.0 DLL. Older versions apparently throw this same error when attempting to connect to a TLS 1.2 server when only supporting older versions of TLS/SSL. Hope that helps someone! – dmeglio Apr 21 '16 at 12:29
  • Thanks - I did some reading on the issue myself at the time and found an official post by Paypal saying that users should upgrade. We're using 1.7.0 here so that wasn't our issue and made me think it was related to SSL on our end. – Steven Sproat Apr 21 '16 at 15:48

0 Answers0