Skip to content

Problema na confirmação do SSL #2

@danilo-barbosa-1000

Description

@danilo-barbosa-1000

quando você está localhost e em servers sem SSL gera o erro:
GoDaddyAPI\Exceptions\GoDaddyAPIException: cURL error 60: SSL certificate problem: unable to get local issuer certificate (see https://curl.haxx.se/libcurl/c/libcurl-errors.html) for https://api.ote-godaddy.com/v1/domains/available?domain=onbest.com.br&checkType=FAST&forTransfer=0 in file D:\OnBest\oCode\apiOcode\vendor\bigdevwhale\godaddy-api-wrapper\src\Http\GoDaddyApiClient.php on line 67

Correção, add verify=>false no arquivo src/Http/GoDaddyApiClient.php:

class GoDaddyApiClient
{
    private $client;

    public function __construct($apiKey, $apiSecret, $isProduction = true, $headers = [], $ssl = false)
    {
        // Read the base URL from the configuration
        $config = include __DIR__.'/../../config/config.php';
        $baseUrl = $isProduction ? $config['production_base_url'] : $config['test_base_url'];
        // Create a new Guzzle HTTP client with base_uri and headers
        $this->client = new Client([
            'base_uri' => $baseUrl,
            'verify' => $ssl,
            'headers' => $headers + [
                'Content-Type' => 'application/json',
                'Accept' => 'application/json',
                'Authorization' => 'sso-key '.$apiKey.':'.$apiSecret,
            ],
        ]);
    }

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions