PHPackages                             amostajo/laravel-shop-gateway-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. [Payment Processing](/categories/payments)
4. /
5. amostajo/laravel-shop-gateway-omnipay

ActiveLibrary[Payment Processing](/categories/payments)

amostajo/laravel-shop-gateway-omnipay
=====================================

Omnipay gateway for Laravel Shop package.

v1.0.2(10y ago)71.2k5MITPHPPHP &gt;=5.4.0

Since Oct 13Pushed 10y ago1 watchersCompare

[ Source](https://github.com/amostajo/laravel-shop-gateway-omnipay)[ Packagist](https://packagist.org/packages/amostajo/laravel-shop-gateway-omnipay)[ RSS](/packages/amostajo-laravel-shop-gateway-omnipay/feed)WikiDiscussions v1.0 Synced 1mo ago

READMEChangelog (2)Dependencies (4)Versions (6)Used By (0)

OMNIPAY GATEWAY (for Laravel Shop Package)
==========================================

[](#omnipay-gateway-for-laravel-shop-package)

[![Latest Stable Version](https://camo.githubusercontent.com/a761e54a68d4a5568e9d1299cea831fdc5067f65a54b43d42adcc7a39a91bd94/68747470733a2f2f706f7365722e707567782e6f72672f616d6f7374616a6f2f6c61726176656c2d73686f702d676174657761792d6f6d6e697061792f762f737461626c65)](https://packagist.org/packages/amostajo/laravel-shop-gateway-omnipay)[![Total Downloads](https://camo.githubusercontent.com/515eecfed3ec4665904da886cdba14e64a6f70e8e6f80abc3a95553b1037ce66/68747470733a2f2f706f7365722e707567782e6f72672f616d6f7374616a6f2f6c61726176656c2d73686f702d676174657761792d6f6d6e697061792f646f776e6c6f616473)](https://packagist.org/packages/amostajo/laravel-shop-gateway-omnipay)[![License](https://camo.githubusercontent.com/8015a7ff5fb5aea34621590d48d9308ffc284af59ed518494b47dd650680841e/68747470733a2f2f706f7365722e707567782e6f72672f616d6f7374616a6f2f6c61726176656c2d73686f702d676174657761792d6f6d6e697061792f6c6963656e7365)](https://packagist.org/packages/amostajo/laravel-shop-gateway-omnipay)

Omnipay Gateway solution for [Laravel Shop](https://github.com/amsgames/laravel-shop).

Enables multiple gateway payment, like PayPal, 2Checkout, Stripe and others. See the full list at [Omnipay's page](https://github.com/thephpleague/omnipay).

Gateways
--------

[](#gateways)

This package comes with:

- Omnipay

Contents
--------

[](#contents)

- [Installation](#installation)
- [Adding a service](#adding-a-service)
- [Gateway Usage](#gateway-usage)
    - [Accessing Omnipay](#accessing-omnipay)
    - [Adding Options](#adding-options)
    - [Callbacks](#callbacks)
- [Tested Services](#tested-services)
- [License](#license)
- [Additional Information](#aditional-information)

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

[](#installation)

Add

```
"amostajo/laravel-shop-gateway-omnipay": "1.0.*"
```

to your `composer.json`. Then run `composer install` or `composer update`.

Then in your `config/shop.php` add

```
'omnipay'           =>  Amostajo\LaravelShopGatewayOmnipay\GatewayOmnipay::class,
```

in the `gateways` array.

Adding a service
----------------

[](#adding-a-service)

Once installed, the next step will be to add the service of your choice in `composer.json` file.

The services available are listed here:

For example, the following dependency must be added to use **Stripe**:

```
"omnipay/stripe": "~2.0"
```

Gateway Usage
-------------

[](#gateway-usage)

The following example will give you an idea of how use and access omnipay:

```
// (1) - Set gateway
Shop::setGateway('omnipay');

// (2) - Indicate service to use
Shop::gateway()->create('PayPal_Rest');

// (3) - Initialize your service (varies from service)
Shop::gateway()->omnipay->initialize([
	'clientId' => '...',
	'secret'   => '...',
	'testMode' => true,
]);

// (4) - Add credit card for validation (optional depending service)
Shop::gateway()->setCreditCard([
	'number' 			=> '4111111111111111',
	'expiryMonth'		=> '1',
	'expiryYear'		=> '2019',
	'cvv'				=> '123',
	'firstName'			=> 'John',
	'lastName'			=> 'Doe',
	'billingAddress1'	=> '666 grand canyon',
	'billingCountry'	=> 'US',
	'billingCity'		=> 'TX',
	'billingPostcode'	=> '12345',
	'billingState'		=> 'TX',
]);

// (5) - Call checkout
if (!Shop::checkout()) {
  echo Shop::exception()->getMessage(); // echos: card validation error.
}

// (6) - Create order
$order = Shop::placeOrder();

// (7) - Review payment
if ($order->hasFailed) {

  echo Shop::exception()->getMessage(); // echos: payment error.

}
```

The lines may vary depending on the service chosen.

*NOTE:* Checkout and placing order shouldn't vary from standard Laravel Shop flow.

### Accessing Omnipay

[](#accessing-omnipay)

You can always access the `omnipay` object if you need to set or call any specific method required by a service:

```
// (1) - Set gateway
Shop::setGateway('omnipay');
Shop::gateway()->create('Stripe');

// (2) - Setting method / calling specific method
Shop::gateway()->omnipay->setSpecific();
```

### Adding Options

[](#adding-options)

You can add more options, apart from `amount`, `currency` and `card`, to the authorization and purchase methods:

```
// (1) - Set gateway
Shop::setGateway('omnipay');
Shop::gateway()->create('Stripe');

// (2) - Adding an option
Shop::gateway()->addOption('token', $stripetoken);

// (3) - Any operation that follows
Shop::checkout();
```

### Callbacks

[](#callbacks)

Use the following example when callbacks are needed:

```
// (1) - Set gateway
Shop::setGateway('omnipay');
Shop::gateway()->create('PayPal_Express');

// (2) - Authentication
Shop::gateway()->omnipay->setUsername('...');
Shop::gateway()->omnipay->setPassword('...');

// (2) - Call checkout / OPTIONAL
Shop::checkout();

// (3) - Create order
$order = Shop::placeOrder();

// (4) - Review order and redirect to payment
if ($order->isPending) {

  // PayPal URL to redirect to proceed with payment
  $approvalUrl = Shop::gateway()->getApprovalUrl();

  // Redirect to url
  return redirect($approvalUrl);
}

// (5) - Callback
// You don't have to do anything.
// Laravel Shop will handle the callback and redirect the customer to the configured route.
```

### Tested Services

[](#tested-services)

- PayPal
- Stripe

License
-------

[](#license)

This package is free software distributed under the terms of the MIT license.

Additional Information
----------------------

[](#additional-information)

This package uses [Omnipay](https://github.com/thephpleague/omnipay).

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity22

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity62

Established project with proven stability

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 ~6 days

Total

5

Last Release

3842d ago

Major Versions

v0.0.9 → v1.0.12015-10-13

### Community

Maintainers

![](https://www.gravatar.com/avatar/f2cdad4e398292477582ba8ec4ab02a96fa645cd620518a5bcf697cd788c96c3?d=identicon)[amostajo](/maintainers/amostajo)

---

Tags

laravelstripegatewaypaypalomnipayauthorize.net2checkoutlaravel-shop

### Embed Badge

![Health badge](/badges/amostajo-laravel-shop-gateway-omnipay/health.svg)

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

###  Alternatives

[payum/payum-bundle

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

59510.3M40](/packages/payum-payum-bundle)[payum/payum-laravel-package

Rich payment solutions for Laravel framework. Paypal, payex, authorize.net, be2bill, omnipay, recurring paymens, instant notifications and many more

12842.5k](/packages/payum-payum-laravel-package)[recca0120/laravel-payum

Rich payment solutions for Laravel framework. Paypal, payex, authorize.net, be2bill, omnipay, recurring paymens, instant notifications and many more

741.5k](/packages/recca0120-laravel-payum)[payum/payum-yii-extension

Rich payment solutions for Yii framework. Paypal, payex, authorize.net, be2bill, omnipay, recurring paymens, instant notifications and many more

1211.8k](/packages/payum-payum-yii-extension)[amsgames/laravel-shop-gateway-paypal

PayPal gateway for Laravel Shop package.

1210.8k6](/packages/amsgames-laravel-shop-gateway-paypal)

PHPackages © 2026

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