PHPackages                             nikajorjika/bog-payment - 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. nikajorjika/bog-payment

ActiveLibrary[Payment Processing](/categories/payments)

nikajorjika/bog-payment
=======================

This is my package bog-payment

v1.0.7(1y ago)5361[6 PRs](https://github.com/nikajorjika/laravel-bog-payment/pulls)MITPHPPHP ^8.1|^8.2CI passing

Since Nov 6Pushed 1mo ago1 watchersCompare

[ Source](https://github.com/nikajorjika/laravel-bog-payment)[ Packagist](https://packagist.org/packages/nikajorjika/bog-payment)[ Docs](https://github.com/nikajorjika/bog-payment)[ GitHub Sponsors](https://github.com/Jorjika)[ RSS](/packages/nikajorjika-bog-payment/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (8)Dependencies (14)Versions (16)Used By (0)

Deprecated
==========

[](#deprecated)

⚠️ Deprecation Warning
----------------------

[](#️-deprecation-warning)

This package is **deprecated** and will no longer receive updates, bug fixes, or security patches.

### 🔄 Recommended Alternatives

[](#-recommended-alternatives)

The package has been moved to a new vendor. To continue receiving updates, please switch to the new package.

- **[RedberryProducts/laravel-bog-payment](https://github.com/RedberryProducts/laravel-bog-payment)** – Maintained and actively supported.

### ❓ What This Means

[](#-what-this-means)

- **No new features** will be added.
- **No bug fixes** or **security patches** will be provided.
- **No support** for future Laravel versions.
- The repository may be archived in the near future.

### 🚀 Migration Guide

[](#-migration-guide)

1. In composer.json, replace `"nikajorjika/bog-payment": "^1.0"` with `"redberryproducts/laravel-bog-payment": "^1.0"`
2. Run `composer update`
3. Replace `Jorjika\BogPayment\Facades\Pay` with `RedberryProducts\LaravelBogPayment\Facades\Pay`
4. Replace `Jorjika\BogPayment\Facades\Transaction` with `RedberryProducts\LaravelBogPayment\Facades\Transaction`
5. In your Listener, replace `Nikajorjika\BogPayment\Events\TransactionStatusUpdated` with `RedberryProducts\LaravelBogPayment\Events\TransactionStatusUpdated`

### ❤️ Thank You

[](#️-thank-you)

BOG Payment Gateway
===================

[](#bog-payment-gateway)

The BOG Payment package provides seamless integration with the Bank of Georgia's payment gateway, enabling Laravel applications to process payments efficiently.

[![Latest Version on Packagist](https://camo.githubusercontent.com/21494e345e6f75285f6c65c1d10cb4ccd48ba7e382d23988b54aff9816ba1a01/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6e696b616a6f726a696b612f626f672d7061796d656e742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/nikajorjika/bog-payment)[![GitHub Tests Action Status](https://camo.githubusercontent.com/f1cc0db5dc042280b7021679b23e845af5c75afa0b9936ea6efc965ecd701a2e/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6e696b616a6f726a696b612f626f672d7061796d656e742f72756e2d74657374732e796d6c3f6272616e63683d6d61696e266c6162656c3d7465737473267374796c653d666c61742d737175617265)](https://github.com/nikajorjika/bog-payment/actions?query=workflow%3Arun-tests+branch%3Amain)[![GitHub Code Style Action Status](https://camo.githubusercontent.com/a5c12df3f96cecc72d9c9995a59c7355233bd421e689d23703c66637afa8261e/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f616374696f6e732f776f726b666c6f772f7374617475732f6e696b616a6f726a696b612f626f672d7061796d656e742f6669782d7068702d636f64652d7374796c652d6973737565732e796d6c3f6272616e63683d6d61696e266c6162656c3d636f64652532307374796c65267374796c653d666c61742d737175617265)](https://github.com/nikajorjika/bog-payment/actions?query=workflow%3A%22Fix+PHP+code+style+issues%22+branch%3Amain)[![Total Downloads](https://camo.githubusercontent.com/45b2a334dde9818c021bed70dd2aca50eb78757aedd5ab05b7885d6dee17d26d/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6e696b616a6f726a696b612f626f672d7061796d656e742e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/nikajorjika/bog-payment)

### Demo

[](#demo)

You can find a demo project [here](https://github.com/nikajorjika/bog-payment-demo)

### Features

[](#features)

- Payment Processing: Initiate and manage transactions through the Bank of Georgia.
- Transaction Status: Retrieve and handle the status of payments.
- Secure Communication: Ensure secure data transmission with the payment gateway.

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

[](#installation)

You can install the package via composer:

```
composer require nikajorjika/bog-payment
```

You can publish the config file with:

```
php artisan vendor:publish --tag="bog-payment-config"
```

Once published, the configuration file will be available at:

```
config/bog-payment.php
```

Environment Variables
---------------------

[](#environment-variables)

Add the following variables to your `.env` file to configure the package:

```
BOG_SECRET=[your_client_secret]
BOG_CLIENT_ID=[your_client_id]
BOG_PUBLIC_KEY=[your_public_key] # Can be found at https://api.bog.ge/docs/payments/standard-process/callback
```

You can find up to date `BOG_PUBLIC_KEY` in the Bank of Georgia's [API documentation](https://api.bog.ge/docs/payments/standard-process/callback).

You can also configure additional environment variables as needed. But this is the minimum that you need to implement.

Usage
-----

[](#usage)

### Usage Example: Simple Payment Processing

[](#usage-example-simple-payment-processing)

To initiate a payment, use the `Pay` facade to set the order details and process the transaction:

```
use Jorjika\BogPayment\Facades\Pay;
use App\Models\Transaction;

// Step 1: Create a transaction record
$transaction = Transaction::create([
    'user_id'    => auth()->id(),
    'amount'     => $data['total_amount'],
    'status'     => 'pending', // Initial status
]);

// Step 2: Process the payment
$paymentDetails = Pay::orderId($transaction->id)
    ->redirectUrl(route('bog.v1.transaction.status', ['transaction_id' => $transaction->id]))
    ->amount($transaction->amount)
    ->process();

// Step 3: Update the transaction with payment details
$transaction->update([
    'transaction_id'   => $paymentDetails['id'],
]);

// Step 4: Redirect user to the payment gateway
return redirect($paymentDetails['redirect_url']);
```

here's an example of the response:

```
$paymentDetails = [
    'id' => 'test-id',
    'redirect_url' => 'https://example.com/redirect',
    'details_url' => 'https://example.com/details',
]
```

### Save Card During Payment

[](#save-card-during-payment)

To save the card during the payment process, you can use the `saveCard()` method. This method will save the card details for future transactions.

When you want to save card during the payment, you need to do the following:

```
use Jorjika\BogPayment\Facades\Pay;

// SaveCard method will initiate another request that notifies bank to save card details
$response = Pay::orderId($external_order_id)->amount($amount)->saveCard()->process();

// Example response
$response = [
    'id' => 'test-id',
    'redirect_url' => 'https://example.com/redirect',
    'details_url' => 'https://example.com/details',
];
```

When you receive the response, you can save the card details in your database, where `id` is the saved card(parent transaction) id that you would use for later transactions.

### Payment with Saved Card

[](#payment-with-saved-card)

Once you have saved new payment method id in your database, you can initiate payments on saved cards like so:

```
use Jorjika\BogPayment\Facades\Card;

$response = Card::orderId($external_order_id)->amount($amount)->charge("test-id");

// Example response
$response = [
    'id' => 'test-id',
    'redirect_url' => 'https://example.com/redirect',
    'details_url' => 'https://example.com/details',
];
```

Functionality above will charge saved card without the user interaction.

Building the payload
--------------------

[](#building-the-payload)

Although the package provides a convenient way to initiate payments, you can also build the payment payload manually using the provided traits.

The BuildsPayment trait helps you build the payload for payments quickly by providing the following methods

Here's how you do it:

```
getPayload(): // Retrieves the current payload array.

orderId($externalOrderId): // Sets the external order ID for the payment.

callbackUrl($callbackUrl): // Sets a custom callback URL for the payment process.

redirectUrl($statusUrl): // Sets both success and fail URLs to the same value for redirection after the payment.

redirectUrls($failUrl, $successUrl): // Sets separate fail and success URLs for redirection after the payment.

saveCard(): // Sets the save card flag to true for the payment.

amount($totalAmount, $currency = 'GEL', $basket = []): // Defines the total amount, currency, and optionally, the basket details for the payment.

// These methods allow for easy customization of the payment payload to suit various payment requirements.
```

### Set `Buyer`

[](#set-buyer)

You can set the buyer details for the payment by using the `setBuyer()` method. This method accepts an array of buyer details, including the buyer's full\_name, masked\_email, and masked\_phone.

here's the example of how you can set the buyer details:

```
use Jorjika\BogPayment\Facades\Pay;

$buyer = [
    'full_name' => 'John Doe',
    'masked_email' => 'john**@gmail.com',
    'masked_phone' => '59512****10',
];

$paymentDetails = Pay::orderId($transaction->id)
            ->redirectUrl(route('bog.v1.transaction.status', ['transaction_id' => $transaction->id]))
            ->amount($data['total_amount'])
            ->buyer($buyer) // Set new buyer details
            ->process();

// Optionally you can set buyer details separately

$paymentDetails = Pay::orderId($transaction->id)
            ->redirectUrl(route('bog.v1.transaction.status', ['transaction_id' => $transaction->id]))
            ->amount($data['total_amount'])
            ->buyerName($buyer['full_name']) // Set new buyer full name
            ->buyerEmail($buyer['masked_email']) // Set new buyer masked email
            ->buyerPhone($buyer['masked_phone']) // Set new buyer masked phone
            ->process();
```

Callback Handling
-----------------

[](#callback-handling)

The package handles callback behavior automatically. When a payment is processed, it will send a POST request to your callback URL with the payment details. The package then verifies the request's signature to ensure its authenticity and fires the Nikajorjika\\BogPayment\\Events\\TransactionStatusUpdated event, which contains all relevant payment details.

To utilize this functionality, register an event listener in your application to capture and respond to the transaction status updates as needed.

Example: Registering a Listener for Transaction Status Updates Add the following code to your event listener:

```
namespace App\Listeners;

use Nikajorjika\BogPayment\Events\TransactionStatusUpdated;
use Illuminate\Contracts\Queue\ShouldQueue;
use Illuminate\Queue\InteractsWithQueue;

class HandleTransactionStatusUpdate implements ShouldQueue
{
use InteractsWithQueue;

    /**
     * Handle the event.
     *
     * @param  \Nikajorjika\BogPayment\Events\TransactionStatusUpdated  $event
     * @return void
     */
    public function handle(array $event)
    {
        // Implement your logic here
    }
```

### Setting Up the Event Listener

[](#setting-up-the-event-listener)

Setting Up the Event Listener To handle transaction status updates efficiently, you need to register an event listener that listens for the TransactionStatusUpdated event triggered by the package.

1. Generating the Listener Automatically You can generate the event listener using the Artisan command: ```
    php artisan make:listener HandleTransactionStatusUpdate --event=\Nikajorjika\BogPayment\Events\TransactionStatusUpdated
    ```

    This command will create a listener class at `app/Listeners/HandleTransactionStatusUpdate.php`, which you can customize to handle the event logic.

This approach provides flexibility by allowing dynamic event registrations at runtime without modifying the EventServiceProvider.

For more details on event handling in Laravel, refer to the official [documentation](https://laravel.com/docs/11.x/events#event-discovery).

Handling Transaction Status
---------------------------

[](#handling-transaction-status)

The package provides a convenient way to retrieve the status of a transaction using the `Transaction` Facade's `get()` method. This method sends a GET request to the Bank of Georgia payment API to retrieve the transaction status.

Here's how you can use it:

```
use Jorjika\BogPayment\Facades\Transaction;

$transactionDetails = Transaction::get($order_id); // Returns array of transaction details
```

See example of the response [Official Documentation](https://api.bog.ge/docs/payments/standard-process/get-payment-details)

Testing
-------

[](#testing)

```
composer test
```

Changelog
---------

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information on what has changed recently.

Security Vulnerabilities
------------------------

[](#security-vulnerabilities)

Please review [our security policy](../../security/policy) on how to report security vulnerabilities.

Credits
-------

[](#credits)

- [Nika Jorjoliani](https://github.com/nikajorjika)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

42

—

FairBetter than 89% of packages

Maintenance74

Regular maintenance activity

Popularity13

Limited adoption so far

Community13

Small or concentrated contributor base

Maturity59

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 85.5% 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 ~6 days

Total

9

Last Release

500d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/575834382d0d9a2f525665011b42db95bb50b6ed74e4a2dded51a3b77ac85873?d=identicon)[nikajorjika](/maintainers/nikajorjika)

---

Top Contributors

[![nikajorjika](https://avatars.githubusercontent.com/u/4212052?v=4)](https://github.com/nikajorjika "nikajorjika (71 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (5 commits)")[![github-actions[bot]](https://avatars.githubusercontent.com/in/15368?v=4)](https://github.com/github-actions[bot] "github-actions[bot] (5 commits)")[![jshar](https://avatars.githubusercontent.com/u/29817535?v=4)](https://github.com/jshar "jshar (2 commits)")

---

Tags

laravelbog-paymentJorjika

###  Code Quality

TestsPest

Static AnalysisPHPStan

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/nikajorjika-bog-payment/health.svg)

```
[![Health](https://phpackages.com/badges/nikajorjika-bog-payment/health.svg)](https://phpackages.com/packages/nikajorjika-bog-payment)
```

###  Alternatives

[spatie/laravel-health

Monitor the health of a Laravel application

85810.0M83](/packages/spatie-laravel-health)[vormkracht10/laravel-mails

Laravel Mails can collect everything you might want to track about the mails that has been sent by your Laravel app.

24149.7k](/packages/vormkracht10-laravel-mails)[muhammadhuzaifa/telescope-guzzle-watcher

Telescope Guzzle Watcher provide a custom watcher for intercepting http requests made via guzzlehttp/guzzle php library. The package uses the on\_stats request option for extracting the request/response data. The watcher intercept and log the request into the Laravel Telescope HTTP Client Watcher.

98239.8k1](/packages/muhammadhuzaifa-telescope-guzzle-watcher)[musahmusah/laravel-multipayment-gateways

A Laravel Package that makes implementation of multiple payment Gateways endpoints and webhooks seamless

852.2k1](/packages/musahmusah-laravel-multipayment-gateways)[danestves/laravel-polar

A package to easily integrate your Laravel application with Polar.sh

7812.3k](/packages/danestves-laravel-polar)[spatie/laravel-mailcoach-sdk

An SDK to easily work with the Mailcoach API in Laravel apps

41290.2k1](/packages/spatie-laravel-mailcoach-sdk)

PHPackages © 2026

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