2017 © Pedro Peláez
 

symfony-bundle braintree-bundle

image

nacholibre/braintree-bundle

  • Wednesday, June 21, 2017
  • by nacholibrev
  • Repository
  • 1 Watchers
  • 0 Stars
  • 47 Installations
  • PHP
  • 0 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 9 Versions
  • 4 % Grown

The README.md

Symfony2 Braintree Bundle

Symfony 2 Bundle for Braintree's PHP client library, (*1)

Installation

Composer

Install, (*2)

composer require nacholibre/braintree-bundle, (*3)

Application Kernel

Add the bundle to your application's kernel:, (*4)

// app/AppKernel.php

public function registerBundles()
{
    return array(
        // ...
        new nacholibre\BraintreeBundle\nacholibreBraintreeBundle(),
        // ...
    );
}

Configuration

# app/config/config.yml
# ...
nacholibre_braintree:
    environment: sandbox
    merchant_id: your_merchant_id
    public_key: your_public_key
    private_key: your_private_key

For more info about the configuration variables see Braintree docs, (*5)

Usage

Braintree php client library comes with a bunch of services for the Braintree API. They are usually prefixed by Braintree_. To see all available Braintree services head over to braintree_php or the official documentation., (*6)

Factory

One of the methods for getting a desired service is to call the get method from the BraintreeFactory:, (*7)

// in your controller
$factory = $this->get('braintree.factory');
$customerService = $factory->get('customer');

Defining a service

Instead of calling the factory you can define a custom service in your own bundle:, (*8)

# ../services.yml
services:
    customer_custom_service:
        class:            Braintree_Customer
        factory_service:  braintree.factory
        factory_method:   get
        arguments: ["customer"]

Then in your controller you can go with:, (*9)

$customerService = $this->get('customer_custom_service');

The Versions

21/06 2017

dev-master

9999999-dev

  Sources   Download

MIT

The Requires

 

by Yoan Arnaudov

21/06 2017

0.1.7

0.1.7.0

  Sources   Download

MIT

The Requires

 

by Yoan Arnaudov

21/06 2017

0.1.6

0.1.6.0

  Sources   Download

MIT

The Requires

 

by Yoan Arnaudov

21/10 2016

0.1.5

0.1.5.0

  Sources   Download

MIT

The Requires

 

by Yoan Arnaudov

30/08 2016

0.1.4

0.1.4.0

  Sources   Download

MIT

The Requires

 

by Yoan Arnaudov

29/08 2016

0.1.3

0.1.3.0

  Sources   Download

MIT

The Requires

 

by Yoan Arnaudov

29/08 2016

0.1.2

0.1.2.0

  Sources   Download

MIT

The Requires

 

by Yoan Arnaudov

29/08 2016

0.1.1

0.1.1.0

  Sources   Download

MIT

The Requires

 

by Yoan Arnaudov

29/08 2016

0.1.0

0.1.0.0

  Sources   Download

MIT

The Requires

 

by Yoan Arnaudov