PHPackages                             course-link/omnipay-polish-payments - 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. course-link/omnipay-polish-payments

ActiveLibrary[Payment Processing](/categories/payments)

course-link/omnipay-polish-payments
===================================

Polish payments drivers for the Omnipay payment processing library

0.0.8(2y ago)22581MITPHPPHP ^8.1

Since Jan 6Pushed 2y agoCompare

[ Source](https://github.com/Course-Link/omnipay-polish-payments)[ Packagist](https://packagist.org/packages/course-link/omnipay-polish-payments)[ Docs](https://github.com/Course-Link/omnipay-polish-payments)[ RSS](/packages/course-link-omnipay-polish-payments/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (8)Dependencies (9)Versions (9)Used By (1)

Omnipay Polish Payments
=======================

[](#omnipay-polish-payments)

[![run-tests](https://github.com/Course-Link/omnipay-polish-payments/actions/workflows/run-tests.yml/badge.svg)](https://github.com/Course-Link/omnipay-polish-payments/actions/workflows/run-tests.yml)[![Total Downloads](https://camo.githubusercontent.com/f6af5101c22aef0ee43b2926e901b2a04bdcf0eed3170dcbf1007628bb8b4544/687474703a2f2f706f7365722e707567782e6f72672f636f757273652d6c696e6b2f6f6d6e697061792d706f6c6973682d7061796d656e74732f646f776e6c6f616473)](https://packagist.org/packages/course-link/omnipay-polish-payments)[![PHP Version Require](https://camo.githubusercontent.com/b4be8b302ffc8a56d48254b02ce4720127667828ef643c0b8844bee6710755b6/687474703a2f2f706f7365722e707567782e6f72672f636f757273652d6c696e6b2f6f6d6e697061792d706f6c6973682d7061796d656e74732f726571756972652f706870)](https://packagist.org/packages/course-link/omnipay-polish-payments)

Polish Gateways support for the Omnipay PHP payment processing library.

1. [Installation](#installation)
2. [Examples](#examples)
3. [Configuration](#configuration)
    1. [imoje](#imoje)
    2. [Paynow](#paynow)
    3. [PayU](#payu)
    4. [Przelewy24](#przelewy24)
    5. [Tpay](#tpay)

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

[](#installation)

```
composer require course-link/omnipay-polish-payments
```

Examples
--------

[](#examples)

Here is a simple example of how to use Omnipay. As you can see, Omnipay has a consistent, well thought out API. As much as possible, we try to abstract the differences between the various payments gateways.

### Making a purchase

[](#making-a-purchase)

```
require_once  __DIR__ . '/vendor/autoload.php';

use Omnipay\Omnipay;
use CourseLink\Omnipay\Customer;

// Select gateway
$gateway = Omnipay::create('imoje');
$gateway = Omnipay::create('Paynow');
$gateway = Omnipay::create('PayU');
$gateway = Omnipay::create('Przelewy24');
$gateway = Omnipay::create('Tpay');
$gateway->initialize([]); // Pass gateway specific options

// Send purchase request
$response = $gateway->purchase([
    // Minimum options to use with any of package gateways
    'customer' => new Customer([
        'name' => 'John Doe',
        'firstName' => 'John',
        'lastName' => 'Doe',
        'email' => 'johnny@example.com',
        'address' => 'Testowa 25',
        'city' => 'Warszawa',
        'postcode' => '00-000',
        'country' => 'PL'
    ]),
    'language' => 'pl',
    'amount' => 99.99,
    'description' => 'Ebook',
    'client_ip' => '127.0.0.1',
    'currency' => 'pln',
    'transaction_id' => '1',
    'notifyUrl' => 'https://example.com/notify-url',
    'paymentMethod' => 150 // required for tpay gateway
])->send();

// Process response
if ($response->isSuccessful()) {
    // Payment was successful
    // This will never happen, since user will always be redirected to off-site payment gateway
    print_r($response);
} elseif ($response->isRedirect()) {
    // Redirect to offsite payment gateway
    $response->redirect();
} else {
    // Payment failed
    echo $response->getMessage();
}
```

### Accepting notification from gateway

[](#accepting-notification-from-gateway)

```
require_once  __DIR__ . '/vendor/autoload.php';

use Omnipay\Omnipay;

// Select gateway
$gateway = Omnipay::create('imoje');
$gateway = Omnipay::create('Paynow');
$gateway = Omnipay::create('PayU');
$gateway = Omnipay::create('Przelewy24');
$gateway = Omnipay::create('Tpay');
$gateway->initialize([]); // Pass gateway specific options

$notification = $gateway->acceptNotification();

$status = $notification->getTransactionStatus();
$data = $notification->getData();
$transactionReference = $notification->getTransactionReference();

if ($gateway->supportsCompletePurchase()) {
    // This is required for Przelewy24
    $response = $gateway->completePurchase(array_merge($purchaseOptions, $data))->send();
}
```

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

[](#configuration)

### imoje

[](#imoje)

#### Gateway

[](#gateway)

```
use Omnipay\Omnipay;

$gateway = Omnipay::create('imoje');
$gateway->initialize([
    'merchant_id' => '',
    'service_id' => '',
    'service_key' => '',
    'auth_token' => '',
    'test_mode' => false,
    'verify_ip_address' => true,
    'notification_ip_addresses' => [
    ],
]);
```

#### Purchase

[](#purchase)

```
$response = $gateway->purchase([
    'customer' => new Customer([
        'firstName' => 'John', //required
        'lastName' => 'Doe', // required
        'email' => 'johnny@example.com', // required
    ]),
    'language' => 'pl', //required
    'amount' => 99.99, //required
    'description' => 'Ebook',
    'currency' => 'pln', //required
    'transaction_id' => '1', //required
    'notifyUrl' => 'https://example.com/notify-url',
    'returnUrl' => 'https://example.com/return-url',
    'cancelUrl' => 'https://example.com/cancel-url',
])->send();
```

#### Notification

[](#notification)

```
$notification = $gateway->acceptNotification(
    options: [], // request body, if empty values are taken from httpRequest
    headers: [] // if empty values are taken from httpRequest
);

$status = $notification->getTransactionStatus();
$data = $notification->getData();
$transactionReference = $notification->getTransactionReference();
```

### Paynow

[](#paynow)

#### Gateway

[](#gateway-1)

```
use Omnipay\Omnipay;

$gateway = Omnipay::create('Paynow');
$gateway->initialize([
   'api_key' => '',
   'signature_key' => '',
   'test_mode' => true,
]);
```

#### Purchase

[](#purchase-1)

```
$response = $gateway->purchase([
    'customer' => new Customer([
        'firstName' => 'John',
        'lastName' => 'Doe',
        'email' => 'johnny@example.com', //required
        'phone' => '+48123456789'
    ]),
    'language' => 'pl',
    'amount' => 99.99, //required
    'description' => 'Ebook', //required
    'currency' => 'pln',
    'transaction_id' => '1', //required
    'returnUrl' => 'https://example.com/return-url',
])->send();
```

#### Notification

[](#notification-1)

```
$notification = $gateway->acceptNotification(
    options: [], // request body, if empty values are taken from httpRequest
    headers: [] // if empty values are taken from httpRequest
);

$status = $notification->getTransactionStatus();
$data = $notification->getData();
$transactionReference = $notification->getTransactionReference();
```

### PayU

[](#payu)

#### Http Client Config

[](#http-client-config)

PayU requires Http Client to configure:

```
'allow_redirects' => false,
```

#### Gateway

[](#gateway-2)

```
use Omnipay\Omnipay;

$gateway = Omnipay::create('PayU');
$gateway->initialize([
   'pos_id' => '',
   'signature_key' => '',
   'client_id' => '',
   'client_secret' => '',
   'test_mode' => true,
   'verify_ip_address' => true,
   'notification_ip_addresses' => [
   ],
]);
```

#### Purchase

[](#purchase-2)

```
$response = $gateway->purchase([
   'customer' => new Customer([
      'firstName' => 'John', //required
      'lastName' => 'Doe', //required
      'email' => 'johnny@example.com', //required
      'phone' => '+48123456789'
   ]),
   'language' => 'pl',
   'amount' => 99.99, //required
   'description' => 'Ebook', //required
   'client_ip' => '127.0.0.1', //required
   'currency' => 'pln', //required
   'transaction_id' => '1',
   'notifyUrl' => 'https://example.com/notify-url',
   'returnUrl' => 'https://example.com/return-url',
])->send();
```

#### Notification

[](#notification-2)

```
$notification = $gateway->acceptNotification(
    options: [], // request body, if empty values are taken from httpRequest
    headers: [] // if empty values are taken from httpRequest
);

$status = $notification->getTransactionStatus();
$data = $notification->getData();
$transactionReference = $notification->getTransactionReference();
```

### Przelewy24

[](#przelewy24)

#### Gateway

[](#gateway-3)

```
use Omnipay\Omnipay;

$gateway = Omnipay::create('Przelewy24');
$gateway->initialize([
   'posId' => '',
   'merchantId' => '',
   'crcKey' => '',
   'reportKey' => '',
   'test_mode' => false,
   'verify_ip_address' => true,
   'notification_ip_addresses' => [
   ],
]);
```

#### Purchase

[](#purchase-3)

```
$response = $gateway->purchase([
   'customer' => new Customer([
      'name' => 'John Doe',
      'email' => 'johnny@example.com', //required
      'address' => 'Testowa 25',
      'city' => 'Warszawa',
      'postcode' => '00-000',
      'phone' => '+48123456789'
      'country' => 'PL' //required
   ]),
   'language' => 'pl',
   'amount' => 99.99, //required
   'description' => 'Ebook', //required
   'currency' => 'pln', //required
   'transaction_id' => '1', //required
   'notifyUrl' => 'https://example.com/notify-url',
   'returnUrl' => 'https://example.com/return-url', //required
])->send();
```

#### Notification

[](#notification-3)

```
$notification = $gateway->acceptNotification(
    options: [], // request body, if empty values are taken from httpRequest
    headers: [] // if empty values are taken from httpRequest
);

// Przelewy24 requires to complete purchase after accepting notification
$response = $gateway->completePurchase(array_merge($purchaseOptions, $notificationData))->send();

$status = $notification->getTransactionStatus();
$data = $notification->getData();
$transactionReference = $notification->getTransactionReference();
```

### Tpay

[](#tpay)

#### Gateway

[](#gateway-4)

```
use Omnipay\Omnipay;

$gateway = Omnipay::create('Tpay');
$gateway->initialize([
   'merchant_id' => '',
   'service_id' => '',
   'service_key' => '',
   'auth_token' => '',
   'test_mode' => false,
   'verify_ip_address' => true,
   'notification_ip_addresses' => [
   ],
]);
```

#### Purchase

[](#purchase-4)

```
$response = $gateway->purchase([
   'customer' => new Customer([
      'name' => 'John Doe', //required
      'email' => 'johnny@example.com', //required
      'address' => 'Testowa 25',
      'city' => 'Warszawa',
      'postcode' => '00-000',
      'phone' => '+48123456789'
      'country' => 'PL'
   ]),
   'language' => 'pl',
   'amount' => 99.99, //required
    'description' => 'Ebook', //required
    'currency' => 'pln', //required
   'notifyUrl' => 'https://example.com/notify-url',
   'returnUrl' => 'https://example.com/return-url',
   'cancelUrl' => 'https://example.com/cancel-url',
   'paymentMethod' => 150 // required
])->send();
```

#### Notification

[](#notification-4)

When using Tpay: Regardless of the transaction status (tr\_status), the merchant's system should print TRUE response when all validations are correct.

```
$notification = $gateway->acceptNotification(
    options: [], // request body, if empty values are taken from httpRequest
    headers: [] // if empty values are taken from httpRequest
);

$status = $notification->getTransactionStatus();
$data = $notification->getData();
$transactionReference = $notification->getTransactionReference();
```

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity17

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity50

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

Total

8

Last Release

1091d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/8a665135fb14a8007d13c81722f89b760688ad35ab30e453bac6618a7671a007?d=identicon)[dawidholka](/maintainers/dawidholka)

---

Top Contributors

[![dawidholka](https://avatars.githubusercontent.com/u/28599036?v=4)](https://github.com/dawidholka "dawidholka (22 commits)")

---

Tags

paymentpaymentsgatewayPrzelewy24paymerchantomnipaypayupaynowpolishimojetpay

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/course-link-omnipay-polish-payments/health.svg)

```
[![Health](https://phpackages.com/badges/course-link-omnipay-polish-payments/health.svg)](https://phpackages.com/packages/course-link-omnipay-polish-payments)
```

PHPackages © 2026

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