PHPackages                             cynolol/laravel-barion - 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. cynolol/laravel-barion

ActiveLibrary[Payment Processing](/categories/payments)

cynolol/laravel-barion
======================

Simple Laravel wrapper for the API of the Barion online payment system

v1.3.1(4y ago)053MITPHPPHP &gt;=5.6.0

Since Nov 6Pushed 4y agoCompare

[ Source](https://github.com/cynolol/laravel-barion)[ Packagist](https://packagist.org/packages/cynolol/laravel-barion)[ RSS](/packages/cynolol-laravel-barion/feed)WikiDiscussions master Synced 3w ago

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

Use the Barion API with Laravel
===============================

[](#use-the-barion-api-with-laravel)

[![Travis](https://camo.githubusercontent.com/98d4f4c3c0c20977502135676855e85b4ddb84a6b236214b40cf65ece2b49e76/68747470733a2f2f696d672e736869656c64732e696f2f7472617669732f6c61726176656c68756e676172792f6c61726176656c2d626172696f6e2e7376673f7374796c653d666c61742d737175617265)](https://travis-ci.org/laravelhungary/laravel-barion)[![StyleCI](https://camo.githubusercontent.com/eee011bbb87abf2e7776172a3d899890915c8c513a96a50b934d7d1d7c4da897/68747470733a2f2f7374796c6563692e696f2f7265706f732f37323738373932322f736869656c643f6272616e63683d6d6173746572)](https://styleci.io/analyses/XZoNV6#)[![SensioLabs Insight](https://camo.githubusercontent.com/95acd1aa724478265f7f193b99051ba241026122440a818675346ae2b1adb7a4/68747470733a2f2f696d672e736869656c64732e696f2f73656e73696f6c6162732f692f65633336313531632d653839322d343666342d393130312d6638333930306266336166322e7376673f7374796c653d666c61742d737175617265)](https://insight.sensiolabs.com/projects/ec36151c-e892-46f4-9101-f83900bf3af2)[![license](https://camo.githubusercontent.com/7123c32787e013be5a8a13598ad01f562754637ed6141e89b02e85bf16d3e63e/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f6d6173686170652f6170697374617475732e7376673f7374796c653d666c61742d737175617265)](https://opensource.org/licenses/MIT)[![Packagist](https://camo.githubusercontent.com/8898ab2731beeb9088ce7ca400ff3b0cccf3a232cbe61f17025548e188eb7daa/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6c61726176656c68756e676172792f6c61726176656c2d626172696f6e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/laravelhungary/laravel-barion)[![Total Downloads](https://camo.githubusercontent.com/9bbe44186a61e69330c51faddabcdb8d2971737fe7ae79817acea5992eec737e/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6c61726176656c68756e676172792f6c61726176656c2d626172696f6e2e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/laravelhungary/laravel-barion)

Laravel-Barion is provides an easy way to use the Barion API with Laravel applications. Under the hood there is just a thin wrapper to make API calls simple.

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

[](#installation)

1. Install the package using composer:

`composer require laravelhungary/laravel-barion`

**If you're using Laravel 5.5, you're done, the following steps are being done automatically.**

2. Register the service provider in the `app.php` config file

```
LaravelHungary\Barion\BarionServiceProvider::class,
```

3. Register the Barion facade (optional)

```
'Barion' =>  LaravelHungary\Barion\BarionFacade::class
```

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

[](#configuration)

Laravel-Barion comes preconfigured, you only need to set your POS key in the .env file:

`BARION_POS_KEY=`

The Barion environment defaults to `test.barion.com`. To use the live instead, set

`BARION_LIVE_ENV=true`.

If you'd like to tweak the configuration values, publish the config file:

`artisan vendor:publish --provider="LaravelHungary\Barion\BarionServiceProvider"`

Usage
-----

[](#usage)

You can either resolve the `Barion` class from the Service Container using Laravel's dependency injection, or simply use the provided Facade.

There are two convenience methods for the two most-often used API calls:

#### Get the payment status

[](#get-the-payment-status)

```
Barion::getPaymentState('my-payment-id')
```

#### Start a Payment

[](#start-a-payment)

```
Barion::paymentStart([
    'PaymentType' => PaymentType::IMMEDIATE,
    'GuestCheckOut' => true,
    'FundingSources' => [FundingSource::ALL],
    'Locale' => Locale::HU,
    'Currency' => Currency::HUF,
    'Transactions' => [
        [
            'POSTransactionId' => 'ABC-1234',
            'Payee' => 'example@email.com',
            'Total' => 4990,
            'Items' => [
                [
                    'Name' => 'Example item',
                    'Description' => 'This is a sample description',
                    'Quantity' => 1,
                    'Unit' => 'db',
                    'UnitPrice' => 4990,
                    'ItemTotal' => 4990
                ]
            ]
         ]
    ]
])
```

All other API calls are accessible using either `get` or `post`:

```
Barion::get('/api/url')
```

```
Barion::post('/api/url', ['my-data' => 'some value'])
```

POS Key is automatically appended to each request.

License
-------

[](#license)

Laravel-Barion is open source software licensed under the [MIT License](https://opensource.org/licenses/MIT).

###  Health Score

28

—

LowBetter than 52% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 83.7% 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 ~181 days

Recently: every ~362 days

Total

12

Last Release

1535d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/057c2f2fc78bc701d1619794ed7b8ca367234cfce86f9f5542054780f5114251?d=identicon)[cynolol](/maintainers/cynolol)

---

Top Contributors

[![nxu](https://avatars.githubusercontent.com/u/6393515?v=4)](https://github.com/nxu "nxu (41 commits)")[![danfekete](https://avatars.githubusercontent.com/u/2891082?v=4)](https://github.com/danfekete "danfekete (5 commits)")[![cynolol](https://avatars.githubusercontent.com/u/38243789?v=4)](https://github.com/cynolol "cynolol (3 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/cynolol-laravel-barion/health.svg)

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

###  Alternatives

[craftcms/cms

Craft CMS

3.6k3.6M3.1k](/packages/craftcms-cms)[illuminate/http

The Illuminate Http package.

11937.9M7.0k](/packages/illuminate-http)[spatie/laravel-export

Create a static site bundle from a Laravel app

674146.0k6](/packages/spatie-laravel-export)[sebdesign/laravel-viva-payments

A Laravel package for integrating the Viva Payments gateway

4851.0k](/packages/sebdesign-laravel-viva-payments)[simplestats-io/laravel-client

Server-side analytics for Laravel that follows the full funnel from visit to registration to payment, attributed to the channel that drove it. Revenue, MRR, churn and ad-spend profit (ROAS/CAC) per channel. GDPR compliant, ad-blocker proof.

5022.0k](/packages/simplestats-io-laravel-client)[fleetbase/core-api

Core Framework and Resources for Fleetbase API

1235.9k20](/packages/fleetbase-core-api)

PHPackages © 2026

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