PHPackages                             zgabievi/laravel-bogpayment - 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. zgabievi/laravel-bogpayment

ActiveProject

zgabievi/laravel-bogpayment
===========================

Bank of Georgia payment integration for Laravel

0.3.1(4y ago)51073MITPHPPHP ^7.2|^7.3|^7.4

Since Aug 6Pushed 4y ago1 watchersCompare

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

READMEChangelog (8)Dependencies (4)Versions (9)Used By (0)

BOG Payment integration for Laravel
===================================

[](#bog-payment-integration-for-laravel)

[![Packagist](https://camo.githubusercontent.com/0f1b92a3cbb41023996e78588c89bdcc0cc3917a3dae5e54e6b1affd4f748f69/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7a676162696576692f6c61726176656c2d626f677061796d656e742e737667)](https://packagist.org/packages/zgabievi/laravel-bogpayment)[![Packagist](https://camo.githubusercontent.com/6c33635d245f0c4c668d97344eb3c338594e07f7f6fa639ed39a7856049b96f1/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7a676162696576692f6c61726176656c2d626f677061796d656e742e737667)](https://packagist.org/packages/zgabievi/laravel-bogpayment)[![license](https://camo.githubusercontent.com/cab117297360d6ccb01b236502ec92c311cfc0326317d4d7a4aa444c6082b3d5/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f7a676162696576692f6c61726176656c2d626f677061796d656e742e737667)](https://packagist.org/packages/zgabievi/laravel-bogpayment)

[![laravel-bogpayment](https://camo.githubusercontent.com/4abbd5853ecf093482cebf3624c87ba70447b12305bb32cd149c55fc395009b0/68747470733a2f2f62616e6e6572732e6265796f6e64636f2e64652f424f472532305061796d656e742e6a7065673f7468656d653d6c69676874267061636b6167654e616d653d7a676162696576692532466c61726176656c2d626f677061796d656e74267061747465726e3d746f706f677261706879267374796c653d7374796c655f31266465736372697074696f6e3d424f472b5061796d656e742b696e746567726174696f6e2b666f722b4c61726176656c266d643d312673686f7757617465726d61726b3d3026666f6e7453697a653d313030707826696d616765733d63617368)](https://github.com/zgabievi/laravel-bogpayment)

Table of Contents
-----------------

[](#table-of-contents)

- [Installation](#installation)
- [Usage](#usage)
    - [Payment](#payment)
    - [Recurring](#recurring)
    - [Refund](#refund)
- [Additional Information](#additional-information)
- [Environment Variables](#environment-variables)
- [License](#license)

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

[](#installation)

To get started, you need to install package:

```
composer require zgabievi/laravel-bogpayment
```

If your Laravel version is older than **5.5**, then add this to your service providers in *config/app.php*:

```
'providers' => [
    ...
    Zorb\BOGPayment\BOGPaymentServiceProvider::class,
    ...
];
```

You can publish config file using this command:

```
php artisan vendor:publish --provider="Zorb\BOGPayment\BOGPaymentServiceProvider"
```

This command will copy config file for you.

Usage
-----

[](#usage)

- [Payment](#payment)
- [Recurring](#recurring)
- [Refund](#refund)

### Payment

[](#payment)

Default process has several to be completed:

1. Redirect to card details page
2. Bank will check payment details on your route
3. Bank will register payment details on your route

#### Step #1

[](#step-1)

On this step you should redirect user to card details page

```
use Zorb\BOGPayment\Facades\BOGPayment;

class PaymentController extends Controller
{
    //
    public function __invoke()
    {
        return BOGPayment::redirect([
            'order_id' => 1,
        ], false);
    }
}
```

Pass any parameter you want to recieve on check and register step as a first value. (default: `[]`)

Second value is boolean and defines if you want to pre-authorize payment, block amount. (default: `false`)

#### Step #2

[](#step-2)

On this step bank will check that you are ready to accept payment.

This process is called **PaymentAvail**.

```
use Zorb\BOGPayment\Facades\BOGPayment;

class PaymentCheckController extends Controller
{
    //
    public function __invoke()
    {
        // chek that http authentication is correct
        BOGPayment::checkAuth();

        // check if you are getting request from allowed ip
        BOGPayment::checkIpAllowed();

        // check if you can find order with provided id
        $order_id = BOGPayment::getParam('o.order_id');
        $order = Order::find($order_id);

        if (!$order) {
            BOGPayment::sendError('check', 'Order couldn\'t be found with provided id');
        }

        $trx_id = BOGPayment::getParam('trx_id');

        // send success response
        BOGPayment::sendSuccess('check', [
            'amount' => $order->amount,
            'short_desc' => $order->short_desc,
            'long_desc' => $order->long_desc,
            'trx_id' => $trx_id,
            'account_id' => config('bogpayment.account_id'),
            'currency' => config('bogpayment.currency'),
        ]);
    }
}
```

*Check [request parameters](#parameters-of-check-request) here*

#### Step #3

[](#step-3)

On this step bank will provide details of the payment.

This process is called **RegisterPayment**.

```
use Zorb\BOGPayment\Facades\BOGPayment;

class PaymentRegisterController extends Controller
{
    //
    public function __invoke()
    {
        // chek that http authentication is correct
        BOGPayment::checkAuth();

        // check if you are getting request from allowed ip
        BOGPayment::checkIpAllowed();

        // check if provided signature matches certificate
        BOGPayment::checkSignature('register');

        // check if you can find order with provided id
        $order_id = BOGPayment::getParam('o.order_id');
        $order = Order::find($order_id);

        if (!$order) {
            BOGPayment::sendError('check', 'Order couldn\'t be found with provided id');
        }

        $trx_id = BOGPayment::getParam('trx_id');
        $result_code = BOGPayment::getParam('result_code');

        if (empty($result_code)) {
            BOGPayment::sendError('register', 'Result code has not been provided');
        }

        if ((int)$result_code === 1) {
            // payment has been succeeded
        } else {
            // payment has been failed
        }

        // send success response
        BOGPayment::sendSuccess('register');
    }
}
```

*Check [request parameters](#parameters-of-register-request) here*

### Recurring

[](#recurring)

Recurring process is the same as default process. Difference is that user doesn't have to fill card details again.

1. Request will be sent to bank to start recurring process
2. Bank will check payment details on your route
3. Bank will register payment details on your route

```
use Zorb\BOGPayment\Facades\BOGPayment;

class PaymentRecurringController extends Controller
{
    //
    public function __invoke(string $trx_id)
    {
        return BOGPayment::repeat($trx_id, [
            'recurring' => true,
        ]);
    }
}
```

In your check and register controllers you can catch `BOGPayment::getParam('o.recurring')` parameter and now you will know that this process is from recurring request.

### Refund

[](#refund)

In order to refund money you need to have trx\_id of payment and rrn.

```
use Zorb\BOGPayment\Facades\BOGPayment;

class PaymentRefundController extends Controller
{
    //
    public function __invoke(string $trx_id, string $rrn)
    {
        $result = BOGPayment::refund($trx_id, $rrn);

        if ((int)$result->code === 1) {
            // refund process succeeded
        } else {
            // refund process failed
        }
    }
}
```

*Check [result parameters](#refund-result) here*

Additional Information
----------------------

[](#additional-information)

### Parameters of check request

[](#parameters-of-check-request)

ParamMeaningmerch\_idMerchant ID of your shop *(length 32)*trx\_idTransaction ID of current payment *(length 32)*lang\_codeISO 639 language codes *(EN/KA/RU)*o.\*Additional parameters provided by you on redirecttsPayment creation time *(yyyyMMdd HH:mm:ss)*### Parameters of register request

[](#parameters-of-register-request)

ParamMeaningmerch\_idMerchant ID of your shop *(length 32)*trx\_idTransaction ID of current payment *(length 32)*merchant\_trxTransaction ID, if it is provided by shopresult\_codeResult code of the payment *(1 - Success, 2 - Fail)*amountInteger value of payment amountp.rrnRRN of paymentp.transmissionDateTimeAuthorization request date and time *(MMddHHmmss)*o.\*Additional parameters provided by you on redirectm.\*Parameters provided on first phase of payment processtsPayment creation time *(yyyyMMdd HH:mm:ss)*signatureBase64 encoded signature to compare with certificatep.cardholderCardholder namep.authcodeAuthentication code from processing *(ISO 8583 Field 38)*p.maskedPanMasked card numberp.isFullyAuthenticatedResult of 3D authentication *(Y - Success, N - Fail)*p.storage.card.refParameters of the cardp.storage.card.expDtExpiration date of card *(YYMM)*p.storage.card.recurrentAuthorization status of recurring process *(Y - Recurring is possible, N - Reucrring is not possive)*p.storage.card.registeredCard registration status *(Y - Card has been registered, N - Card was not registered)*ext\_result\_codeAdditional information about result code### Refund result

[](#refund-result)

KeyMeaningcodeNumeric value for result codedescDescription of payment result### Extended result codes

[](#extended-result-codes)

CodeNumberKeyDescriptionOK0SUCCESSThe payment was completed successfully, the result was successfully communicated to the storePREAUTHORIZE\_OK3SUCCESSThe blocking of the amount was completed successfully, the result was successfully reported to the storeONLINE\_RP\_FAILED1SEMI-SUCCESSFULThe payment was completed successfully, but the result was not successfully delivered to the store in Online modeCPA\_REJECTED2FAILEDThe store refused to process the payment in the first phaseCPA\_NONE21FAILEDIn-store payment verification was not performed. Perhaps the store or billing has been blockedCPA\_FAILED4FAILEDAn error occurred while interacting with the store during the first phaseCLIENT\_LOST53FAILEDThe transaction timed out because the user refused to continue the payment for some reasonUSER\_CANCEL54FAILEDThe user deliberately chose to cancel the paymentPAYMENT\_REJECTED-2FAILEDRefusal to process paymentPAYMENT\_FAILED-3FAILEDError during paymentPAYMENT\_REVERSED-4FAILEDA successful payment was canceled on the initiative of the store at the registerPayment stage. The use of this code is for the futureCS\_NOTSUPPORTED11FAILEDThe option of saving cards is not available for this store, payment for previously saved cards, recurring payments or currency is not supported for recurrent checksCS\_LIMITEXCEEDED12FAILEDThe amount in the response of the merchant PaymentAvail Response exceeds maxCardRegAmountCS\_CARDNOTFOUND13FAILEDPaymentAvail Response received card details expired, card is not registered (received cardId is not available for this store) or card does not support recurring paymentsEnvironment Variables
---------------------

[](#environment-variables)

KeyMeaningTypeDefaultBOG\_PAYMENT\_DEBUGThis value decides to log or not to log requestsboolfalseBOG\_PAYMENT\_URLPayment url from Bank of GeorgiastringBOG\_PAYMENT\_MERCHANT\_IDMerchant ID from Bank of GeorgiastringBOG\_PAYMENT\_PAGE\_IDPage ID from Bank of GeorgiastringBOG\_PAYMENT\_ACCOUNT\_IDAccount ID from Bank of GeorgiastringBOG\_PAYMENT\_SHOP\_NAMEShop Name for Bank of Georgia paymentstringAPP\_NAMEBOG\_PAYMENT\_SUCCESS\_URLSuccess callback url for Bank of Georgiastring/payments/successBOG\_PAYMENT\_FAIL\_URLFail callback url for Bank of Georgiastring/payments/failBOG\_PAYMENT\_CURRENCYDefault currency for Bank of Georgia paymentint981BOG\_PAYMENT\_LANGUAGEDefault language for Bank of Georgia paymentstringKABOG\_PAYMENT\_HTTP\_AUTH\_USERHTTP Authentication username for Bank of Georgia paymentstringBOG\_PAYMENT\_HTTP\_AUTH\_PASSHTTP Authentication password for Bank of Georgia paymentstringBOG\_PAYMENT\_ALLOWED\_IPSComma separated list of allowed ips to access your system from Bank of Georgiastring213.131.36.62BOG\_PAYMENT\_CERTIFICATE\_PATHBank of Georgia certificate path from storagestringapp/bog.cerBOG\_PAYMENT\_REFUND\_API\_PASSBank of Georgia api password for refund operationstringLicense
-------

[](#license)

[zgabievi/laravel-bogpayment](https://github.com/zgabievi/laravel-bogpayment) is licensed under a [MIT License](https://github.com/zgabievi/laravel-bogpayment/blob/master/LICENSE).

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity16

Limited adoption so far

Community12

Small or concentrated contributor base

Maturity50

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 55% 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 ~42 days

Recently: every ~73 days

Total

8

Last Release

1813d ago

PHP version history (2 changes)0.1.0PHP ^7.2

0.3.0PHP ^7.2|^7.3|^7.4

### Community

Maintainers

![](https://www.gravatar.com/avatar/97b2001280ff47bbc67e542074e290919291715cd6c9f694e6787b50d67c60ad?d=identicon)[zgabievi](/maintainers/zgabievi)

---

Top Contributors

[![zgabievi](https://avatars.githubusercontent.com/u/1515299?v=4)](https://github.com/zgabievi "zgabievi (11 commits)")[![gabiezur](https://avatars.githubusercontent.com/u/131362365?v=4)](https://github.com/gabiezur "gabiezur (8 commits)")[![waska14](https://avatars.githubusercontent.com/u/19436616?v=4)](https://github.com/waska14 "waska14 (1 commits)")

### Embed Badge

![Health badge](/badges/zgabievi-laravel-bogpayment/health.svg)

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

###  Alternatives

[spatie/laravel-activitylog

A very simple activity logger to monitor the users of your website or application

5.8k45.4M309](/packages/spatie-laravel-activitylog)[cviebrock/eloquent-sluggable

Easy creation of slugs for your Eloquent models in Laravel

4.0k13.6M253](/packages/cviebrock-eloquent-sluggable)[laravel/pulse

Laravel Pulse is a real-time application performance monitoring tool and dashboard for your Laravel application.

1.7k12.1M99](/packages/laravel-pulse)[genealabs/laravel-model-caching

Automatic caching for Eloquent models.

2.4k4.8M26](/packages/genealabs-laravel-model-caching)[cmgmyr/messenger

Simple user messaging tool for Laravel

2.6k2.4M6](/packages/cmgmyr-messenger)[tucker-eric/eloquentfilter

An Eloquent way to filter Eloquent Models

1.8k4.8M26](/packages/tucker-eric-eloquentfilter)

PHPackages © 2026

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