PHPackages                             recca0120/laravel-payum - 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. recca0120/laravel-payum

ActiveLibrary[Payment Processing](/categories/payments)

recca0120/laravel-payum
=======================

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

v1.1.5(9y ago)741.5k24[4 issues](https://github.com/recca0120/laravel-payum/issues)MITPHPPHP &gt;=5.5.9

Since Jul 11Pushed 8y ago4 watchersCompare

[ Source](https://github.com/recca0120/laravel-payum)[ Packagist](https://packagist.org/packages/recca0120/laravel-payum)[ RSS](/packages/recca0120-laravel-payum/feed)WikiDiscussions master Synced 5d ago

READMEChangelog (10)Dependencies (12)Versions (25)Used By (0)

[Payum](https://github.com/Payum/Payum) for Laravel 5
-----------------------------------------------------

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

[![StyleCI](https://camo.githubusercontent.com/82913ae7b315f1ba347704ce05e6ddda3e0d80005209b3cfb778a9f0d5f880e2/68747470733a2f2f7374796c6563692e696f2f7265706f732f36323732393739372f736869656c643f7374796c653d666c6174)](https://styleci.io/repos/62729797)[![Build Status](https://camo.githubusercontent.com/121c06d43daa7f3fbb783c461f843be98190308819a1e8c86ba31183af156f96/68747470733a2f2f7472617669732d63692e6f72672f7265636361303132302f6c61726176656c2d706179756d2e737667)](https://travis-ci.org/recca0120/laravel-payum)[![Total Downloads](https://camo.githubusercontent.com/c238e7ead73c5bdf761a5268a8ea71e724e12d05970826bb37e52275d8fdfe9a/68747470733a2f2f706f7365722e707567782e6f72672f7265636361303132302f6c61726176656c2d706179756d2f642f746f74616c2e737667)](https://packagist.org/packages/recca0120/laravel-payum)[![Latest Stable Version](https://camo.githubusercontent.com/8809fb34bf6b915e22e6fe990f20a932a9f03e576174ed7c23b938ca086cf721/68747470733a2f2f706f7365722e707567782e6f72672f7265636361303132302f6c61726176656c2d706179756d2f762f737461626c652e737667)](https://packagist.org/packages/recca0120/laravel-payum)[![Latest Unstable Version](https://camo.githubusercontent.com/b112d28710e5c8e4385c5056bc8fd2b5617d1b70fc049a6c3a86971b7e2d37e7/68747470733a2f2f706f7365722e707567782e6f72672f7265636361303132302f6c61726176656c2d706179756d2f762f756e737461626c652e737667)](https://packagist.org/packages/recca0120/laravel-payum)[![License](https://camo.githubusercontent.com/0d4e99cd6419ca785f770be91de68a2e6d36684530d0988702e43659ab2e9eb0/68747470733a2f2f706f7365722e707567782e6f72672f7265636361303132302f6c61726176656c2d706179756d2f6c6963656e73652e737667)](https://packagist.org/packages/recca0120/laravel-payum)[![Monthly Downloads](https://camo.githubusercontent.com/4317f3446e8fdf610b41fe24419a35c03d866b215694b01509fbf4d0f771b6db/68747470733a2f2f706f7365722e707567782e6f72672f7265636361303132302f6c61726176656c2d706179756d2f642f6d6f6e74686c79)](https://packagist.org/packages/recca0120/laravel-payum)[![Daily Downloads](https://camo.githubusercontent.com/5e5b836888725b7d97e9a2c4fe2f1449c156a5c935dd265e1e02e54ae1cda1b0/68747470733a2f2f706f7365722e707567782e6f72672f7265636361303132302f6c61726176656c2d706179756d2f642f6461696c79)](https://packagist.org/packages/recca0120/laravel-payum)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/9d20d4b6247026be752a73fe9490372200e3fa1be178b189a792908371a86e94/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f7265636361303132302f6c61726176656c2d706179756d2f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/recca0120/laravel-payum/?branch=master)[![Code Coverage](https://camo.githubusercontent.com/73e43a4711d580abf69c14fa201dc41635f9366a1c2e9a51bdc37d0525cf5a2e/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f7265636361303132302f6c61726176656c2d706179756d2f6261646765732f636f7665726167652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/recca0120/laravel-payum/?branch=master)

Installing
----------

[](#installing)

To get the latest version of Laravel Exceptions, simply require the project using [Composer](https://getcomposer.org):

```
composer require recca0120/laravel-payum
```

Instead, you may of course manually update your require block and run `composer update` if you so choose:

```
{
    "require": {
        "recca0120/laravel-payum": "^1.0.6"
    }
}
```

Include the service provider within `config/app.php`. The service povider is needed for the generator artisan command.

```
'providers' => [
    ...
    Recca0120\LaravelPayum\LaravelPayumServiceProvider::class,
    ...
];
```

Config
------

[](#config)

```
return [
    'route' => [
        'prefix' => 'payment',
        'as' => 'payment.',
        'middleware' => ['web'],
    ],

    'storage' => [
        // options: eloquent, filesystem
        'token' => 'filesystem',

        // options: eloquent, filesystem
        'gatewayConfig' => 'filesystem',
    ],

    'gatewayConfigs' => [
        // 'customFactoryName' => [
        //     'factory'  => 'FactoryClass',
        //     'username' => 'username',
        //     'password' => 'password',
        //     'sandbox'  => false
        // ],
    ],
];
```

VerifyCsrfToken
---------------

[](#verifycsrftoken)

```
namespace App\Http\Middleware;

use Illuminate\Foundation\Http\Middleware\VerifyCsrfToken as BaseVerifier;

class VerifyCsrfToken extends BaseVerifier
{
    /**
     * The URIs that should be excluded from CSRF verification.
     *
     * @var array
     */
    protected $except = [
        'payment/*'
    ];
}
```

Controller
----------

[](#controller)

```
namespace App\Http\Controllers;

use Illuminate\Http\Request;
use Illuminate\Routing\Controller as BaseController;
use Payum\Core\GatewayInterface;
use Payum\Core\Model\PaymentInterface;
use Payum\Core\Payum;
use Payum\Core\Request\GetHumanStatus;
use Payum\Core\Security\TokenInterface;
use Payum\Core\Storage\StorageInterface;
use Recca0120\LaravelPayum\Service\PayumService;

class PaymentController extends BaseController
{
    public function capture(PayumService $payumService)
    {
        return $payumService->capture('allpay', function (
            PaymentInterface $payment,
            $gatewayName,
            StorageInterface $storage,
            Payum $payum
        ) {
            $payment->setNumber(uniqid());
            $payment->setCurrencyCode('TWD');
            $payment->setTotalAmount(2000);
            $payment->setDescription('A description');
            $payment->setClientId('anId');
            $payment->setClientEmail('foo@example.com');
            $payment->setDetails([
                'Items' => [
                    [
                        'Name' => '歐付寶黑芝麻豆漿',
                        'Price' => (int) '2000',
                        'Currency' => '元',
                        'Quantity' => (int) '1',
                        'URL' => 'dedwed',
                    ],
                ],
            ]);
        });
    }

    public function done(PayumService $payumService, $payumToken)
    {
        return $payumService->done($payumToken, function (
            GetHumanStatus $status,
            PaymentInterface $payment,
            GatewayInterface $gateway,
            TokenInterface $token
        ) {
            return response()->json([
                'status' => $status->getValue(),
                'client' => [
                    'id' => $payment->getClientId(),
                    'email' => $payment->getClientEmail(),
                ],
                'number' => $payment->getNumber(),
                'description' => $payment->getCurrencyCode(),
                'total_amount' => $payment->getTotalAmount(),
                'currency_code' => $payment->getCurrencyCode(),
                'details' => $payment->getDetails(),
            ]);
        });
    }
}
```

Router
------

[](#router)

```
Route::get('payment', [
    'as'   => 'payment',
    'uses' => 'PaymentController@capture',
]);

Route::any('payment/done/{payumToken}', [
    'as'   => 'payment.done',
    'uses' => 'PaymentController@done',
]);
```

Eloquent
--------

[](#eloquent)

If you want use eloquent you need change config.php and create database

### Migrate

[](#migrate)

publish vendor

```
artisan vendor:publish --provider="Recca0120\LaravelPayum\LaravelPayumServiceProvider"
```

migrate

```
artisan migrate
```

modify config

```
return [
    'route' => [
        'prefix' => 'payment',
        'as' => 'payment.',
        'middleware' => ['web'],
    ],

    'storage' => [
        // options: eloquent, eloquent
        'token' => 'filesystem',

        // options: eloquent, filesystem
        'gatewayConfig' => 'filesystem',
    ],

    // 'customFactoryName' => [
    //     'factory'  => 'FactoryClass',
    //     'username' => 'username',
    //     'password' => 'password',
    //     'sandbox'  => false
    // ],
    'gatewayConfigs' => [
        'offline' => []
    ],
];
```

###  Health Score

37

—

LowBetter than 81% of packages

Maintenance19

Infrequent updates — may be unmaintained

Popularity31

Limited adoption so far

Community16

Small or concentrated contributor base

Maturity68

Established project with proven stability

 Bus Factor1

Top contributor holds 75% 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 ~10 days

Total

23

Last Release

3448d ago

Major Versions

v0.2.0 → v1.0.02016-09-13

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1390554?v=4)[Recca Tsai](/maintainers/recca0120)[@recca0120](https://github.com/recca0120)

---

Top Contributors

[![recca0120](https://avatars.githubusercontent.com/u/1390554?v=4)](https://github.com/recca0120 "recca0120 (6 commits)")[![roquie](https://avatars.githubusercontent.com/u/3214290?v=4)](https://github.com/roquie "roquie (2 commits)")

---

Tags

laravelpayment-gatewaypayumstripepaymentpaypalklarnaomnipayauthorize.netbe2billrecurring paymentpaypal express checkoutpaypal pro checkoutpayexofflineinstant notification

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/recca0120-laravel-payum/health.svg)

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

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3345.4M354](/packages/psalm-plugin-laravel)[payum/payum-bundle

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

59711.1M52](/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

12342.5k](/packages/payum-payum-laravel-package)[pressbooks/pressbooks

Pressbooks is an open source book publishing tool built on a WordPress multisite platform. Pressbooks outputs books in multiple formats, including PDF, EPUB, web, and a variety of XML flavours, using a theming/templating system, driven by CSS.

45844.8k1](/packages/pressbooks-pressbooks)[laravel/cashier

Laravel Cashier provides an expressive, fluent interface to Stripe's subscription billing services.

2.6k31.8M158](/packages/laravel-cashier)[roots/acorn

Framework for Roots WordPress projects built with Laravel components.

9922.4M146](/packages/roots-acorn)

PHPackages © 2026

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