PHPackages                             threesquared/laravel-paymill - 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. threesquared/laravel-paymill

ActiveLibrary[Payment Processing](/categories/payments)

threesquared/laravel-paymill
============================

Laravel wrapper for the Paymill API

1.3.2(9y ago)121.3k4[1 issues](https://github.com/threesquared/laravel-paymill/issues)MITPHPPHP &gt;=5.4.0

Since Feb 4Pushed 9y ago2 watchersCompare

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

READMEChangelog (5)Dependencies (3)Versions (8)Used By (0)

Laravel Paymill
===============

[](#laravel-paymill)

[![Build Status](https://camo.githubusercontent.com/ad4dd7ae01c805b164a950b9389de7f0c8c4a935246834cf1585de2f0b92ef01/68747470733a2f2f7472617669732d63692e6f72672f7468726565737175617265642f6c61726176656c2d7061796d696c6c2e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/threesquared/laravel-paymill) [![Latest Stable Version](https://camo.githubusercontent.com/23a69e7646bfdf38831483cbde2e637f82444b55f8d5d3cd533f4bf16a756d46/68747470733a2f2f706f7365722e707567782e6f72672f7468726565737175617265642f6c61726176656c2d7061796d696c6c2f76657273696f6e)](https://packagist.org/packages/threesquared/laravel-paymill) ![Packagist](https://camo.githubusercontent.com/1fff19fc6749fb3109036cc705f335216173686295bbacc0f2e8fa62cb8c0fe7/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7468726565737175617265642f6c61726176656c2d7061796d696c6c2e7376673f6d61784167653d32353932303030) ![Packagist](https://camo.githubusercontent.com/5fb8b334a84f54ea110f558081b889ef90d9e69ee36a9269017fe84dd0f14e31/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f6c2f7468726565737175617265642f6c61726176656c2d7061796d696c6c2e7376673f6d61784167653d32353932303030)

Laravel Paymill is a Laravel 5 specific wrapper for the [Paymill PHP](https://github.com/paymill/paymill-php) library.

- [Install](#install)
- [Configuration](#configuration)
- [Usage](#usage)

**Please use the 1.0.0 release for Laravel 4**

Install
-------

[](#install)

Simply add the following line to your `composer.json` and run install/update:

```
"threesquared/laravel-paymill": "~1.3"

```

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

[](#configuration)

Publish the package config files to configure your api keys:

```
php artisan vendor:publish

```

You will also need to add the service provider and the facade alias to your `config/app.php`:

```
'providers' => array(
  Threesquared\LaravelPaymill\LaravelPaymillServiceProvider::class
)

'aliases' => array(
  'Paymill'   => Threesquared\LaravelPaymill\Facades\Paymill::class
),
```

By default the package will use your test keys. In order to use the live Paymill keys you need to set the `PAYMILL_ENV` enviroment variable.

```
PAYMILL_ENV=live

```

### Usage

[](#usage)

*Please see the [Paymill API](https://developers.paymill.com/API/index) for full documentation on all available entities, actions and methods.*

First start with instantiating the Paymill entity you want to work with.

```
$transaction = Paymill::Transaction();
```

Available entities are:

- [Payment](https://developers.paymill.com/API/index#payments)
- [Transaction](https://developers.paymill.com/API/index#transactions)
- [Client](https://developers.paymill.com/API/index#clients)
- [Preauthorization](https://developers.paymill.com/API/index#preauthorizations)
- [Refund](https://developers.paymill.com/API/index#refunds)
- [Offer](https://developers.paymill.com/API/index#offers)
- [Subscription](https://developers.paymill.com/API/index#subscriptions)

Then add in any additional information the request requires with setter methods.

```
$transaction->setAmount(4200)
    ->setCurrency('EUR')
    ->setPayment('pay_2f82a672574647cd911d')
    ->setDescription('Test Transaction');
```

Finally chose which action you want to perform.

```
$transaction->create();
```

Available actions are:

- create()
- details()
- update()
- all()
- delete()

So an example to create a transaction would be:

```
try {

    Paymill::Transaction()
        ->setAmount(4200)
        ->setCurrency('EUR')
        ->setPayment('pay_2f82a672574647cd911d')
        ->setDescription('Test Transaction')
        ->create();

} catch(PaymillException $e) {

    $e->getResponseCode();
    $e->getStatusCode();
    $e->getErrorMessage();

}
```

You can set the ID of an entity by passing it as an argument.

```
Paymill::Client('client_8127a65bf3c84676c918')->details();
```

Payment create can also take the token as an argument.

```
Paymill::Payment()->create('098f6bcd4621d373cade4e832627b4f6');
```

You can also use the `$paymill_public_key` variable across all blade views.

```

  var PAYMILL_PUBLIC_KEY = '{{ $paymill_public_key }}';

```

###  Health Score

32

—

LowBetter than 71% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity24

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity63

Established project with proven stability

 Bus Factor1

Top contributor holds 88.2% 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 ~100 days

Recently: every ~112 days

Total

7

Last Release

3508d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/27ef1eafa7cfeb2a4d815ff6329e472795ab626f27504a1467f0df43fded7d7e?d=identicon)[Ben-Speakman](/maintainers/Ben-Speakman)

---

Top Contributors

[![threesquared](https://avatars.githubusercontent.com/u/892142?v=4)](https://github.com/threesquared "threesquared (15 commits)")[![christianheidorn](https://avatars.githubusercontent.com/u/16607595?v=4)](https://github.com/christianheidorn "christianheidorn (2 commits)")

---

Tags

laravellaravel-5-packagepaymilllaravelpackagebillingpaymentspaymill

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/threesquared-laravel-paymill/health.svg)

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

###  Alternatives

[yansongda/laravel-pay

专注 Alipay/WeChat/Unipay 的 laravel 支付扩展包

1.1k353.2k9](/packages/yansongda-laravel-pay)[mmanos/laravel-billing

A billing package for Laravel 4.

451.3k](/packages/mmanos-laravel-billing)[musahmusah/laravel-multipayment-gateways

A Laravel Package that makes implementation of multiple payment Gateways endpoints and webhooks seamless

852.2k1](/packages/musahmusah-laravel-multipayment-gateways)[asciisd/knet

Knet package is provides an expressive, fluent interface to KNet's payment services.

141.1k](/packages/asciisd-knet)

PHPackages © 2026

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