Fatal error: Wrong parameters for Exception

0

I'm having a problem generating a charge from an internal application with the MP button.

Previously I was throwing an error in line 508, which I could "correct", but now, when executing said button, it throws me the error:

  

Fatal error: Wrong parameters for Exception ([string $ exception [ long   $ code]]) in C: \ xampp \ htdocs \ cc \ sdk-php-master \ lib \ mercadopago.php on   line 576 "

private static function build_request ($ request) {         if (! extension_loaded ("curl")) {             throw new MercadoPagoException ("cURL extension not found. You need to enable cURL in your php.ini or another configuration you have.");         }

The truth that I went through all the sites, but with none came to the solution.

What am I doing wrong?

    
asked by Isaias fernandez 23.08.2018 в 18:20
source

1 answer

0

There's your problem, the cURL is not enabled in your PHP. In general, cURL is used to make backend requests to backend.

As I see that your problem is XAMPP, we go straight to the solution.

  • We have to go to C:\xampp\php\php.ini It is usually there if not, find the file php.ini

  • Find the line: extension=php_curl.dll and make sure it is not commented.

  • If you continue without pulling, make sure that your Windows32 folder has these two files libeay32.dll ssleay32.dll if you do not have them download them from the internet.

  • That should be enough with that.

        
    answered by 23.08.2018 в 18:51