Skip to content

MercadoPago\Net\MPResponse::__construct(): Argument #2 ($content) must be of type array, null given #486

Closed Answered by luannsr12
marcelino-borges asked this question in Q&A
Discussion options

You must be logged in to vote

@marcelino-borges estive com o mesmo problema por aqui. E vi que o Curl n tava sendo executado, pois me faltava o certificado SSL.
Pra resolver fiz isso em createHttpRequestOptions (src/mercadopago/Net/MPDefaultHttpClient.php) eu passo como false a verificação. Mas provisoriamente, pois vou instalar um certificado.

   private function createHttpRequestOptions(MPRequest $request): array
    {
        $connection_timeout = $request->getConnectionTimeout() ?: MercadoPagoConfig::getConnectionTimeout();

        return array(
            CURLOPT_URL => MercadoPagoConfig::$BASE_URL . $request->getUri(),
            CURLOPT_CUSTOMREQUEST => $request->getMethod(),
            CURLOPT_HTTPHEADER =…

Replies: 3 comments 4 replies

Comment options

You must be logged in to vote
1 reply
@marcelino-borges
Comment options

Comment options

You must be logged in to vote
2 replies
@marcelino-borges
Comment options

@rhames07
Comment options

Answer selected by rhames07
Comment options

You must be logged in to vote
1 reply
@sebacorrea33
Comment options

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
4 participants