PHPackages                             wemakecustom/stripe-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. wemakecustom/stripe-bundle

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

wemakecustom/stripe-bundle
==========================

Symfony 2 StripeBundle, a wrapper for Stripe Api

v0.3(10y ago)733.9k↓20%7[1 PRs](https://github.com/wemakecustom/StripeBundle/pulls)MITPHPPHP &gt;=5.4

Since Jul 15Pushed 9y ago6 watchersCompare

[ Source](https://github.com/wemakecustom/StripeBundle)[ Packagist](https://packagist.org/packages/wemakecustom/stripe-bundle)[ Docs](http://www.wemakecustom.com)[ RSS](/packages/wemakecustom-stripe-bundle/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (2)Versions (4)Used By (0)

StripeBundle
============

[](#stripebundle)

Provides a simple Symfony 2 Bundle to Wrap the Stripe PHP SDK -

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

[](#installation)

### composer.json

[](#composerjson)

```
    {
        "require": {
            "wemakecustom/stripe-bundle": "dev-master"
        }
    }
```

### app/AppKernel.php

[](#appappkernelphp)

```
    public function registerBundles()
    {
        $bundles = array(
            // ...
            new WMC\StripeBundle\WMCStripeBundle(),
        );
    }
```

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

[](#configuration)

Edit your symfony config.yml file and add, at a minimum, the following lines:

```
wmc_stripe:
    api_secret_key:      stripe_secret_key
    api_publishable_key: stripe_publishable_key

```

Utilisation
-----------

[](#utilisation)

### Authentification

[](#authentification)

In Stripe you have two form of authentication. The one by your server and the one by your client.

#### To authenticate your server with the stripe secret key

[](#to-authenticate-your-server-with-the-stripe-secret-key)

```
    $this->container->get('wmc_stripe.stripe')->auth();
    // Instead of : Stripe::setApiKey("sk_somekey");
```

#### To authenticate your client with the stripe publishable key

[](#to-authenticate-your-client-with-the-stripe-publishable-key)

Include all js at once in twig

```
    {% include "WMCStripeBundle::stripe.js.html.twig" %}
```

If you want to do it manually you have a twig extension to get the stripe\_publishable\_key

```
    Stripe.setPublishableKey('{{stripe_publishable_key}}');
```

### Example

[](#example)

If you want to do a basic card submission

#### Basic saving of clients (card details), controller and a view :

[](#basic-saving-of-clients-card-details-controller-and-a-view-)

```
    public function newPaymentMethodAction(Request $request)
    {

        $this->container->get('wmc_stripe.stripe')->auth();

        $form = $this->createForm(new CardFormType());
        $formHandler = new CardFormHandler($form, $request, $stripeClientDescription);

        if($formHandler->process()){
            //Persist flush the customerId somewhere
            $stripeCustomerId = $formHandler->getCustomer()->id;
        }

        return array('form' => $form->createView());
    }
```

```
    {% extends "::base.html.twig" %}

    {% block content %}

        {{ form_start(form) }}
        {{ form_errors(form) }}
        {{ form_widget(form) }}

        Submit

        {{ form_end(form) }}

    {% endblock %}

    {% block foot_script %}
        {{ parent() }}
        {% include "WMCStripeBundle::stripe.js.html.twig" %}
    {% endblock %}
```

#### Charge a client

[](#charge-a-client)

```
            \Stripe\Charge::create(array(
                    "amount" => round($price * 100),
                    "currency" => "usd",
                    "customer" => $customerId)
            );
```

\##TODO:

- Declare Form type and Handler as services

###  Health Score

32

—

LowBetter than 69% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity30

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 60.9% 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 ~18 days

Total

3

Last Release

3970d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/2912614?v=4)[Léo Benoist](/maintainers/LeoBenoist)[@LeoBenoist](https://github.com/LeoBenoist)

---

Top Contributors

[![LeoBenoist](https://avatars.githubusercontent.com/u/2912614?v=4)](https://github.com/LeoBenoist "LeoBenoist (14 commits)")[![lemoinem](https://avatars.githubusercontent.com/u/234992?v=4)](https://github.com/lemoinem "lemoinem (4 commits)")[![freddyhaddad](https://avatars.githubusercontent.com/u/1421933?v=4)](https://github.com/freddyhaddad "freddyhaddad (3 commits)")[![ibasaw](https://avatars.githubusercontent.com/u/313704?v=4)](https://github.com/ibasaw "ibasaw (1 commits)")[![jmoughon](https://avatars.githubusercontent.com/u/2159091?v=4)](https://github.com/jmoughon "jmoughon (1 commits)")

---

Tags

bundlestripeSymfony2

### Embed Badge

![Health badge](/badges/wemakecustom-stripe-bundle/health.svg)

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

###  Alternatives

[rcsofttech/audit-trail-bundle

Enterprise-grade, high-performance Symfony audit trail bundle. Automatically track Doctrine entity changes with split-phase architecture, multiple transports (HTTP, Queue, Doctrine), and sensitive data masking.

1189.8k](/packages/rcsofttech-audit-trail-bundle)[duncanmcclean/statamic-cargo

Comprehensive e-commerce addon for Statamic. Build bespoke e-commerce sites without the complexity.

3416.9k](/packages/duncanmcclean-statamic-cargo)[fpt/stripe-bundle

Stripe bundle for Symfony 5.4 / 6 / 7

1425.9k](/packages/fpt-stripe-bundle)[flux-se/sylius-stripe-plugin

Sylius Stripe plugin using Payment Request

1242.7k2](/packages/flux-se-sylius-stripe-plugin)[tastyigniter/ti-ext-payregister

Allows you to accept credit card payments using PayPal, Stripe, Authorize.Net and/or Mollie.

1018.3k8](/packages/tastyigniter-ti-ext-payregister)

PHPackages © 2026

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