I'm trying to integrate Mercado Pago to my project. In the back end the documentation says that we should put.
require_once 'vendor/autoload.php';
MercadoPago\SDK::setAccessToken("ENV_ACCESS_TOKEN");
But MercadoPago\SDK::setAccessToken("ENV_ACCESS_TOKEN"); gives me this error:
Fatal error: Uncaught TypeError: Return value of Doctrine\Common\Annotations\AnnotationRegistry::registerFile() must be an instance of Doctrine\Common\Annotations\void, none returned in /Applications/XAMPP/xamppfiles/htdocs/tiendaFarias/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationRegistry.php:75 Stack trace: #0 /Applications/XAMPP/xamppfiles/htdocs/tiendaFarias/vendor/mercadopago/dx-php/src/MercadoPago/MetaDataReader.php(27): Doctrine\Common\Annotations\AnnotationRegistry::registerFile('/Applications/X...') #1 /Applications/XAMPP/xamppfiles/htdocs/tiendaFarias/vendor/mercadopago/dx-php/src/MercadoPago/Manager.php(42): MercadoPago\MetaDataReader->__construct() #2 /Applications/XAMPP/xamppfiles/htdocs/tiendaFarias/vendor/mercadopago/dx-php/src/MercadoPago/SDK.php(34): MercadoPago\Manager->__construct(Object(MercadoPago\RestClient), Object(MercadoPago\Config)) #3 /Applications/XAMPP/xamppfiles/htdocs/tiendaFarias/vendor/mercadopago/dx-php/src/MercadoPago/SDK.php(43): MercadoPago\SDK::initialize() #4 in /Applications/XAMPP/xamppfiles/htdocs/tiendaFarias/vendor/doctrine/annotations/lib/Doctrine/Common/Annotations/AnnotationRegistry.php on line 75
It's important to say that I'm using php V 7.0.33
I hope someone can tell if I'm missing something.