New

Just launched: Vueblocks, a brand-new search engine for Vue packages! Explore Vueblocks →

eklundkristoffer/laravel-omnipay

Omnipay Service Provider for Laravel
243

Larablocks Analysis

eklundkristoffer/laravel-omnipay works with Laravel 5 (latest release v0.1.4, Aug 21, 2017), which reached end of life: no more fixes, even for security.

Laravel 4 in earlier releases.

Recommendation checks

Not advised

Not advised: no release or commit in over 2 years.

  • No release or commit in over 2 years
  • Supports only Laravel 5, past end of life
  • No release in the last 12 months (last: Aug 21, 2017)
  • 0 downloads a month (needs 10,000)
  • 0 GitHub stars (needs 100)

State

Likely abandoned
  • No release or commit in over 2 years.
  • Last stable release: Aug 21, 2017.
  • No releases in the last 12 months.
  • First released: Mar 28, 2014.
  • 0 open issues on GitHub.

Data from Packagist and GitHub, checked by Larablocks on Nov 28, 2026.

Install
composer require eklundkristoffer/laravel-omnipay
Latest Version:v0.1.4
PHP:>=5.3.0
Laravel:5
Older releases:4
License:MIT
Last Updated:Aug 21, 2017
Links: GitHub  ·  Packagist
Maintainer: cornex

Omnipay for Laravel 5

For Laravel 4, use the 0.1 version.

This is a package to integrate Omnipay with Laravel. You can use it to easily manage your configuration, and use the Facade to provide shortcuts to your gateway.

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

$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);

Related Packages

bummzack/omnipay-postfinance

Postfinance Gateway for the Omnipay payment processing library

58,950 6
amostajo/laravel-shop-gateway-omnipay

Omnipay gateway for Laravel Shop package.

1,181 7
appoets/larvel-omnipay-payubiz

Laravel package for PayUBiz payment gateway with Omnipay

43 2
lokielse/omnipay-unionpay

UnionPay gateway for Omnipay payment processing library

59,102 112
payum/payum-laravel-package

Rich payment solutions for Laravel framework. Paypal, payex, authorize.net, be2b...

42,557 123

Version History

Version Released PHP Laravel License
v0.1.4 >=5.3.0 5.0.* || 5.1.* || 5.2.* || 5.3.* || 5.4.* || 5.5.* || 5.5-dev MIT
v0.1.3 >=5.3.0 5.0.* || 5.1.* || 5.2.* || 5.3.* || 5.4.* MIT
v0.1.2 >=5.3.0 5.0.* || 5.1.* || 5.2.* || 5.3.* MIT
v0.1.1 >=5.3.0 5.0.x|5.1.x MIT
v0.1.0 >=5.3.0 ~4.0 MIT