Website URL
Error Message
php curl response is printing out for some reason test5.php not sure if cache issue not being deleted
Other Information
(other information and details relevant to your question)
php curl response is printing out for some reason test5.php not sure if cache issue not being deleted
(other information and details relevant to your question)
$result = "";
//lsproduct
$ch = curl_init();
curl_setopt($ch, CURLOPT_URL, 'https://api.sandbox.paypal.com/v1/catalogs/products');
curl_setopt($ch, CURLOPT_CUSTOMREQUEST, 'GET' );
$headers = array();
$headers[] = 'Content-Type: application/json';
$headers[] = 'Accept: application/json';
$headers[] = 'Authorization: '.$accessToken->token_type.' '.$accessToken->access_token.'';
curl_setopt($ch, CURLOPT_HTTPHEADER, $headers);
//$result2 = curl_exec($ch);
//$lsproduct = json_decode($result2);
like not sure but somehow irts printing like an echo thought maybe it was the response being re called but doesn’t seem to make sense thanks
This?
We don’t cache PHP code. The moment you update PHP code and refresh the page, the new code will be executed.
Can you please go into the file manager and check the full page to make sure it contains the contents you expect?
You don’t have any echo statements. You’re also commenting out the part of the code that actually makes the request and returns a result, so I’m not quite sure what issue you are having.
If you can’t make curl to work with the paypal api why not use link generation on client side? Just an idea.
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.