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. [API Development](/categories/api)
4. /
5. vaszev/barion-bundle

ActiveSymfony-bundle[API Development](/categories/api)

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

Symfony bundle for Barion

0.0.8(7y ago)027MITPHPPHP ^7.1

Since May 16Pushed 7y 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 2w 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 26% 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

2599d 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

[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.

1175.2k](/packages/rcsofttech-audit-trail-bundle)[web-auth/webauthn-framework

FIDO2/Webauthn library for PHP and Symfony Bundle.

51390.8k2](/packages/web-auth-webauthn-framework)[thecodingmachine/graphqlite-bundle

A Symfony bundle for thecodingmachine/graphqlite.

371.7M3](/packages/thecodingmachine-graphqlite-bundle)[web-auth/webauthn-symfony-bundle

FIDO2/Webauthn Security Bundle For Symfony

65474.5k9](/packages/web-auth-webauthn-symfony-bundle)[florianv/swap-bundle

Drop-in Symfony bundle for currency conversion: configurable services, multi-provider exchange rates with fallback and caching.

63425.7k1](/packages/florianv-swap-bundle)[cravler/maxmind-geoip-bundle

Bundle integrating MaxMind GeoIP2 database into symfony application

26625.1k2](/packages/cravler-maxmind-geoip-bundle)

PHPackages © 2026

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