title: on curl "connect.stripe.com/oauth/token" it will get no response
body: <p><a href="https://connect.stripe.com/oauth/authorize?response_type=code&amp;client_id=ca_XXXXXXXXXXXXXXXXXXXXXX&amp;scope=read_write" rel="nofollow">https://connect.stripe.com/oauth/authorize?response_type=code&amp;client_id=ca_XXXXXXXXXXXXXXXXXXXXXX&amp;scope=read_write</a></p>
  
  <p>from the above mentioned api I get the code.</p>
  
  <pre><code>$code = $_GET['code'];
  </code></pre>
  
  <p>from this code I curl this <a href="http://connect.stripe.com/oauth/token" rel="nofollow">http://connect.stripe.com/oauth/token</a> but the problem is that it is not getting any response</p>
  
  <pre><code>     echo $code;
  
  $token_request_body = array(
      'grant_type' =&gt; 'authorization_code',
      'client_id' =&gt; 'ca_xxxxxxxxxxxxxxxxxxxxx',
      'code' =&gt; $code,
      'client_secret' =&gt; 'XXXXXXXXXXXXXXXXXXX'
  );
  
  define("TOKEN_URI", "http://connect.stripe.com/oauth/token");
  
  $req = curl_init(TOKEN_URI);
  curl_setopt($req, CURLOPT_RETURNTRANSFER, true);
  curl_setopt($req, CURLOPT_POST, true);
  curl_setopt($req, CURLOPT_POSTFIELDS, http_build_query($token_request_body));
  
  // TODO: Additional error handling
  $respCode = curl_getinfo($req, CURLINFO_HTTP_CODE);
  echo $respCode;
  $resp = json_decode(curl_exec($req), true);
  echo $resp;
  curl_close($req);
  
  echo $resp['access_token'];
  </code></pre>