from the above mentioned api I get the code.
$code = $_GET['code'];
from this code I curl this http://connect.stripe.com/oauth/token but the problem is that it is not getting any response
echo $code;
$token_request_body = array(
'grant_type' => 'authorization_code',
'client_id' => 'ca_xxxxxxxxxxxxxxxxxxxxx',
'code' => $code,
'client_secret' => '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'];