title: Cannot connect to PayPal API via cURL
body: <p>I'm trying to set up PayPal Express Payment via the "Classic" NVP API.</p>
  
  <p>Trying to connect from my server to the PayPal-Sandbox using cURL, the connection stalls and times out after about 2 minutes.</p>
  
  <p>I'm using the <a href="https://www.x.com/developers/paypal/documentation-tools/express-checkout/gs_expresscheckout" rel="noreferrer">example call</a> from the docs:</p>
  
  
  
  <pre class="lang-none prettyprint-override"><code>curl -v --insecure  https://api-3t.sandbox.paypal.com/nvp  -d  "USER=platfo_1255077030_biz_api1.gmail.com&amp;PWD=1255077037&amp;SIGNATURE=Abg0gYcQyxQvnf2HDJkKtA-p6pqhA1k-KTYE0Gcy1diujFio4io5Vqjf&amp;METHOD=SetExpressCheckout&amp;VERSION=78&amp;PAYMENTREQUEST_0_PAYMENTACTION=SALE&amp;PAYMENTREQUEST_0_AMT=19&amp;PAYMENTREQUEST_0_CURRENCYCODE=USD&amp;cancelUrl=http://www.yourdomain.com/cancel.html&amp;returnUrl=http://www.yourdomain.com/success.html"
  </code></pre>
  
  <p>Shell output is: </p>
  
  <pre class="lang-none prettyprint-override"><code>* About to connect() to api-3t.sandbox.paypal.com port 443 (#0)
  * Trying 173.0.82.83... Connection timed out
  * couldn't connect to host
  * Closing connection #0
  curl: (7) couldn't connect to host
  </code></pre>
  
  <p>When I try to do this via PHP <code>curl</code> I don't get any errors and simply an empty resource handle.</p>
  
  <p>I can easily do the requests (and get the correct data back) from my local machine and from other servers that I can access so I guess this is some server side misconfiguration going on. Not being a server person I am a little clueless.</p>
  
  <p>cURL is enabled and logs the following in <code>phpinfo</code>:</p>
  
  <pre class="lang-none prettyprint-override"><code>libcurl/7.21.0 OpenSSL/0.9.8o zlib/1.2.3.4 libidn/1.15 libssh2/1.2.6
  </code></pre>
  
  <p>openSSL is enabled as well. Also, I'm having the same issues when trying to connect to the live version of the API.</p>