raphahardt/mercadopago-bundle

This is a Symfony2 Bundle helps you use the mercadopago API

Installs: 32

Dependents: 0

Suggesters: 0

Security: 0

Stars: 0

Watchers: 2

Forks: 5

Type:symfony-bundle

0.1.2 2015-05-24 16:06 UTC

This package is not auto-updated.

Last update: 2024-04-19 16:50:25 UTC


README

Este bundle te permite adaptar de manera rápida el api de Mercadopago a tu proyecto en Symfony.

Latest Stable Version Total Downloads Latest Unstable Version

Licencia

License

Instalación con composer

1 Agrega en la llave require del composer.json

    "require" : {
        "grunch/mercadopago-bundle": "0.1.*",
    }
$ composer update

2 Agrega tus credenciales de mercadopago a tu proyecto:

Configura tus credenciales

# app/config/config.yml

grunch_mercadopago:
    client_id: xxxxxx
    client_secret: xxxxxxx
    sandbox: true

3 Registra el bundle en app/AppKernel.php

    $bundles = array(
        // ...
        new Grunch\MercadopagoBundle\GrunchMercadopagoBundle(),
    );

Comienza

  • Crea el objeto mercadopago:
<?php
// src/Acme/DemoBundle/Controller/DemoController.php

namespace Acme\DemoBundle\Controller;

// ...

class DemoController extends Controller
{

    public function indexAction()
    {
		// Crea el objeto MP
		$mp = $this->get('grunch_mercadopago')->getMp();
		// Crea un token
		$token = $mp->get_access_token();
	}
}
  • Crea las entidades con la consola:
$ php app/console doctrine:schema:update --force

Contribuye

  1. fork the project
  2. clone the repo
  3. get the coding standard fixer: wget http://cs.sensiolabs.org/get/php-cs-fixer.phar
  4. before the PullRequest you should run the coding standard fixer with php php-cs-fixer.phar fix -v .

Para más información sobre el API

https://developers.mercadopago.com/