PHPackages                             mindgoner/laravel-orlen-paczka - 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. [API Development](/categories/api)
4. /
5. mindgoner/laravel-orlen-paczka

ActiveLibrary[API Development](/categories/api)

mindgoner/laravel-orlen-paczka
==============================

027PHP

Since Oct 29Pushed 1y ago2 watchersCompare

[ Source](https://github.com/mindgoner/LaravelOrlenPaczka)[ Packagist](https://packagist.org/packages/mindgoner/laravel-orlen-paczka)[ RSS](/packages/mindgoner-laravel-orlen-paczka/feed)WikiDiscussions master Synced 1w ago

READMEChangelogDependenciesVersions (1)Used By (0)

Laravel Orlen Paczka Integration
================================

[](#laravel-orlen-paczka-integration)

This package provides integration with the Orlen Paczka API, allowing you to manage receivers, senders, returns, and business packs. Below are examples of how to use the models and requests provided by the package.

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

[](#installation)

To install the package, use Composer:

```
composer require mindgoner/laravel-orlen-paczka
```

To publish configuration files, type command:

```
php artisan vendor:publish --tag=config
```

Usage
=====

[](#usage)

Sending Parcels
---------------

[](#sending-parcels)

Sending parcels requires configuring OPSender, OPReceiver, OPReturn, OPBusinessPack objects.

### OPReceiver

[](#opreceiver)

You can create a new pracel receiver using the `OPReceiver` model:

```
use Mindgoner\LaravelOrlenPaczka\Models\OPReceiver;

$OPReceiver = new OPReceiver();
$OPReceiver->EMail = 'email@example.com';
$OPReceiver->FirstName = 'Mind';
$OPReceiver->LastName = 'Goner';
$OPReceiver->CompanyName = 'CompanyName';
$OPReceiver->StreetName = 'Example st.';
$OPReceiver->BuildingNumber = '1';
$OPReceiver->FlatNumber = '';
$OPReceiver->City = 'New York';
$OPReceiver->PostCode = '10069';
$OPReceiver->PhoneNumber = '123123123';
```

Alternatively, you can set the properties by passing dictionary (works with each model):

```
use Mindgoner\LaravelOrlenPaczka\Models\OPReceiver;

$OPReceiver = new  OPReceiver(
	'EMail' => 'email@example.com',
	'FirstName' => 'Mind',
	'LastName' => 'Goner',
	'CompanyName' => 'CompanyName',
	'StreetName' => 'Example st.',
	'BuildingNumber' => '1',
	'FlatNumber' => '',
	'City' => 'New York',
	'PostCode' => '10069',
	'PhoneNumber' => '123123123'
);
```

### OPSender

[](#opsender)

To create a new sender, use the `OPSender` model:

```
use Mindgoner\LaravelOrlenPaczka\Models\OPSender;

$OPSender = new OPSender();
$OPSender->SenderEMail = 'email@example.com';
$OPSender->SenderFirstName = 'Mind';
$OPSender->SenderLastName = 'Goner';
$OPSender->SenderCompanyName = 'CompanyName';
$OPSender->SenderStreetName = 'Another Example st.';
$OPSender->SenderBuildingNumber= '1';
$OPSender->SenderFlatNumber = '';
$OPSender->SenderCity = 'New York';
$OPSender->SenderPostCode = '10000';
$OPSender->SenderPhoneNumber = '321321321';
$OPSender->SenderOrders = 'order-number'; // Optionally
```

### OPReturn

[](#opreturn)

`OPReturn` model is required to configure where to forward package, if parcel coudn't be delivered to receiver.

```
use Mindgoner\LaravelOrlenPaczka\Models\OPReturn;

$OPReturn = new OPReturn();
$OPReturn->ReturnAvailable = 0;
$OPReturn->ReturnQuantity = 0;
$OPReturn->ReturnFirstName = 'John';
$OPReturn->ReturnLastName = 'Doe';
$OPReturn->ReturnCompanyName = 'ExampleCorp';
$OPReturn->ReturnStreetName = '123 Example Rd';
$OPReturn->ReturnBuildingNumber= '1A';
$OPReturn->ReturnFlatNumber = '5B';
$OPReturn->ReturnCity = 'ExampleCity';
$OPReturn->ReturnPostCode = '12345';
$OPReturn->ReturnPhoneNumber = '555-1234';
$OPReturn->ReturnPack = 0;
$OPReturn->ReturnDestinationCode = 'BD-105772-DB-12',
```

### OPBusinessPack

[](#opbusinesspack)

To create a new business pack, use the `OPBusinessPack` model:

```
use Mindgoner\LaravelOrlenPaczka\Models\OPBusinessPack;

$OPBusinessPack = new OPBusinessPack([
	'DestinationCode' => 'BD-105772-DB-12',
	'AlternativeDestinationCode' => 'BD-105772-DB-12',
	'BoxSize' => 'C',
	'PackValue' => 100,
	'CashOnDelivery' => false,
	'AmountCashOnDelivery' => 0,
	'Insurance' => 0,
	'PrintAddress' => '123 Business St.',
	'PrintType' => 'Label',
	'TransferDescription' => 'Business pack for delivery'
]);
```

### Creating package in OrlenPaczka servers:

[](#creating-package-in-orlenpaczka-servers)

```
use Mindgoner\LaravelOrlenPaczka\Requests\GenerateBusinessPack;

$GenerateBusinessPack = new GenerateBusinessPack(
	$OPSender,
	$OPBusinessPack,
	$OPReturn,
	$OPReceiver,
);
$response = $GenerateBusinessPack->send(); // Send method returns OP server's Response
```

Get data from response:

```
$GenerateBusinessPack->success(); // Returns true if success
$GenerateBusinessPack->getPackCode(); // Returns PackCode
$GenerateBusinessPack->getDestinationCode(); // Returns DestinationCode
$GenerateBusinessPack->getDestinationId(); // Returns DestinationId
$GenerateBusinessPack->getPackPrice(); // Returns PackPrice
$GenerateBusinessPack->getPackPaid(); // Returns PackStatus
```

Generate Label
--------------

[](#generate-label)

```
use Mindgoner\LaravelOrlenPaczka\Requests\LabelPrintDuplicate;

$LabelPrintDuplicate = new  LabelPrintDuplicate(
	new OPPack(['PackCode' => '2101077997326'])
);
$LabelPrintDuplicate->get();

$LabelPrintDuplicate->base64(); // Returns label in base64 format

// or

$LabelBinary = $LabelPrintDuplicate->pdf(); // Return label in binary format
return response($LabelBinary)
    ->header('Content-Type', 'application/pdf')
    ->header('Content-Disposition', 'inline; filename="label.pdf"');
```

Ordering a pickup
-----------------

[](#ordering-a-pickup)

To order a pickup, use the `CallPickup` request:

```
use Mindgoner\LaravelOrlenPaczka\Requests\CallPickup;

$CallPickup = new CallPickup([
    'packList' => [
        new OPPack(['PackCode' => '2101077997326'])
    ],
    //'readyDate' => date('Y-m-d\T9:00:00', strtotime('+1 day')), // Alternatively (must be in the future)
    //'pickupDate' => date('Y-m-d\T17:00:00', strtotime('+1 day')), // Alternatively (must be in the future)
]);
$CallPickup->send();
```

Selfhosting DestinationPoints and Autoupdate
--------------------------------------------

[](#selfhosting-destinationpoints-and-autoupdate)

If you'd like to store DestinationPoints at your server to increase performance, feel free to use following code to publish migrations and setup scheduler, that will update DestinationPoint states at specified time.

### Migration

[](#migration)

Use following code to publish migration files:

```
php artisan vendor:publish --tag=migrations
```

Migrate file to database:

```
php artisan migrate
```

### Scheduler

[](#scheduler)

Publish command:

```
php artisan vendor:publish --tag=commands
```

Setup scheduled command executing in `app/Console/Kernel.php`:

```
use App\Console\Commands\OPUpdateLocationsList;

$schedule->command('op:update-locations')->dailyAt('05:00');
```

### Map Widget

[](#map-widget)

To implement map widget, use button that should appear, when user selected delivery to PickupMachine:

```
Znajdź na mapie

```

Then add to `` section following:

```
@OPMap()
```

Create new variable in your .env file:

```
OP_MAPTOKEN='put-token-here'
```

###  Health Score

16

—

LowBetter than 4% of packages

Maintenance28

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community8

Small or concentrated contributor base

Maturity18

Early-stage or recently created project

 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.

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/83843566?v=4)[Bartosz Bieniek](/maintainers/mindgoner)[@mindgoner](https://github.com/mindgoner)

---

Top Contributors

[![mindgoner](https://avatars.githubusercontent.com/u/83843566?v=4)](https://github.com/mindgoner "mindgoner (12 commits)")

### Embed Badge

![Health badge](/badges/mindgoner-laravel-orlen-paczka/health.svg)

```
[![Health](https://phpackages.com/badges/mindgoner-laravel-orlen-paczka/health.svg)](https://phpackages.com/packages/mindgoner-laravel-orlen-paczka)
```

###  Alternatives

[exsyst/swagger

A php library to manipulate Swagger specifications

35816.5M7](/packages/exsyst-swagger)[lucasdotvin/laravel-soulbscription

A straightforward interface to handle subscriptions and features consumption.

709209.3k](/packages/lucasdotvin-laravel-soulbscription)[pimax/fb-messenger-php

Facebook Messenger Bot PHP API

313188.5k2](/packages/pimax-fb-messenger-php)

PHPackages © 2026

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