Download the PHP
package mp-plugins/php-sdk without Composer
On this page you can find all versions of the php package
mp-plugins/php-sdk. It is possible to download/install
these versions without Composer. Possible dependencies are resolved
automatically.
Vendor mp-plugins Package php-sdk Short Description Mercado Pago Plugins PHP-SDK License
proprietary
FAQ
After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.
Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.
In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories.
In this case some credentials are needed to access such packages.
Please use the auth.json textarea to insert credentials, if a package is coming from a private repository.
You can look here for more information.
Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
To use Composer is sometimes complicated. Especially for beginners.
Composer needs much resources. Sometimes they are not available on a simple webspace.
If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
O objetivo desta SDK é proporcionar agilidade no processo de desenvolvimento e comunicação com as APIs de pagamento, preferências e notificações.
Instalação
Instale a biblioteca utilizando o seguinte comando:
composer require mp-plugins/php-sdk
Com uma versão específica:
composer require mp-plugins/php-sdk 1.4.0
Consultando versões da SDK
Para consultar as versões disponíveis basta acesssar o seguinte link.
Configuração
Para incluir a biblioteca em seu projeto, basta fazer o seguinte:
Criando um pagamento
Obtendo pagamento
Criando uma preferência
Consultando uma notificação
O parâmetro para consulta deve seguir o modelo abaixo:
P-{idPayment}
Registrando um evento no Datadog
Registrando um log de erro
Obtendo métodos de pagamento
Obtendo métodos de pagamento agrupados
Exemplo de requisição agrupando os meios de pagamento pelo campo id:
Obtendo todas as Merchant Orders de acordo com o access token
Criando um novo id de integração para funil
Atualizando um id de integração para funil
Obtendo cotação para determinada moeda
Executando os testes de Integração
Os testes de integração se encontram em tests/integration, para executa-los é necessário efetuar uma copia do arquivo
.env.sample
que está na raiz do projeto e criar um .env também na raiz do projeto, feito isso, você deve popular os valores dentro
do .env
Composer command for our command line client (download client)This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free.Standard composer command
The package mp-plugins/php-sdk contains the following files
Loading the files please wait ....
Loading please wait ...
Before you can download the PHP files, the dependencies should be resolved. This can take some minutes. Please be patient.