PHPackages                             nacholibre/braintree-bundle - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Payment Processing](/categories/payments)
4. /
5. nacholibre/braintree-bundle

ActiveSymfony-bundle[Payment Processing](/categories/payments)

nacholibre/braintree-bundle
===========================

0.1.7(8y ago)01901MITPHPPHP &gt;=5.4.0

Since Aug 29Pushed 8y ago1 watchersCompare

[ Source](https://github.com/nachosymfony/braintree-bundle)[ Packagist](https://packagist.org/packages/nacholibre/braintree-bundle)[ RSS](/packages/nacholibre-braintree-bundle/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (1)Versions (9)Used By (0)

Symfony2 Braintree Bundle
=========================

[](#symfony2-braintree-bundle)

Symfony 2 Bundle for Braintree's PHP client library

Installation
------------

[](#installation)

### Composer

[](#composer)

Install

`composer require nacholibre/braintree-bundle`

### Application Kernel

[](#application-kernel)

Add the bundle to your application's kernel:

```
// app/AppKernel.php

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

Configuration
-------------

[](#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](https://www.braintreepayments.com/docs/php/guide/getting_paid#configuration)

Usage
-----

[](#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](https://github.com/braintree/braintree_php) or the [official documentation](https://www.braintreepayments.com/docs/php).

### Factory

[](#factory)

One of the methods for getting a desired service is to call the `get` method from the `BraintreeFactory`:

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

### Defining a service

[](#defining-a-service)

Instead of calling the factory you can define a custom service in your own bundle:

```
# ../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:

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

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity11

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity53

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 73.3% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~42 days

Recently: every ~74 days

Total

8

Last Release

3244d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/9cd8e289dcddefe2a8972b210d05a14d9465df0b5e9309b72387cbd022d093d9?d=identicon)[nacholibrev](/maintainers/nacholibrev)

---

Top Contributors

[![nacholibre](https://avatars.githubusercontent.com/u/1738437?v=4)](https://github.com/nacholibre "nacholibre (11 commits)")[![grEvenX](https://avatars.githubusercontent.com/u/26375?v=4)](https://github.com/grEvenX "grEvenX (4 commits)")

### Embed Badge

![Health badge](/badges/nacholibre-braintree-bundle/health.svg)

```
[![Health](https://phpackages.com/badges/nacholibre-braintree-bundle/health.svg)](https://phpackages.com/packages/nacholibre-braintree-bundle)
```

###  Alternatives

[omnipay/braintree

Braintree gateway for Omnipay payment processing library

35558.0k3](/packages/omnipay-braintree)[cometcult/braintree-bundle

Symfony 2 Bundle for Braintree's PHP client library

2185.9k](/packages/cometcult-braintree-bundle)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
