I found my issue, I was working in localhost so I had to type:
curl_setopt($ch, CURLOPT_SSL_VERIFYPEER, false);
curl_setopt($ch, CURLOPT_SSL_VERIFYHOST, false);
probably you have the same issue, try it, thank you very much @matt_thomas for the support, you help me a lot <3
1 Like