PHPackages                             fandogh/laravel-omnipay - 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. [API Development](/categories/api)
4. /
5. fandogh/laravel-omnipay

ActiveLibrary[API Development](/categories/api)

fandogh/laravel-omnipay
=======================

Omnipay Service Provider for Laravel

v0.1.1(11y ago)018MITPHPPHP &gt;=5.3.0

Since Mar 28Pushed 3y ago1 watchersCompare

[ Source](https://github.com/pi0/laravel-omnipay)[ Packagist](https://packagist.org/packages/fandogh/laravel-omnipay)[ RSS](/packages/fandogh-laravel-omnipay/feed)WikiDiscussions fandogh Synced today

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

Omnipay for Laravel 5
---------------------

[](#omnipay-for-laravel-5)

### For Laravel 4, use the [0.1 version](https://github.com/barryvdh/laravel-omnipay/tree/v0.1.0).

[](#for-laravel-4-use-the-01-version)

This is a package to integrate [Omnipay](https://github.com/omnipay/omnipay) with Laravel. You can use it to easily manage your configuration, and use the Facade to provide shortcuts to your gateway.

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

[](#installation)

Require this package in your composer.json and run composer update (or run `composer require barryvdh/laravel-omnipay:0.2.x` directly):

```
"barryvdh/laravel-omnipay": "0.2.*@dev"

```

After updating composer, add the ServiceProvider to the providers array in config/app.php

```
'Barryvdh\Omnipay\ServiceProvider',

```

You need to publish the config for this package. A sample configuration is provided. The defaults will be merged with gateway specific configuration.

```
$ php artisan vendor:publish

```

To use the Facade (`Omnipay::purchase()` instead of `App::make(`omnipay`)->purchase()`), add that to the facades array.

```
 'Omnipay' => 'Barryvdh\Omnipay\Facade',

```

When calling the Omnipay facade/instance, it will create the default gateway, based on the configuration. You can change the default gateway by calling `Omnipay::setDefaultGateway('My\Gateway')`. You can get a different gateway by calling `Omnipay::gateway('My\Cass')`

Examples
--------

[](#examples)

```
$params = [
    'amount' => $order->amount,
    'issuer' => $issuerId,
    'description' => $order->description,
    'returnUrl' => URL::action('PurchaseController@return', [$order->id]),
];
$response = Omnipay::purchase($params)->send();

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

```

Besides the gateway calls, there is also a shortcut for the creditcard:

```
$formInputData = array(
    'firstName' => 'Bobby',
    'lastName' => 'Tables',
    'number' => '4111111111111111',
);
$card = Omnipay::CreditCard($formInputData);

```

###  Health Score

23

—

LowBetter than 26% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 100% 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 ~436 days

Total

2

Last Release

4041d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/247155?v=4)[Shayan Pooya](/maintainers/pooya)[@pooya](https://github.com/pooya)

---

Top Contributors

[![barryvdh](https://avatars.githubusercontent.com/u/973269?v=4)](https://github.com/barryvdh "barryvdh (10 commits)")

---

Tags

laravelomnipay

### Embed Badge

![Health badge](/badges/fandogh-laravel-omnipay/health.svg)

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

###  Alternatives

[defstudio/telegraph

A laravel facade to interact with Telegram Bots

815320.5k3](/packages/defstudio-telegraph)[riclep/laravel-storyblok

A Laravel wrapper around the Storyblok API to provide a familiar experience for Laravel devs

6277.0k5](/packages/riclep-laravel-storyblok)[simplestats-io/laravel-client

Analytics for Laravel. Track visitors, registrations, and payments. Discover which channels actually drive revenue, not just traffic. Server-side, GDPR compliant, ad-blocker proof.

5019.3k](/packages/simplestats-io-laravel-client)

PHPackages © 2026

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