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

ActiveLibrary

paynl/omnipay-paynl
===================

Pay.nl driver for the Omnipay payment processing library

5.0.0(2y ago)271.7k↓16.7%11[1 PRs](https://github.com/paynl/omnipay-paynl/pulls)1MITPHP

Since Dec 23Pushed 2y ago7 watchersCompare

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

READMEChangelog (7)Dependencies (4)Versions (19)Used By (1)

 [![](https://camo.githubusercontent.com/5c75d96c38b24c983eec9a63ba2a31737c29a55fb45c1f75df91a1a5f8a5803f/68747470733a2f2f7777772e7061792e6e6c2f75706c6f6164732f312f6272616e64732f6d61696e5f6c6f676f2e706e67)](https://camo.githubusercontent.com/5c75d96c38b24c983eec9a63ba2a31737c29a55fb45c1f75df91a1a5f8a5803f/68747470733a2f2f7777772e7061792e6e6c2f75706c6f6164732f312f6272616e64732f6d61696e5f6c6f676f2e706e67)

PAY. Omnipay driver
===================

[](#pay-omnipay-driver)

Description
===========

[](#description)

PAY. driver for the Omnipay payment processing library

- [Description](#description)
- [Available payment methods](#available-payment-methods)
- [Requirements](#requirements)
- [Installation](#installation)
- [Update instructions](#update-instructions)
- [Usage](#usage)
- [Support](#support)

Available payment methods
=========================

[](#available-payment-methods)

Bank PaymentsCreditcardsGift cards &amp; VouchersPay by invoiceOthersiDEAL + QRVisaVVV CadeaukaartAfterPayPayPalBancontact + QRMastercardWebshop GiftcardAchteraf betalen via BillinkWeChatPayGiropayAmerican ExpressFashionChequeFocum AchterafBetalen.nlAmazonPayMyBankCarte BancairePodium CadeaukaartCapayable Achteraf BetalenCashlySOFORTPostePayGezondheidsbonin3 keer betalen, 0% rentePay Fixed Price (phone)MaestroDankortFashion GiftcardKlarnaInstore Payments (POS)Bank TransferCartasiGivaCardSprayPayPrzelewy24TikkieDe CadeaukaartYourGiftCreditclickApple PayMultibancoPaysafecardPayconiqHuis en Tuin CadeauRequirements
============

[](#requirements)

```
PHP 5.6 or higher

```

Installation
============

[](#installation)

#### Installing

[](#installing)

In command line, navigate to the installation directory of Omnipay

Enter the following command:

```
composer require league/omnipay:^3 paynl/omnipay-paynl

```

The plugin is now installed

##### Setup

[](#setup)

1. Create a new php file
2. Use the following code:

```
# require autoloader
require_once('vendor/autoload.php');

use Omnipay\Omnipay;

# Setup payment gateway
$gateway = Omnipay::create('Paynl');

$gateway->setApiToken('abcdefgdjwaiodjwaodjaowidwad');
$gateway->setTokenCode('AT-0000-0000');
$gateway->setServiceId('SL-0000-0000');

```

3. Enter the TokenCode, API token and serviceID (these can be found in the PAY. Admin Panel --&gt;
4. Save the file
5. Require the file where you wish to use the plugin.

Go to the *Manage* / *Services* tab in the PAY. Admin Panel to enable extra payment methods.

#### Update instructions

[](#update-instructions)

In command line, navigate to the installation directory of Omnipay

Enter the following command:

```
composer update league/omnipay:^3 paynl/omnipay-paynl

```

The plugin has now been updated

Usage
=====

[](#usage)

PAY. items

```
# Use PAY. Item class
use Omnipay\Paynl\Common\Item;

# Add items to transaction
$arrItems = array();
$item = new Item();
$item->setProductId('SKU01')
        ->setProductType('ARTICLE')
        ->setVatPercentage(21)
        ->setDescription('Description')
        ->setName('PAY. article')
        ->setPrice('10')
        ->setQuantity(4);
$arrItems[] = $item;

$item = new Item();
$item->setProductId('SHIP01')
        ->setProductType('SHIPPING')
        ->setVatPercentage(21)
        ->setDescription('Description')
        ->setName('PAY. shipping')
        ->setPrice('5')
        ->setQuantity(1);
$arrItems[] = $item;

$item = new Item();
$item->setProductId('SKU02')
        ->setProductType('DISCOUNT')
        ->setVatPercentage(21)
        ->setDescription('Description')
        ->setName('PAY. promotion')
        ->setPrice('1')
        ->setQuantity(1);
$arrItems[] = $item;

```

Start a transaction

```
# Send purchase request
$response = $gateway->purchase(
    [
        'amount' => '46.00',
        'currency' => 'EUR',
        'transactionReference' => 'referenceID1',
        'clientIp' => '192.168.192.12',
        'returnUrl' => 'http://www.yourdomain.com/return_from_pay.php',
        'items' => $arrItems,
        'card' => array(
            'firstName' => 'Example',
            'lastName' => 'User',
            'gender' => 'M',
            'birthday' => '01-02-1992',
            'phone' => '1111111111111111',
            'email' => 'john@example.com',
            'country' => 'NL',

            'shippingAddress1' => 'Shippingstreet 1B',
            'shippingAddress2' => '',
            'shippingCity' => 'Shipingtown',
            'shippingPostcode' => '1234AB',
            'shippingState' => '',
            'country' => 'NL',

            'billingFirstName' => 'Billingexample',
            'billingLastName' => 'Billinguser',
            'billingAddress1' => 'Billingstreet 1B',
            'billingAddress2' => '',
            'billingCity' => 'Billingtown',
            'billingPostcode' => '1234AB',
            'billingState' => '',
            'country' => 'NL'
        )
    ]
)->send();

# Process response
if ($response->isSuccessful()) {

    # Payment was successful
    var_dump($response);

} elseif ($response->isRedirect()) {

    # Redirect to offsite payment gateway
    $response->redirect();

} else {

    # Payment failed
    echo $response->getMessage();
}

```

Refund a transaction

```
$response = $gateway->refund([
    'transactionReference' => "PAY. transactionId",
    'amount' => '46.00',
    'currency' => 'USD',
    'transactionId' => 765897
])->send();

if ($response->isSuccessful()) {

    # Refund was successful
    print_r($response);

} else {

    # Refund failed
    echo $response->getMessage();
}

```

Capture a transaction

```
$response = $gateway->capture([
    'transactionReference' => "PAY. transactionId",
    'items' => $arrItems
])->send();

if ($response->isSuccessful()) {

    # Capture was successful
    print_r($response);

} else {

    # Capture failed
    echo $response->getMessage();
}

```

Support
=======

[](#support)

Contact us:

###  Health Score

41

—

FairBetter than 89% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity36

Limited adoption so far

Community24

Small or concentrated contributor base

Maturity72

Established project with proven stability

 Bus Factor2

2 contributors hold 50%+ of commits

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

Recently: every ~311 days

Total

16

Last Release

897d ago

Major Versions

v0.1-alpha → v1.0.02016-11-08

v1.0.6 → v3.0.12018-10-23

v1.0.7 → v3.0.22019-01-30

v3.0.4 → v4.0.02022-09-21

v3.x-dev → 5.0.02023-12-04

### Community

Maintainers

![](https://www.gravatar.com/avatar/3de4fdf653f1c9f2fd2fd25bb1ee8c5cfc05051f17a41759099e44fc47f6a089?d=identicon)[paynl](/maintainers/paynl)

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

---

Top Contributors

[![Grendel7](https://avatars.githubusercontent.com/u/1823324?v=4)](https://github.com/Grendel7 "Grendel7 (11 commits)")[![bakkerpeter](https://avatars.githubusercontent.com/u/23257320?v=4)](https://github.com/bakkerpeter "bakkerpeter (10 commits)")[![andypieters](https://avatars.githubusercontent.com/u/6470601?v=4)](https://github.com/andypieters "andypieters (8 commits)")[![Tomassie91](https://avatars.githubusercontent.com/u/645351?v=4)](https://github.com/Tomassie91 "Tomassie91 (3 commits)")[![woutse](https://avatars.githubusercontent.com/u/6763638?v=4)](https://github.com/woutse "woutse (3 commits)")[![jeffreydevreede](https://avatars.githubusercontent.com/u/2203546?v=4)](https://github.com/jeffreydevreede "jeffreydevreede (2 commits)")[![kevinverschoor](https://avatars.githubusercontent.com/u/61683999?v=4)](https://github.com/kevinverschoor "kevinverschoor (2 commits)")

### Embed Badge

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

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

###  Alternatives

[silverstripe/silverstripe-omnipay

SilverStripe Omnipay Payment Module

38106.0k15](/packages/silverstripe-silverstripe-omnipay)

PHPackages © 2026

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