PHPackages                             yzh52521/think-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. yzh52521/think-omnipay

ActiveLibrary[Payment Processing](/categories/payments)

yzh52521/think-omnipay
======================

Integrates Omnipay with thinkphp and provides an easy configuration.

v1.0.5(3y ago)110MITPHPPHP ^7.2.5|^8.0

Since Jun 21Pushed 3y ago1 watchersCompare

[ Source](https://github.com/yzh52521/think-omnipay)[ Packagist](https://packagist.org/packages/yzh52521/think-omnipay)[ RSS](/packages/yzh52521-think-omnipay/feed)WikiDiscussions main Synced today

READMEChangelog (6)Dependencies (3)Versions (6)Used By (0)

Omnipay for Thinkphp
====================

[](#omnipay-for-thinkphp)

[![Total Downloads](https://camo.githubusercontent.com/c930e426258b5b020c8ba37a07b8ddff38570ba9b030ad3dbe6916d279a9aead/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f797a6835323532312f7468696e6b2d6f6d6e697061792e737667)](https://packagist.org/packages/yzh52521/think-omnipay)[![Latest Version](https://camo.githubusercontent.com/f1dbf47d6be5be029cf93c079c14ed4509dfede8a38e3aa2c3fd35ee16eeb496/687474703a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f797a6835323532312f7468696e6b2d6f6d6e697061792e737667)](https://github.com/ignited/yzh52521/think-omnipay/releases)

Integrates the [Omnipay](https://github.com/adrianmacneil/omnipay) PHP library with Laravel to make Configuring multiple payment tunnels a breeze!

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

[](#installation)

Include the laravel-omnipay package as a dependency in your `composer.json`:

```
composer require yzh52521/think-omnipay

```

**Note:** You don't need to include the `omnipay/common` in your composer.json - it has already been included `think-omnipay`.

### Install Required Providers

[](#install-required-providers)

Now just include each gateway as you require, to included PayPal for example:

```
composer require omnipay/paypal "3.*"

```

Alternatively you can include every gateway by the following:

```
composer require omnipay/omnipay "3.*"

```

**Note:** this requires a large amount of composer work as it needs to fetch each seperate repository. This is not recommended.

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

[](#configuration)

#### PayPal Express Example

[](#paypal-express-example)

Here is an example of how to configure password, username and, signature with paypal express checkout driver

```
...
'gateways' => [
    'paypal' => [
        'driver'  => 'PayPal_Express',
        'options' => [
            'username'  => 'coolusername',
            'password'  => 'strongpassword',
            'signature' => '',
            'solutionType' => '',
            'landingPage'    => '',
            'headerImageUrl' => '',
            'brandName' =>  'Your app name',
            'testMode' => true
        ]
    ],
]
...
```

Usage
-----

[](#usage)

```
$cardInput = [
	'number'      => '4444333322221111',
	'firstName'   => 'MR. WALTER WHITE',
	'expiryMonth' => '03',
	'expiryYear'  => '16',
	'cvv'         => '333',
];

$card = \ThinkOmnipay\Facade::creditCard($cardInput);

$response = \ThinkOmnipay\Facade::purchase([
	'amount'    => '100.00',
	'returnUrl' => 'http://bobjones.com/payment/return',
	'cancelUrl' => 'http://bobjones.com/payment/cancel',
	'card'      => $cardInput
])->send();

dd($response->getMessage());
```

This will use the gateway specified in the config as `default`.

However, you can also specify a gateway to use.

```
\ThinkOmnipay\Facade::setGateway('paypal');

$response = \ThinkOmnipay\Facade::purchase([
	'amount' => '100.00',
	'card'   => $cardInput
])->send();

dd($response->getMessage());
```

In addition you can make an instance of the gateway.

```
$gateway = \ThinkOmnipay\Facade::gateway('paypal');
```

License
-------

[](#license)

This package is open-sourced software licensed under the [MIT license](https://opensource.org/licenses/MIT).

###  Health Score

24

—

LowBetter than 31% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity53

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

Total

5

Last Release

1107d ago

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/15060466?v=4)[听风吹雨](/maintainers/yuanzhihai)[@yuanzhihai](https://github.com/yuanzhihai)

---

Top Contributors

[![yuanzhihai](https://avatars.githubusercontent.com/u/15060466?v=4)](https://github.com/yuanzhihai "yuanzhihai (13 commits)")

---

Tags

paymentsomnipaythinkphp

### Embed Badge

![Health badge](/badges/yzh52521-think-omnipay/health.svg)

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

###  Alternatives

[chargebee/chargebee-php

ChargeBee API client implementation for PHP

758.5M9](/packages/chargebee-chargebee-php)[ignited/laravel-omnipay

Integrates Omnipay with Laravel and provides an easy configuration.

5211.1M12](/packages/ignited-laravel-omnipay)

PHPackages © 2026

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