PHPackages                             amonger/laravel-payment-commands - 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. amonger/laravel-payment-commands

ActiveLibrary[Payment Processing](/categories/payments)

amonger/laravel-payment-commands
================================

Payment commands for laravel

v0.1.5(9y ago)4710MITPHPPHP ^7.0

Since Jun 18Pushed 9y ago1 watchersCompare

[ Source](https://github.com/amonger/laravel-payment-commands)[ Packagist](https://packagist.org/packages/amonger/laravel-payment-commands)[ RSS](/packages/amonger-laravel-payment-commands/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (3)Dependencies (1)Versions (7)Used By (0)

Laravel Payment Commands
========================

[](#laravel-payment-commands)

This repo contains a set of commands which allow you to use Laravels command bus to take payments through paypal express (with more to come).

Setting up
----------

[](#setting-up)

Initially you're going to have to find your api details, which you can find under your profile page on paypal.

You'll need to add these to your .env file

```
PAYPAL_USERNAME=username
PAYPAL_PASSWORD=password
PAYPAL_SIGNATURE=signature
#PAYPAL_TEST_MODE=true # Be sure to use this if accessing a sandbox!

```

You'll then need to add the gateway service provider to your app.php. This binds the provider to the GatewayInterface.

```
    'providers' => [
        ...
        PaymentCommands\Paypal\Providers\GatewayServiceProvider::class
    ],
```

Dispatching Commands
--------------------

[](#dispatching-commands)

After this has been added, you're good to go! Just fire the command bus in your controller for handling the payment. This will return the redirect url, which you can then redirect to.

```
    public function index()
    {
        $cancelUrl = url('/cancel');
        $returnUrl = url('/capture');
        $currency = 'GBP';

        $items = [
            [
                'price' => 200,
                'description' => 'A bike',
                'quantity' => 1
            ]
        ];

        $redirectUrl = $this->dispatch(new MakePayment($items, $currency, $cancelUrl, $returnUrl));
        return redirect($redirectUrl);
    }
```

After the payment has been completed, you redirect the user back to your website.

```
    public function capture()
    {
        $this->dispatch(new CapturePayment(Input::get('token'), Input::get('payerID')));
    }
```

Extending
---------

[](#extending)

Each stage of the command bus fires an event which you can hook into.

You can read about how to implement this by looking at the [Event Documentation](http://laravel.com/docs/5.1/events)

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity52

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

Recently: every ~108 days

Total

6

Last Release

3555d ago

PHP version history (2 changes)v0.1.0PHP ^5.5

v0.1.4PHP ^7.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/9bfc4668b3600a449283b9375d4c111420c80fcd31e14c80ab698c7a31248823?d=identicon)[haveacigaro](/maintainers/haveacigaro)

---

Top Contributors

[![amonger](https://avatars.githubusercontent.com/u/147537?v=4)](https://github.com/amonger "amonger (9 commits)")

### Embed Badge

![Health badge](/badges/amonger-laravel-payment-commands/health.svg)

```
[![Health](https://phpackages.com/badges/amonger-laravel-payment-commands/health.svg)](https://phpackages.com/packages/amonger-laravel-payment-commands)
```

###  Alternatives

[omnipay/paypal

PayPal gateway for Omnipay payment processing library

3156.8M53](/packages/omnipay-paypal)[eduardokum/laravel-boleto

Biblioteca com boletos para o laravel

626351.9k2](/packages/eduardokum-laravel-boleto)[tbbc/money-bundle

This is a Symfony bundle that integrates moneyphp/money library (Fowler pattern): https://github.com/moneyphp/money.

1961.9M](/packages/tbbc-money-bundle)[2checkout/2checkout-php

2Checkout PHP Library

83740.3k2](/packages/2checkout-2checkout-php)[smhg/sepa-qr-data

Generate QR code data for SEPA payments

61717.2k5](/packages/smhg-sepa-qr-data)[omnipay/coinbase

Coinbase driver for the Omnipay payment processing library

18558.8k1](/packages/omnipay-coinbase)

PHPackages © 2026

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