PHPackages                             lukasz-adamski/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. [Framework](/categories/framework)
4. /
5. lukasz-adamski/laravel-przelewy24

ActiveLibrary[Framework](/categories/framework)

lukasz-adamski/laravel-przelewy24
=================================

Przelewy24 payments processor service provider for Laravel framework.

0.2(6y ago)01822MITPHPCI failing

Since Sep 16Pushed 6y ago1 watchersCompare

[ Source](https://github.com/lukasz-adamski/laravel-przelewy24)[ Packagist](https://packagist.org/packages/lukasz-adamski/laravel-przelewy24)[ RSS](/packages/lukasz-adamski-laravel-przelewy24/feed)WikiDiscussions master Synced 6d ago

READMEChangelog (2)Dependencies (4)Versions (3)Used By (0)

Przelewy24 payment processor for Laravel
========================================

[](#przelewy24-payment-processor-for-laravel)

Laravel package which provides Przelewy24 payment processor support.

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

[](#installation)

1. Install composer package using command:

```
composer require lukasz-adamski/laravel-przelewy24

```

2. Add Service Provider in `config/app.php`:

```
Adams\Przelewy24\Przelewy24ServiceProvider::class,
```

3. Add Facade in `config/app.php`:

```
'Przelewy24' => Adams\Przelewy24\Facades\Facade::class,
```

4. Publish configuration file to your project:

```
php artisan vendor:publish --provider="Adams\Przelewy24\Przelewy24ServiceProvider"
```

5. If you have `package_routes` setting enabled you need to except `/webhook/przelewy24` route from CSRF verification in `app/Http/Middleware/VerifyCsrfToken.php`:

```
/**
 * The URIs that should be excluded from CSRF verification.
 *
 * @var array
 */
protected $except = [
    '/webhook/przelewy24'
];
```

Environment
-----------

[](#environment)

You can setup these environment variables to configure Przelewy24 API access:

- `PRZELEWY24_MODE` - Current API mode, by default this value is set to `sandbox` to test implementation. On production you need to set this value to `live`,
- `PRZELEWY24_MERCHANT_ID` - Your merchant identifier received from payment provider,
- `PRZELEWY24_POS_ID` - Shop identifier to process payments. If you don't want to process incoming payments to given shop enter here merchant identifier and payments will not be classified to any shop,
- `PRZELEWY24_CRC` - Random string received from payment provider to sign API requests.

Testing
-------

[](#testing)

To run predefined test set use:

```
php vendor/bin/phpunit
```

Usage
-----

[](#usage)

Below you have example controller implementation:

```
