PHPackages                             xola/omnipay-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. xola/omnipay-bundle

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

xola/omnipay-bundle
===================

Integrates Omnipay 3 with Symfony 2+

v3.0(6y ago)917.3k11MITPHPPHP &gt;=7CI failing

Since Nov 25Pushed 6mo ago5 watchersCompare

[ Source](https://github.com/xola/OmnipayBundle)[ Packagist](https://packagist.org/packages/xola/omnipay-bundle)[ Docs](https://github.com/xola/OmnipayBundle)[ RSS](/packages/xola-omnipay-bundle/feed)WikiDiscussions master Synced 3w ago

READMEChangelog (5)Dependencies (14)Versions (10)Used By (0)

Xola OmnipayBundle [![Build status...](https://camo.githubusercontent.com/61b6d249e6c4b56e55eccc6ea0e80860cb2d3a678699b8b9a99d267a64cbca4f/68747470733a2f2f7365637572652e7472617669732d63692e6f72672f786f6c612f4f6d6e6970617942756e646c652e706e67)](http://travis-ci.org/xola/OmnipayBundle)
============================================================================================================================================================================================================================================================================================

[](#xola-omnipaybundle-)

This bundle integrates the [Omnipay payment processing library](https://github.com/adrianmacneil/omnipay) into [Symfony2](http://symfony.com/).

This bundle supports Omnipay 3

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

[](#installation)

To install via [Composer](http://getcomposer.org/), add the following to your `composer.json` file:

```
{
    "require": {
        "xola/omnipay-bundle": "^3"
    }
}
```

Add the bundle to your application kernel.

```
// app/AppKernel.php
public function registerBundles()
{
    return array(
        // ...
        new Xola\OmnipayBundle\OmnipayBundle(),
        // ...
    );
}
```

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

[](#configuration)

(Optional) In the Omnipay library, you would programmatically set parameters required by a gateway. With this bundle, it's possible to configure these parameters in your Symfony config files.

```
# app/config/password_dev.yml
parameters:
    # Custom gateway
    omnipay.my_custom_key.apiKey: myGatewayKey
    omnipay.my_custom_key.gateway: MyGateway

    # Default Stripe gateway
    omnipay.stripe_default.apiKey: myApiKey
    omnipay.stripe_default.gateway: Stripe

    # Gateway for Stripe Canada account
    omnipay.stripe_canada.apiKey: myStripeCanadaApiKey
    omnipay.stripe_canada.gateway: Stripe

    # Authorize.NET AIM
    omnipay.authorize_net_aim.transactionKey: myTransactionKey
    omnipay.authorize_net_aim.gateway: AuthorizeNet_AIM
```

In the sample configuration above, `my_custom_key` is a unique key you define for each of your gateways. `omnipay.my_custom_name.gateway` is the class name for a Omnipay gateway driver (e.g. `Stripe`). You may choose to define multiple keys for the same Omnipay gateway with different credentials. In the above configuration, we have configured two gateway definitions for Stripe -- both use the Stripe Omnipay driver, however, they each use a different set of credentials.

Usage
-----

[](#usage)

Use the new `omnipay` service to create gateway object:

```
    // From within a controller. This will return an instance `\Omnipay\Stripe`. `stripe_default` is the key as
    // specified in the config.
    $gateway = $this->get('omnipay')->get('stripe_default');

    // From within a controller. This will return an instance of `\Omnipay\MyGateway` as specified in
    // `omnipay.my_custom_name.gateway`
    $gateway = $this->get('omnipay')->get('my_custom_name');
```

The rest is identical to how you would normally use Omnipay

```
$formData = ['number' => '4242424242424242', 'expiryMonth' => '11', 'expiryYear' => '2018', 'cvv' => '123'];
$response = $gateway->purchase(['amount' => '10.00', 'currency' => 'USD', 'card' => $formData])->send();

if ($response->isSuccessful()) {
    // payment was successful: update database
    print_r($response);
} elseif ($response->isRedirect()) {
    // redirect to offsite payment gateway
    $response->redirect();
} else {
    // payment failed: display message to customer
    echo $response->getMessage();
}
```

The gateway classes which are returned are already initialized with the parameters defined in the config files.

###  Health Score

44

—

FairBetter than 91% of packages

Maintenance46

Moderate activity, may be stable

Popularity29

Limited adoption so far

Community20

Small or concentrated contributor base

Maturity69

Established project with proven stability

 Bus Factor1

Top contributor holds 58.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 ~375 days

Recently: every ~444 days

Total

7

Last Release

2346d ago

Major Versions

v1.2.1 → v3.02020-01-22

PHP version history (2 changes)1.0.x-devPHP &gt;=5.3.2

v3.0PHP &gt;=7

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/109667?v=4)[Anush Ramani](/maintainers/anush)[@anush](https://github.com/anush)

![](https://www.gravatar.com/avatar/f82f04cc136217502b33a5b5b732187c5b9e9cafc443420b1c7fcc19d5b2805c?d=identicon)[venkat\_kotra@yahoo.co.in](/maintainers/venkat_kotra@yahoo.co.in)

---

Top Contributors

[![anush](https://avatars.githubusercontent.com/u/109667?v=4)](https://github.com/anush "anush (28 commits)")[![kotrakrishna](https://avatars.githubusercontent.com/u/3157591?v=4)](https://github.com/kotrakrishna "kotrakrishna (13 commits)")[![mogzol](https://avatars.githubusercontent.com/u/11789801?v=4)](https://github.com/mogzol "mogzol (3 commits)")[![rushi](https://avatars.githubusercontent.com/u/65708?v=4)](https://github.com/rushi "rushi (3 commits)")[![dkisselev](https://avatars.githubusercontent.com/u/945848?v=4)](https://github.com/dkisselev "dkisselev (1 commits)")

---

Tags

symfonypaymentgatewayomnipaycredit-card

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/xola-omnipay-bundle/health.svg)

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

###  Alternatives

[payum/payum-bundle

One million downloads of Payum already! Payum offers everything you need to work with payments. Check more visiting site.

58310.7M48](/packages/payum-payum-bundle)[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.

1155.2k](/packages/rcsofttech-audit-trail-bundle)

PHPackages © 2026

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