PHPackages                             vaszev/barion-bundle - 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. vaszev/barion-bundle

ActiveSymfony-bundle

vaszev/barion-bundle
====================

Symfony bundle for Barion

0.0.8(6y ago)027MITPHPPHP ^7.1

Since May 16Pushed 6y ago1 watchersCompare

[ Source](https://github.com/vaszev/barion)[ Packagist](https://packagist.org/packages/vaszev/barion-bundle)[ Docs](https://github.com/vaszev/barion.git)[ RSS](/packages/vaszev-barion-bundle/feed)WikiDiscussions master Synced 2d ago

READMEChangelogDependencies (3)Versions (9)Used By (0)

Barion smart gateway wrapper
============================

[](#barion-smart-gateway-wrapper)

### Download the Bundle

[](#download-the-bundle)

Open a command console, enter your project directory and execute the following command to download the latest stable version of this bundle:

```
$ composer require vaszev/barion-bundle
```

### Contains

[](#contains)

```
Barion library (1.3.1 March 20. 2019.) wrapper for Symfony 4

```

Please note that this bundle is for simple **B2C** Immediate payment type only. Project still *in development stage, use only at your own risk!*

### Install

[](#install)

Configure your credentials:

`/config/vaszev.yaml`

```
vaszev_barion:
  posKey: 'YOUR_POS_KEY_FROM_BARION'
  apiVersion: 2
  sandbox: true
  payee: 'YOUR.SHOP.EMAIL@EXAMPLE.COM'
  pixelId: 'YOUR_BARION_PIXEL_ID'
  webshopName: 'YOUR_WEBSHOP_PREFIX_YOU_WANT_TO_USE'
  webshopDefaultRoute: 'YOUR_WEBSHOP_ROUTE_FOR_BACK_BUTTON_IF_NOT_AVAILABLE'
  waitingRoomBg: '#fff'
  waitingRoomColor: '#333'
  waitingRoomAmountColor: 'tomato'
  waitingRoomPositiveFeedbackColor: 'green'
  waitingRoomNegativeFeedbackColor: 'red'
  waitingRoomNeturalFeedbackColor: 'orange'
  waitingRoomGoogleFont: 'Lato'
```

Add the following to your routing:

`/config/routes.yaml`

```
_barion:
  resource: "@VaszevBarionBundle/Controller"
  type:     annotation
  prefix:   /barion
```

Update doctrine's schema:

`$ php bin/console doctrine:schema:update --force`

Install assets:

`$ php bin/console assets:install --symlink`

Include Barion's pixel into your webshop pages:

```
{{ render(controller('Vaszev\\BarionBundle\\Controller\\BarionController::pixel')) }}
```

Adding translations :

```
'barion.cart': ''
'barion.transaction': ''
'barion.done': ''
'barion.Your.payment.of': ''
'barion.transaction.failed': ''
'barion.transaction.success': ''
'barion.transaction.neutral': ''
'barion.back.to.the.webshop': ''
```

### Best practicles

[](#best-practicles)

- save your webshop `orderID` in your database's table
- get your `orderID` and items
- init Barion online payment with the data you know about your visitor
- create a transaction with your `orderID` and add items
- prepare your payment and get your URL for Barion's payment page
- pay, and get back to our waiting room where customer got progress info
- Barion will knock on callback URL where we'll set payment state
- let you customer know about it
- get back to your webshop and keep buying

### Example

[](#example)

You have to gather your items into *transaction(s)* that could have *one or more* items:

```
$myWebsopTransactionId = 8211;
$redirectURL = $this->generateUrl('webshop', [], UrlGeneratorInterface::ABSOLUTE_URL);
try {
  $barion->initShopping($redirectURL)->createTransaction($myWebsopTransactionId, 'Please post it ASAP!');
  $barion->addItem('Product name','Description',2,2900,'ProdId#5312','Piece');
  $barion->addItem('Product name 2','Description so far',1,1000,'ProdId#4362','Meter');
  $barion->addItem('Product name 3','Description will fit',1,5900,'ProdId#7309','L');
  $payURL = $barion->preparePaymentRequest('buyer@example.com', '1234 Hungary, Budapest...')->closeAndGetPaymentURL();

  ...

} catch (\Exception $e) {
  // yikes! something went wrong...
}
```

Check if your order's payment received:

```
$barion->checkMyOrderBeingPaid($myWebsopTransactionId);
```

Call getters on your order:

```
$barion->getMyOrderPaymentId($myWebsopTransactionId);
$barion->getMyOrderResponse($myWebsopTransactionId);
$barion->getMyOrderItems($myWebsopTransactionId);
$barion->getMyOrderRequest($myWebsopTransactionId);
$barion->getMyOrderTransaction($myWebsopTransactionId);
$barion->getMyOrderStateResponses($myWebsopTransactionId);
```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community7

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

Total

8

Last Release

2553d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/f7f4ea200501fe00c6d98f357abe9dffa8a7063c41eaffe950fe33690cc4e3e5?d=identicon)[vaszev](/maintainers/vaszev)

---

Top Contributors

[![vaszev](https://avatars.githubusercontent.com/u/14194009?v=4)](https://github.com/vaszev "vaszev (21 commits)")

---

Tags

symfonybarion

### Embed Badge

![Health badge](/badges/vaszev-barion-bundle/health.svg)

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

###  Alternatives

[scheb/2fa

Two-factor authentication for Symfony applications (please use scheb/2fa-bundle to install)

578630.7k1](/packages/scheb-2fa)[jolicode/gif-exception-bundle

The GhostBuster of your exception page

20596.8k](/packages/jolicode-gif-exception-bundle)[sulu/skeleton

Project template for starting your new project based on the Sulu content management system

29733.3k](/packages/sulu-skeleton)[rcsofttech/audit-trail-bundle

Enterprise-grade, high-performance Symfony audit trail bundle. Automatically track Doctrine entity changes with split-phase architecture, multiple transports (HTTP, Queue, Doctrine), and sensitive data masking.

1022.4k](/packages/rcsofttech-audit-trail-bundle)[ahmed-bhs/doctrine-doctor

Runtime analysis tool for Doctrine ORM integrated into Symfony Web Profiler. Unlike static linters, it analyzes actual query execution at runtime to detect performance bottlenecks, security vulnerabilities, and best practice violations during development with real execution context and data.

813.1k](/packages/ahmed-bhs-doctrine-doctor)

PHPackages © 2026

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