PHPackages                             gentor/omnipay-borica - 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. gentor/omnipay-borica

ActiveLibrary[Payment Processing](/categories/payments)

gentor/omnipay-borica
=====================

Borica Way4 gateway for Omnipay payment processing library

44.2k2PHP

Since Mar 10Pushed 1y ago3 watchersCompare

[ Source](https://github.com/gentor/omnipay-borica)[ Packagist](https://packagist.org/packages/gentor/omnipay-borica)[ RSS](/packages/gentor-omnipay-borica/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Omnipay: Borica
===============

[](#omnipay-borica)

**[Borica Way4](https://www.openwaygroup.com/new-blog/2018/11/1/the-migration-to-the-way4-card-payment-system-is-underway)gateway for Omnipay payment processing library**

[Omnipay](https://github.com/thephpleague/omnipay) is a framework agnostic, multi-gateway payment processing library for PHP. This package implements Borica Way4 support for Omnipay.

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

[](#installation)

Omnipay is installed via [Composer](http://getcomposer.org/). To install, simply require `league/omnipay`and `gentor/omnipay-borica` with Composer:

```
composer require league/omnipay gentor/omnipay-borica

```

Basic Usage
-----------

[](#basic-usage)

### Purchase

[](#purchase)

```
$gateway = Omnipay::create('Borica');

$gateway->setTerminalId($config['terminalId'])
    ->setPrivateKey($config['privateKey'])
    ->setCertificate($config['certificate'])
    ->setCurrency($config['currency'])
    ->setTestMode($config['testMode']);

$response = $gateway->purchase(
    [
        'amount' => "10",
        'order' => date('His'),
        'orderId' => uniqid(),
        'description' => "Borica Test Purchase",
        'merchantUrl' => "http://borica.way4",
        'returnUrl' => "http://borica.way4/return.php"
    ]
)->send();

// Process response
if ($response->isSuccessful()) {
    // Payment was successful
    print_r($response);
} elseif ($response->isRedirect()) {
    // Redirect to offsite payment gateway
    $response->redirect();
} else {
    // Payment failed
    echo $response->getMessage();
}
```

### Complete Purchase

[](#complete-purchase)

```
$response = $gateway->completePurchase($_POST)->send();

var_dump($response->getData());
var_dump($response->isSuccessful());
var_dump($response->getCode());
var_dump($response->getMessage());
```

### Refund

[](#refund)

```
$response = $gateway->refund([
    'order' => date('His'),
    'transactionType' => 1, // original transaction TRTYPE
    'amount' => 10,
    'currency' => 'BGN',
    'description' => 'Borica Test Purchase',
    'RRN' => 'RRN',
    'INT_REF' => 'INT_REF',
])->send();

var_dump($response->getData());
var_dump($response->isSuccessful());
var_dump($response->getCode());
var_dump($response->getMessage());
```

### Fetch Transaction

[](#fetch-transaction)

```
$response = $gateway->fetchTransaction([
    'order' => date('His'),
    'nonce' => 'nonce', // original transaction NONCE
    'transactionType' => 1, // original transaction TRTYPE
])->send();

var_dump($response->getData());
var_dump($response->isSuccessful());
var_dump($response->isReversal());
var_dump($response->getCode());
var_dump($response->getMessage());
var_dump($response->getTransactionReference());
```

### Pay By Token

[](#pay-by-token)

```
$response = $gateway->payByToken([
    'amount' => "10",
    'order' => date('His'),
    'orderId' => uniqid(),
    'description' => "Borica Test Purchase",
    'merchantUrl' => "http://borica.way4",
    'MERCH_TRAN_STATE' => 'M',
    'MERCH_TOKEN_ID' => 'EC**********57',
    'MERCH_RN_ID' => '162********440',
])->send();

print_r($response->getData());
print_r($response->isSuccessful());
print_r($response->getCode());
print_r($response->getMessage());
print_r($response->getTransactionReference());
```

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance34

Infrequent updates — may be unmaintained

Popularity23

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity15

Early-stage or recently created project

 Bus Factor1

Top contributor holds 96.8% 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://www.gravatar.com/avatar/210fd495e96c05caab1d50c09165794ff73175a9b49c43f91df0c8524dfa8add?d=identicon)[gentor](/maintainers/gentor)

---

Top Contributors

[![gentor](https://avatars.githubusercontent.com/u/2902504?v=4)](https://github.com/gentor "gentor (30 commits)")[![vlados](https://avatars.githubusercontent.com/u/46914?v=4)](https://github.com/vlados "vlados (1 commits)")

### Embed Badge

![Health badge](/badges/gentor-omnipay-borica/health.svg)

```
[![Health](https://phpackages.com/badges/gentor-omnipay-borica/health.svg)](https://phpackages.com/packages/gentor-omnipay-borica)
```

###  Alternatives

[omnipay/paypal

PayPal gateway for Omnipay payment processing library

3156.8M53](/packages/omnipay-paypal)[eduardokum/laravel-boleto

Biblioteca com boletos para o laravel

626351.9k2](/packages/eduardokum-laravel-boleto)[tbbc/money-bundle

This is a Symfony bundle that integrates moneyphp/money library (Fowler pattern): https://github.com/moneyphp/money.

1961.9M](/packages/tbbc-money-bundle)[2checkout/2checkout-php

2Checkout PHP Library

83740.3k2](/packages/2checkout-2checkout-php)[smhg/sepa-qr-data

Generate QR code data for SEPA payments

61717.2k5](/packages/smhg-sepa-qr-data)[omnipay/dummy

Dummy driver for the Omnipay payment processing library

271.2M33](/packages/omnipay-dummy)

PHPackages © 2026

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