Can't call the https://api.sandbox.paypal.com/v1/oauth2/token - PayPal Connect
managepavans
Contributor
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Posted on
Jun-04-2020
10:24 PM
Hi,
I am also facing the same issue with getting access token at PayPal connect process. See code below:
Request Code:
$curl = curl_init();
$base_token = "{client_id: secret}";
$data = array(
CURLOPT_URL => "https://api.sandbox.paypal.com/v1/oauth2/token",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => array(
'grant_type' => 'authorization_code',
'code' => '{CODE}'
),
CURLOPT_HTTPHEADER => array(
"Authorization: Basic ".$base_token,
),
);
curl_setopt_array($curl,$data );
$response = curl_exec($curl);
curl_close($curl);
Response Code:
stdClass Object ( [name] => Bad Request [debug_id] => 2858088aa4473 [message] => java.lang.IllegalArgumentException [details] => Array ( ) )
Thanks in advance
0 REPLIES 0
Haven't Found your Answer?
It happens. Hit the "Login to Ask the community" button to create a question for the PayPal community.
Related Content
- PayPal Buttons not visible in Sandbox Environment
- Add Others data in SDKs
- Getting errors when integrating standard checkout with my web site. Probably a beginner problem. in SDKs
- Get error message "Someting went wrong" when the sandbox account tap "Agree and Connect" button. in Sandbox Environment
- Button in PayPal Payments Standard