PHPackages                             devpark/laravel-przelewy24 - 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. devpark/laravel-przelewy24

ActiveLibrary[Payment Processing](/categories/payments)

devpark/laravel-przelewy24
==========================

Laravel przelewy24.pl integration

v3.0.3(3y ago)3933.9k↓10.9%35[3 issues](https://github.com/devpark/laravel-przelewy24/issues)MITPHPPHP &gt;=7.1.0CI failing

Since Jan 2Pushed 2y ago8 watchersCompare

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

READMEChangelog (10)Dependencies (6)Versions (14)Used By (0)

Laravel Przelewy24 module
=========================

[](#laravel-przelewy24-module)

This module makes integration with [przelewy24.pl](http://przelewy24.pl) payment system easier. It supports making payments using przelewy24.pl system.

New version 3.0 released
------------------------

[](#new-version-30-released)

Package supports recently version Przelewy24 REST API.

The old Payment Provider Api version will expire before end of year 2021.

**We recommend immediately upgrading the package version.**

### Installation

[](#installation)

1. Run

    ```
    composer require devpark/laravel-przelewy24
    ```

    in console to install this module
2. Open `config/app.php` and add

    ###### Laravel 5.5+ uses Package Auto-Discovery, so doesn't require you to manually add the ServiceProvider. You can go to 3.

    [](#laravel-55-uses-package-auto-discovery-so-doesnt-require-you-to-manually-add-the-serviceprovider-you-can-go-to-3)

    ```
    Devpark\Transfers24\Providers\Transfers24ServiceProvider::class
    ```

    in section `providers`
3. Run

    ```
    php artisan vendor:publish --provider="Devpark\Transfers24\Providers\Transfers24ServiceProvider"
    ```

    in your console to publish default configuration files `transfers24.php` in `config` directory

    **Add flag `force` to alter configuration after upgrade package**

    These are all configuration settings. Some settings can be changed via environment settings, see below.
4. Open `.env` and add your configuration:

- `PRZELEWY24_MERCHANT_ID` -a Company or an Individual number, who has signed a contract with Przelewy24 (Merchant ID),
- `PRZELEWY24_POS_ID` - the identification number of the shop (default: Merchant ID)
- `PRZELEWY24_CRC` -a random string, used to calculate a CRC value, shown in Przelewy24 Admin panel.
- `PRZELEWY24_REPORT_KEY` -a report key, used to calculate a Report Key value, shown in Przelewy24 Admin panel.
- `PRZELEWY24_TEST_SERVER` - if true, set the test environment
- `PRZELEWY24_URL_RETURN` - Return address, where Client will be redirected to, after the transaction is completed (default 'transfers24/callback').
- `PRZELEWY24_URL_STATUS` - (POST route) address where the status of a transaction is sent. It can be omitted if stored in P24 system (default 'transfers24/status').

### Usage

[](#usage)

In order to use the system, you need to do a few things:

1. You need to launch the registration request in order to init payment
2. You need to handle customer returning routes to your app. By default there are routes 'transfers24/callback'
3. You should ensure transaction verify. Here you should send verify request of payment after receiving notification about correct transaction from payment system. You need to handle returning routes to status of the transaction which is sent automatically from payment system. By default there are routes 'transfers24/status'

#### Registration request

[](#registration-request)

This is main request you need to launch to init payment.

The most basic sample code for authorization request could look like this:

```
$payment = app()->make(\App\Payment::class);
$registration_request = app()->make(\Devpark\Transfers24\Requests\Transfers24::class);

$register_payment = $registration_request->setEmail('test@example.com')->setAmount(100)->init();

if($register_payment->isSuccess())
{
    // save registration parameters in payment object

    return $registration_request->execute($register_payment->getToken(), true);
}
```

This code should be run in controller as it's returning response which will takes few things.

1. Status registration payment
2. Token, if registration done with success
3. Error code return from payment system
4. Error Message return from payment system
5. Request parameters send to payment system

For `setAmount` default currency is PLN. If you want to use other currency, you should use currency constant from `\Devpark\Transfers24\Currency` class as 2nd parameter. Also please notice that amount you should give to this function is real amount (with decimal places) and not converted already to Przelewy24 format.

For `\Devpark\Transfers24\Requests\Transfers24::execute` method 2nd parameter decides of redirection to payment system when true or return url for making payment when false

#### Define customer returning routes

[](#define-customer-returning-routes)

You should create routes that will redirect customer after the completed transaction (those routes will be launched using `GET` HTTP method),

#### Handling transaction verify route

[](#handling-transaction-verify-route)

To make sure the payment was really successful you should use `\Devpark\Transfers24\Requests\Transfers24::receive` method. The simplest code could look like this:

```
$payment_verify = app()->make(\Devpark\Transfers24\Requests\Transfers24::class);
$payment_response = $payment_verify->receive($request);

if ($payment_response->isSuccess()) {
    $payment = Payment::where('session_id',$payment_response->getSessionId())->firstOrFail();
   // process order here after making sure it was real payment
}
echo "OK";
```

This code should be run in controller, because you should return non-empty response when receiving valid przelewy24 request for transaction verify. As you see, you should make sure it was real payment before you process the order and then you need to make sure that it was successful. You can identify payment via session\_id (unique ID generate during registration of payment)).

### Licence

[](#licence)

This package is licenced under the [MIT license](http://opensource.org/licenses/MIT)

###  Health Score

40

—

FairBetter than 88% of packages

Maintenance18

Infrequent updates — may be unmaintained

Popularity43

Moderate usage in the ecosystem

Community23

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 50.9% 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 ~228 days

Recently: every ~179 days

Total

11

Last Release

1139d ago

Major Versions

v1.0.6 → v3.02021-09-30

### Community

Maintainers

![](https://www.gravatar.com/avatar/28a8d6e78d8e04b25ab35fee70b22dd25df4ef056a68b1fffd212db04d090b2b?d=identicon)[devpark](/maintainers/devpark)

---

Top Contributors

[![kamilloo](https://avatars.githubusercontent.com/u/11471884?v=4)](https://github.com/kamilloo "kamilloo (59 commits)")[![kamilDevpark](https://avatars.githubusercontent.com/u/29088145?v=4)](https://github.com/kamilDevpark "kamilDevpark (37 commits)")[![mnabialek](https://avatars.githubusercontent.com/u/7656807?v=4)](https://github.com/mnabialek "mnabialek (10 commits)")[![as-radek](https://avatars.githubusercontent.com/u/52824494?v=4)](https://github.com/as-radek "as-radek (4 commits)")[![dzafel](https://avatars.githubusercontent.com/u/765607?v=4)](https://github.com/dzafel "dzafel (2 commits)")[![krzysztofdevcast](https://avatars.githubusercontent.com/u/35255452?v=4)](https://github.com/krzysztofdevcast "krzysztofdevcast (2 commits)")[![kamcw](https://avatars.githubusercontent.com/u/66589628?v=4)](https://github.com/kamcw "kamcw (1 commits)")[![KamilWojtalak](https://avatars.githubusercontent.com/u/48104288?v=4)](https://github.com/KamilWojtalak "KamilWojtalak (1 commits)")

###  Code Quality

TestsPHPUnit

Code StylePHP CS Fixer

### Embed Badge

![Health badge](/badges/devpark-laravel-przelewy24/health.svg)

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

###  Alternatives

[lemonsqueezy/laravel

A package to easily integrate your Laravel application with Lemon Squeezy.

58596.1k](/packages/lemonsqueezy-laravel)[shetabit/multipay

PHP Payment Gateway Integration Package

291348.2k3](/packages/shetabit-multipay)[firefly-iii/data-importer

Firefly III Data Import Tool.

7545.8k](/packages/firefly-iii-data-importer)[buckaroo/sdk

Buckaroo payment SDK

12189.1k9](/packages/buckaroo-sdk)[wandesnet/mercadopago-laravel

PHP SDK for integration with Mercado Pago

252.4k](/packages/wandesnet-mercadopago-laravel)[tsaiyihua/laravel-linepay

linepay library for laravel

102.9k](/packages/tsaiyihua-laravel-linepay)

PHPackages © 2026

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