title: cURL PHP hangs just after receive headers
body: <p>Using PHP i have been able to connect to and process successful purchases with the paypal sandbox endpoint:</p>
  
  <pre><code>https://api-3t.sandbox.paypal.com/nvp
  </code></pre>
  
  <p>However when i tried to move this application live, i hit a few problems.
  Firstly, the sandbox account uses a signiture, and the live account uses a certificate. So the new endpoint i have to use it:</p>
  
  <pre><code>https://api.paypal.com/nvp
  </code></pre>
  
  <p>getting rid of the "-3t" as i am using certificate. </p>
  
  <p>I then send post data in vb.net to this address, which generates a token i can then send out. This works fine, however when the user has come back to our site after confirming in paypal (the ReturnURL) i am using curl to process the next commanded needed for the api, the method: GetExpressCheckoutDetails. Which then if it is a success i move onto using curl on another page to complete the payment using method: DoExpressCheckoutPayment</p>
  
  <p>The problem is curl hangs and the page does not load. </p>
  
  <p>Using a linux terminal if i type try to use curl to the api it just hangs also.</p>
  
  <pre><code>curl --verbose https://api.paypal.com/nvp
  </code></pre>
  
  <p>the response i get, goes through the handshake and then after the headers, just stops. But it does not return to the comnmand line.
  Here is curl output:</p>
  
  <pre><code>User-Agent: curl/7.15.5 (x86_64-redhat-linux-gnu) libcurl/7.15.5 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5
  &gt; Host: api.paypal.com
  &gt; Accept: */*
  &gt;
  * About to connect() to api.paypal.com port 443
  *   Trying 173.0.84.66... connected
  * Connected to api.paypal.com (173.0.84.66) port 443
  * successfully set certificate verify locations:
  *   CAfile: /etc/pki/tls/certs/ca-bundle.crt
    CApath: none
  * SSLv2, Client hello (1):
  SSLv3, TLS handshake, Server hello (2):
  SSLv3, TLS handshake, CERT (11):
  SSLv3, TLS handshake, Request CERT (13):
  SSLv3, TLS handshake, Server finished (14):
  SSLv3, TLS handshake, CERT (11):
  SSLv3, TLS handshake, Client key exchange (16):
  SSLv3, TLS change cipher, Client hello (1):
  SSLv3, TLS handshake, Finished (20):
  SSLv3, TLS change cipher, Client hello (1):
  SSLv3, TLS handshake, Finished (20):
  SSL connection using DES-CBC3-SHA
  * Server certificate:
  *        subject: /C=US/ST=California/L=San Jose/O=PayPal, Inc./OU=PayPal Production/CN=api.paypal.com
  *        start date: 2013-07-03 00:00:00 GMT
  *        expire date: 2015-07-04 23:59:59 GMT
  *        subjectAltName: api.paypal.com matched
  *        issuer: /C=US/O=VeriSign, Inc./OU=VeriSign Trust Network/OU=Terms of use at https://www.verisign.com/rpa (c)10/CN=VeriSign Class 3 Secure Server CA - G3
  * SSL certificate verify ok.
  &gt; GET /nvp HTTP/1.1
  &gt; User-Agent: curl/7.15.5 (x86_64-redhat-linux-gnu) libcurl/7.15.5 OpenSSL/0.9.8b zlib/1.2.3 libidn/0.6.5
  &gt; Host: api.paypal.com
  &gt; Accept: */*
  &gt;
  </code></pre>
  
  <p>(This is not because i have not sent a method, or user or pwd, as even when i do it, it does the same)
  I am suspecting it has something to do with the API Certificate!
  Anyone have any ideas what is happening here, thanks.</p>
  
  <p>EDIT: 
  Use wget for test, to get rid of the possibility of it being a curl problem:</p>
  
  <pre><code>wget https://api.paypal.com/nvp
  </code></pre>
  
  <p>Reply is:</p>
  
  <pre><code>--2013-10-08 08:45:53-- https://api.paypal.com/nvp
  Resolving api.paypal.com.. 173.0.88.98, 173.0.84.98, 173.0.84.66, ...
  Connecting to api.paypal.com|173.0.88.98|:443... connected.
  HTTP request send, awaiting response...
  </code></pre>
  
  <p>And that is where wget hangs aswell, which proves it is not just a problem with cURL?</p>