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

ActiveProject[API Development](/categories/api)

zgabievi/laravel-bog-console
============================

Bank of Georgia Merchant Console OpenAPI Helper

v0.1.0(5y ago)28MITPHPPHP ^7.2|^8.0

Since Jan 25Pushed 5y ago2 watchersCompare

[ Source](https://github.com/zgabievi/laravel-bog-console)[ Packagist](https://packagist.org/packages/zgabievi/laravel-bog-console)[ RSS](/packages/zgabievi-laravel-bog-console/feed)WikiDiscussions main Synced yesterday

READMEChangelog (1)DependenciesVersions (2)Used By (0)

Bank of Georgia Merchant Console OpenAPI Helper
===============================================

[](#bank-of-georgia-merchant-console-openapi-helper)

[![Packagist](https://camo.githubusercontent.com/4db502f22d663665e5c215a429cee60d37e16a9762baa8276418648d3b879d4a/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7a676162696576692f6c61726176656c2d626f672d636f6e736f6c652e737667)](https://packagist.org/packages/zgabievi/laravel-bog-console)[![Packagist](https://camo.githubusercontent.com/d05d99a591a010613bf840bad5e13da0091d392a9817e66623f6be98e1b893db/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7a676162696576692f6c61726176656c2d626f672d636f6e736f6c652e737667)](https://packagist.org/packages/zgabievi/laravel-bog-console)[![license](https://camo.githubusercontent.com/2443aaca4bf0278d4d975e7cca92cc3d1dda4308f1fe141d87e300b9110f8572/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f7a676162696576692f6c61726176656c2d626f672d636f6e736f6c652e737667)](https://packagist.org/packages/zgabievi/laravel-bog-console)

[![Laravel BOG Console](https://raw.githubusercontent.com/zgabievi/laravel-bog-console/main/assets/bog-console.png)](https://raw.githubusercontent.com/zgabievi/laravel-bog-console/main/assets/bog-console.png)

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

[](#table-of-contents)

- [Installation](#installation)
- [Usage](#usage)
- [ENV Variables](#environment-variables)
- [License](#license)

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

[](#installation)

To get started, you need to install package:

```
composer require zgabievi/laravel-bog-console
```

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

```
'providers' => [
    ...
    Zorb\BOGConsole\BOGConsoleServiceProvider::class,
    ...
];
```

You can publish config file using this command:

```
php artisan vendor:publish --provider="Zorb\BOGConsole\BOGConsoleServiceProvider"
```

This command will copy config file for you.

Usage
-----

[](#usage)

> All of the responses are *stdClasses*. Errors are handled by laravel **abort** helper. Catch exceptions on your own, if you want to handle them.

**Here are methods provided by this package:**

- [Session](#session)
    - [Session opening](#session-opening)
    - [Session termination](#session-termination)
    - [Opening a session with a new password](#opening-a-session-with-a-new-password)
    - [Session extension](#session-extension)
    - [Password change](#password-change)
- [Desktop](#dekstop)
    - [Obtaining the information on turnover for the period](#obtaining-the-information-on-turnover-for-the-period)
    - [Obtaining data for charts](#obtaining-data-for-charts)
- [Obtaining transaction data](#obtaining-transaction-data)
    - [Obtaining the number of transactions](#obtaining-the-number-of-transactions)
    - [Obtaining the list of transactions](#obtaining-the-list-of-transactions)
    - [Obtaining the information about a single transaction](#obtaining-the-information-about-a-single-transaction)
- [Completion of authorization](#completion-of-authorization)
- [Money refund](#money-refund)
- [Card verification history](#card-verification-history)
    - [Obtaining the size of the card verification list](#obtaining-the-size-of-the-card-verification-list)
    - [Obtaining the card verification list](#obtaining-the-card-verification-list)
    - [Obtaining the information about a single card verification operation](#obtaining-the-information-about-a-single-card-verification-operation)
- [Card registration history](#card-registration-history)
    - [Obtaining the size of the card registration list](#obtaining-the-size-of-the-card-registration-list)
    - [Obtaining the card registration list](#obtaining-the-card-registration-list)
    - [Obtaining the information about a single card registration operation](#obtaining-the-information-about-a-single-card-registration-operation)
- [Payment cards](#payment-cards)
    - [Obtaining the information about a single card](#obtaining-the-information-about-a-single-card)
    - [Obtaining the size of the card list](#obtaining-the-size-of-the-card-list)
    - [Obtaining the card list](#obtaining-the-card-list)
    - [Card deactivation](#card-deactivation)

### Session

[](#session)

All requests related to the merchant console shall be made only by authorized users. To be authorized the operator shall enter a username and a password. The service checks the password validity and opens the session. Then all requests shall be sent within this session.

The merchant operator profile is created in the administrative console of the Service.

The requests to the Service can be sent by the merchant operator using the merchant console. Or by an external system on behalf of the merchant operator. The format of the requests and the rules for their processing are the same.

#### Session opening

[](#session-opening)

```
use Zorb\BOGConsole\Facades\BOGConsole;

class FakeController
{
    public function __invoke()
    {
        $response = BOGConsole::setIdentifier('API_USERNAME') // optional - will be used from env
            ->setPassword('API_PASSWORD') // optional - will be used from env
            ->startSession();
    }
}
```

Example `$response:`

```
{
    "sessionId": "769B189AB989D1A77153522F5D869049"
}
```

#### Session termination

[](#session-termination)

```
use Zorb\BOGConsole\Facades\BOGConsole;

class FakeController
{
    public function __invoke()
    {
        $response = BOGConsole::finishSession();

        // or

        $response = BOGConsole::endSession();

        // or

        $response = BOGConsole::terminateSession();
    }
}
```

If there was no exception, it means the session terminated successfully.

#### Opening a session with a new password

[](#opening-a-session-with-a-new-password)

```
use Zorb\BOGConsole\Facades\BOGConsole;

class FakeController
{
    public function __invoke()
    {
        $response = BOGConsole::setIdentifier('API_USERNAME') // optional - will be used from env
            ->setPassword('CURRENT_API_PASSWORD') // optional - will be used from env
            ->setNewPassword('NEW_PASSWORD') // required
            ->startSessionWithChangePassword();
    }
}
```

Example `$response:`

```
{
    "sessionId": "769B189AB989D1A77153522F5D869049"
}
```

#### Session extension

[](#session-extension)

```
use Zorb\BOGConsole\Facades\BOGConsole;

class FakeController
{
    public function __invoke()
    {
        $response = BOGConsole::extendSession();

        // or

        $response = BOGConsole::keepSessionAlive();
    }
}
```

If there was no exception, it means the session lifetime extended.

#### Password change

[](#password-change)

```
use Zorb\BOGConsole\Facades\BOGConsole;

class FakeController
{
    public function __invoke()
    {
        $response = BOGConsole::setPassword('CURRENT_PASSWORD') // optional - will be used from env
            ->setNewPassword('NEW_PASSWORD') // required
            ->changePassword();
    }
}
```

If there was no exception, it means the session lifetime extended.

### Desktop

[](#desktop)

#### Obtaining the information on turnover for the period

[](#obtaining-the-information-on-turnover-for-the-period)

```
use Zorb\BOGConsole\Facades\BOGConsole;
use Zorb\BOGConsole\Enums\TransactionType;

class FakeController
{
    public function __invoke()
    {
        $response = BOGConsole::setType(TransactionType::CardToCard) // required
            ->setFrom(1581282000000) // optional
            ->setTo(1581886799999) // optional
            ->setMerchantId('KFH828HSH') // optional
            ->statisticsSummary();
    }
}
```

Example `$response:`

```
{
    "GEL": {
        "sum": 2565000,
        "avg": 2565.0,
        "commission": 0,
        "totalCount": 60,
        "successfulCount": 54
    },
    "USD": {
        "sum": 2565,
        "avg": 256.0,
        "commission": 0,
        "totalCount": 6,
        "successfulCount": 5
    },
    "UNKNOWN": {
        "sum": 0,
        "avg": 0,
        "commission": 0,
        "totalCount": 1,
        "successfulCount": 0
    }
}
```

#### Obtaining data for charts

[](#obtaining-data-for-charts)

```
use Zorb\BOGConsole\Enums\ChartScale;
use Zorb\BOGConsole\Facades\BOGConsole;
use Zorb\BOGConsole\Enums\TransactionType;
use Zorb\BOGConsole\Enums\TransactionStatus;

class FakeController
{
    public function __invoke()
    {
        $amount_response = BOGConsole::setType(TransactionType::CardToCard) // optional
            ->setScale(ChartScale::Week) // required
            ->setStatus(TransactionStatus::Success) // optional
            ->setFrom(1581282000000) // optional
            ->setTo(1581886799999) // optional
            ->setMerchantId('KFH828HSH') // optional
            ->amountStatistics();

        $commission_response = BOGConsole::setType(TransactionType::CardToCard) // optional
            ->setScale(ChartScale::Week) // required
            ->setStatus(TransactionStatus::Success) // optional
            ->setFrom(1581282000000) // optional
            ->setTo(1581886799999) // optional
            ->setMerchantId('KFH828HSH') // optional
            ->commissionStatistics();

        $transactions_response = BOGConsole::setType(TransactionType::CardToCard) // optional
            ->setScale(ChartScale::Week) // required
            ->setStatus(TransactionStatus::Success) // optional
            ->setFrom(1581282000000) // optional
            ->setTo(1581886799999) // optional
            ->setMerchantId('KFH828HSH') // optional
            ->transactionStatistics();

        $full_response = BOGConsole::setType(TransactionType::CardToCard) // optional
            ->setScale(ChartScale::Week) // required
            ->setStatus(TransactionStatus::Success) // optional
            ->setFrom(1581282000000) // optional
            ->setTo(1581886799999) // optional
            ->setMerchantId('KFH828HSH') // optional
            ->fullStatistics();
    }
}
```

Example `$response:`

```
{
    "GEL": [
        [
            1407452400000,
            13,
            4500,
            45
        ],
        [
            1407538800000,
            21,
            200,
            2
        ],
        [
            1407625200000,
            65,
            12500,
            125
        ],
        [
            1407711600000,
            48,
            344,
            4
        ],
        [
            1407798000000,
            25,
            10000,
            100
        ],
        [
            1407884400000,
            15,
            5000,
            300
        ],
        [
            1407970800000,
            88,
            12000,
            120
        ]
    ],
    "USD": [
        [
            1407538800000,
            2,
            200,
            2
        ],
        [
            1407625200000,
            6,
            200,
            2
        ]
    ]
}
```

### Obtaining transaction data

[](#obtaining-transaction-data)

#### Obtaining the number of transactions

[](#obtaining-the-number-of-transactions)

```
use Zorb\BOGConsole\Enums\SourceType;
use Zorb\BOGConsole\Facades\BOGConsole;
use Zorb\BOGConsole\Enums\TransactionType;
use Zorb\BOGConsole\Enums\TransactionStatus;

class FakeController
{
    public function __invoke()
    {
        $response = BOGConsole::setType(TransactionType::CardToCard) // optional
            ->setStatus(TransactionStatus::Finished) // optional - you can specify multiple comma separated values
            ->setFrom(1581282000000) // optional
            ->setTo(1581886799999) // optional
            ->setRRN('29847529874') // optional
            ->setSourceType(SourceType::ApplePay) // optional - you can specify multiple comma separated values
            ->setSource('421653xxxxxx8430') // optional
            ->setDestination('421653xxxxxx8430') // optional
            ->setCurrency('GEL') // optional
            ->setToken('J2L4J5LKHJ2424LK34J234') // optional
            ->setMerchantId('KFH828HSH') // optional
            ->setMerchantTrx('LKJ24K5LJ356KJ34KLJ45LKJ345LK3') // optional
            ->setSourceId('ASLKDJ245KJ4JK345J4') // optional
            ->setRecurrent() // optional
            ->setSourceAddedToProfile() // optional
            ->setRegisteredSource() // optional
            ->transactionHistoryCount();
    }
}
```

Example `$response:`

```
{
    "count": 20
}
```

#### Obtaining the list of transactions

[](#obtaining-the-list-of-transactions)

```
use Zorb\BOGConsole\Enums\SourceType;
use Zorb\BOGConsole\Facades\BOGConsole;
use Zorb\BOGConsole\Enums\OrderDirection;
use Zorb\BOGConsole\Enums\TransactionType;
use Zorb\BOGConsole\Enums\TransactionStatus;

class FakeController
{
    public function __invoke()
    {
        $response = BOGConsole::setType(TransactionType::CardToCard) // optional
            ->setStatus(TransactionStatus::Finished) // optional - you can specify multiple comma separated values
            ->setFrom(1581282000000) // optional
            ->setTo(1581886799999) // optional
            ->setRRN('29847529874') // optional
            ->setSourceType(SourceType::ApplePay) // optional - you can specify multiple comma separated values
            ->setSource('421653xxxxxx8430') // optional
            ->setDestination('421653xxxxxx8430') // optional
            ->setCurrency('GEL') // optional
            ->setToken('J2L4J5LKHJ2424LK34J234') // optional
            ->setMerchantId('KFH828HSH') // optional
            ->setMerchantTrx('LKJ24K5LJ356KJ34KLJ45LKJ345LK3') // optional
            ->setSourceId('ASLKDJ245KJ4JK345J4') // optional
            ->setRecurrent() // optional
            ->setSourceAddedToProfile() // optional
            ->setRegisteredSource() // optional
            ->setOffset(5) // optional - 0 by default
            ->setLimit(30) // optional - 10 by default
            ->setOrderDirection(OrderDirection::Ascending) // optional - DESC by default
            ->transactionHistory();
    }
}
```

Example `$response:`

```
[
    {
        "token": "234234LK234",
        "startedAt": "1415266887057",
        "finishedAt": "1415266887057",
        "type": "CARD_TO_CARD",
        "rrn": 123456789001,
        "approvalCode": "123456",
        "srcType": "card",
        "src": "5454xxxxxxxx5454",
        "dst": "4111xxxxxxxx1111",
        "amount": 49500,
        "commission": 743,
        "fullAmount": 50243,
        "refundAmount": 52500,
        "currency": "GEL",
        "merchantId": "TESTMERCHANT",
        "merchantTrx": "TX-582346237845",
        "status": "SUCCESS",
        "isFullyAuthenticated": true,
        "extendedCode": "OK",
        "refundable": true
    },
    {
        "token": "233NB2323",
        "startedAt": 1415266887057,
        "finishedAt": "1415266887057",
        "type": "CARD_TO_CARD",
        "rrn": "123456789002",
        "approvalCode": "123457",
        "srcType": "card",
        "src": "5454xxxxxxxx5454",
        "dst": "4111xxxxxxxx1111",
        "amount": 132500,
        "commission": 1888,
        "fullAmount": 134488,
        "refundAmount": 0,
        "currency": "GEL",
        "merchantId": "TESTMERCHANT",
        "merchantTrx": "TX-582346237843",
        "status": "SUCCESS",
        "extendedCode": "OK",
        "isFullyAuthenticated": true,
        "refundable": true
    }
]
```

#### Obtaining the information about a single transaction

[](#obtaining-the-information-about-a-single-transaction)

```
use Zorb\BOGConsole\Facades\BOGConsole;

class FakeController
{
    public function __invoke()
    {
        $response = BOGConsole::setToken('J2L4J5LKHJ2424LK34J234') // required
            ->transactionDetails();
    }
}
```

Example `$response:`

```
{
    "token": "34234NNM234234",
    "startedAt": 1415266887057,
    "finishedAt": "1415266887057",
    "type": "CARD_TO_CARD",
    "rrn": "123456789001",
    "approvalCode": "123456",
    "srcType": "card",
    "src": "5454xxxxxxxx5454",
    "dst": "4111xxxxxxxx1111",
    "amount": 49500,
    "commission": 743,
    "fullAmount": 50243,
    "refundAmount": 0,
    "currency": "GEL",
    "merchantId": "TESTMERCHANT",
    "merchantTrx": "TX-582346237843",
    "status": "SUCCESS",
    "isFullyAuthenticated": true,
    "refundable": true,
    "cardholder": "JOHN DOE",
    "params": {
        "order": "12370"
    },
    "description": "Order 12370 - The Martian",
    "refunds": [
        {
            "createdAt": "1415266887057",
            "amount": "2500",
            "msisdn": "79160000001",
            "comment": "Partial refund",
            "status": "PROCESSING"
        }
    ],
    "hasSignature": true,
    "location": {
        "latitude": 12.345678,
        "longitude": -123.456789
    }
}
```

### Completion of authorization

[](#completion-of-authorization)

```
use Zorb\BOGConsole\Facades\BOGConsole;

class FakeController
{
    public function __invoke()
    {
        $response = BOGConsole::setToken('J2L4J5LKHJ2424LK34J234') // required
            ->setAmount(5000) // required
            ->setCurrency('GEL') // required
            ->completePreAuth();

        // or

        $response = BOGConsole::setToken('J2L4J5LKHJ2424LK34J234') // required
            ->setAmount(5000) // required
            ->setCurrency('GEL') // required
            ->finishPreAuth();
    }
}
```

Example `$response:`

```
{
    "token": "1234567890ABCDEF",
    "startedAt": "1415266887057",
    "finishedAt": "1415266887057",
    "type": "ACQUIRING",
    "rrn": "123123123",
    "approvalCode": "123434",
    "srcType": "card",
    "src": "5454xxxxxxxx5454",
    "amount": "10000",
    "fullAmount": "10000",
    "currency": "GEL",
    "merchantId": "MERCH1",
    "merchantTrx": "trx-232323",
    "status": "SUCCESS",
    "extendedCode": "OK",
    "responseCode": "00",
    "isFullyAuthenticated": true,
    "orderStatus": "REGISTERED_AT_MERCHANT",
    "orderStatusChangedAt": "1415266887057",
    "refundable": true,
    "params": {
        "order_id": "121212"
    },
    "description": "some payment"
}
```

### Money refund

[](#money-refund)

```
use Zorb\BOGConsole\Facades\BOGConsole;

class FakeController
{
    public function __invoke()
    {
        $response = BOGConsole::setToken('J2L4J5LKHJ2424LK34J234') // required
            ->setAmount(5000) // required
            ->setCurrency('GEL') // required
            ->setComment('You are getting back your money') // optional
            ->refund();
    }
}
```

Example `$response:`

```
{
    "status": "SUCCESS",
    "action": "REFUND",
    "rrn": "29847529874"
}
```

### Card verification history

[](#card-verification-history)

#### Obtaining the size of the card verification list

[](#obtaining-the-size-of-the-card-verification-list)

```
use Zorb\BOGConsole\Facades\BOGConsole;
use Zorb\BOGConsole\Enums\TransactionStatus;

class FakeController
{
    public function __invoke()
    {
        $response = BOGConsole::setStatus(TransactionStatus::Finished) // optional - you can specify multiple comma separated values
            ->setFrom(1581282000000) // optional
            ->setTo(1581886799999) // optional
            ->setPAN('421653xxxxxx8430') // optional
            ->setToken('J2L4J5LKHJ2424LK34J234') // optional
            ->setMerchantId('KFH828HSH') // optional
            ->setMerchantTrx('LKJ24K5LJ356KJ34KLJ45LKJ345LK3') // optional
            ->setCardId('ASLKDJ245KJ4JK345J4') // optional
            ->cardVerificationCount();
    }
}
```

Example `$response:`

```
{
    "count": 20
}
```

#### Obtaining the card verification list

[](#obtaining-the-card-verification-list)

```
use Zorb\BOGConsole\Facades\BOGConsole;
use Zorb\BOGConsole\Enums\OrderDirection;
use Zorb\BOGConsole\Enums\TransactionStatus;

class FakeController
{
    public function __invoke()
    {
        $response = BOGConsole::setStatus(TransactionStatus::Finished) // optional - you can specify multiple comma separated values
            ->setFrom(1581282000000) // optional
            ->setTo(1581886799999) // optional
            ->setPAN('421653xxxxxx8430') // optional
            ->setToken('J2L4J5LKHJ2424LK34J234') // optional
            ->setMerchantId('KFH828HSH') // optional
            ->setMerchantTrx('LKJ24K5LJ356KJ34KLJ45LKJ345LK3') // optional
            ->setCardId('ASLKDJ245KJ4JK345J4') // optional
            ->setOffset(5) // optional - 0 by default
            ->setLimit(30) // optional - 10 by default
            ->setOrderDirection(OrderDirection::Ascending) // optional - DESC by default
            ->cardVerificationHistory();
    }
}
```

Example `$response:`

```
[
    {
        "token": "234234LK234",
        "startedAt": "1415266887057",
        "finishedAt": "1415266887057",
        "pan": "5454xxxxxxxx5454",
        "merchantId": "TESTMERCHANT",
        "merchantTrx": "TX-582346237845",
        "status": "SUCCESS",
        "extendedCode": "OK",
        "responseCode": "000",
        "isFullyAuthenticated": true,
        "orderStatus": "REGISTERED_AT_MERCHANT",
        "amountReverted": true
    }
]
```

#### Obtaining the information about a single card verification operation

[](#obtaining-the-information-about-a-single-card-verification-operation)

```
use Zorb\BOGConsole\Facades\BOGConsole;

class FakeController
{
    public function __invoke()
    {
        $response = BOGConsole::setToken('J2L4J5LKHJ2424LK34J234') // required
            ->cardVerificationDetails();
    }
}
```

Example `$response:`

```
{
    "token": "234234LK234",
    "startedAt": "1415266887057",
    "finishedAt": "1415266887057",
    "pan": "5454xxxxxxxx5454",
    "merchantId": "TESTMERCHANT",
    "merchantTrx": "TX-582346237845",
    "status": "SUCCESS",
    "extendedCode": "OK",
    "responseCode": "000",
    "isFullyAuthenticated": true,
    "orderStatus": "REGISTERED_AT_MERCHANT",
    "amountReverted": true,
    "cardId": "34234NNM234234"
}
```

### Card registration history

[](#card-registration-history)

#### Obtaining the size of the card registration list

[](#obtaining-the-size-of-the-card-registration-list)

```
use Zorb\BOGConsole\Facades\BOGConsole;
use Zorb\BOGConsole\Enums\TransactionStatus;

class FakeController
{
    public function __invoke()
    {
        $response = BOGConsole::setStatus(TransactionStatus::Finished) // optional - you can specify multiple comma separated values
            ->setFrom(1581282000000) // optional
            ->setTo(1581886799999) // optional
            ->setPAN('421653xxxxxx8430') // optional
            ->setToken('J2L4J5LKHJ2424LK34J234') // optional
            ->setMerchantId('KFH828HSH') // optional
            ->setMerchantTrx('LKJ24K5LJ356KJ34KLJ45LKJ345LK3') // optional
            ->setCardId('ASLKDJ245KJ4JK345J4') // optional
            ->cardRegistrationCount();
    }
}
```

Example `$response:`

```
{
    "count": 20
}
```

#### Obtaining the card registration list

[](#obtaining-the-card-registration-list)

```
use Zorb\BOGConsole\Facades\BOGConsole;
use Zorb\BOGConsole\Enums\OrderDirection;
use Zorb\BOGConsole\Enums\TransactionStatus;

class FakeController
{
    public function __invoke()
    {
        $response = BOGConsole::setStatus(TransactionStatus::Finished) // optional - you can specify multiple comma separated values
            ->setFrom(1581282000000) // optional
            ->setTo(1581886799999) // optional
            ->setPAN('421653xxxxxx8430') // optional
            ->setToken('J2L4J5LKHJ2424LK34J234') // optional
            ->setMerchantId('KFH828HSH') // optional
            ->setMerchantTrx('LKJ24K5LJ356KJ34KLJ45LKJ345LK3') // optional
            ->setCardId('ASLKDJ245KJ4JK345J4') // optional
            ->setOffset(5) // optional - 0 by default
            ->setLimit(30) // optional - 10 by default
            ->setOrderDirection(OrderDirection::Ascending) // optional - DESC by default
            ->cardRegistrationHistory();
    }
}
```

Example `$response:`

```
[
    {
        "token": "234234LK234",
        "startedAt": "1415266887057",
        "finishedAt": "1415266887057",
        "pan": "5454xxxxxxxx5454",
        "merchantId": "TESTMERCHANT",
        "merchantTrx": "TX-582346237845",
        "status": "SUCCESS",
        "extendedCode": "OK",
        "responseCode": "000",
        "isFullyAuthenticated": true,
        "orderStatus": "REGISTERED_AT_MERCHANT",
        "amountReverted": true
    }
]
```

#### Obtaining the information about a single card registration operation

[](#obtaining-the-information-about-a-single-card-registration-operation)

```
use Zorb\BOGConsole\Facades\BOGConsole;

class FakeController
{
    public function __invoke()
    {
        $response = BOGConsole::setToken('J2L4J5LKHJ2424LK34J234') // required
            ->cardRegistrationDetails();
    }
}
```

Example `$response:`

```
{
    "token": "234234LK234",
    "startedAt": "1415266887057",
    "finishedAt": "1415266887057",
    "pan": "5454xxxxxxxx5454",
    "merchantId": "TESTMERCHANT",
    "merchantTrx": "TX-582346237845",
    "status": "SUCCESS",
    "extendedCode": "OK",
    "responseCode": "000",
    "isFullyAuthenticated": true,
    "orderStatus": "REGISTERED_AT_MERCHANT",
    "amountReverted": true,
    "cardId": "34234NNM234234"
}
```

### Payment cards

[](#payment-cards)

#### Obtaining the information about a single card

[](#obtaining-the-information-about-a-single-card)

```
use Zorb\BOGConsole\Facades\BOGConsole;

class FakeController
{
    public function __invoke()
    {
        $response = BOGConsole::setCardId('34234NNM234234') // required
            ->cardDetails();
    }
}
```

Example `$response:`

```
{
    "id": "34234NNM234234",
    "status": "VERIFIED",
    "brand": "VISA",
    "pan": "4756xxxxxxxx6346",
    "expiry": "1225",
    "cardholder": "James Bond",
    "registeredAt": "1415266887057",
    "merchantId": "TESTMERCHANT"
}
```

#### Obtaining the size of the card list

[](#obtaining-the-size-of-the-card-list)

```
use Zorb\BOGConsole\Enums\CardStatus;
use Zorb\BOGConsole\Facades\BOGConsole;

class FakeController
{
    public function __invoke()
    {
        $response = BOGConsole::setStatus(CardStatus::Verified) // optional
            ->setFrom(1581282000000) // optional
            ->setTo(1581886799999) // optional
            ->setPAN('421653xxxxxx8430') // optional
            ->setToken('J2L4J5LKHJ2424LK34J234') // optional
            ->setMerchantId('KFH828HSH') // optional
            ->cardCount();
    }
}
```

Example `$response:`

```
{
    "count": 20
}
```

#### Obtaining the card list

[](#obtaining-the-card-list)

```
use Zorb\BOGConsole\Enums\CardStatus;
use Zorb\BOGConsole\Facades\BOGConsole;
use Zorb\BOGConsole\Enums\OrderDirection;

class FakeController
{
    public function __invoke()
    {
        $response = BOGConsole::setStatus(CardStatus::Verified) // optional
            ->setFrom(1581282000000) // optional
            ->setTo(1581886799999) // optional
            ->setPAN('421653xxxxxx8430') // optional
            ->setToken('J2L4J5LKHJ2424LK34J234') // optional
            ->setMerchantId('KFH828HSH') // optional
            ->setOffset(5) // optional - 0 by default
            ->setLimit(30) // optional - 10 by default
            ->setOrderDirection(OrderDirection::Ascending) // optional - DESC by default
            ->cardHistory();
    }
}
```

Example `$response:`

```
[
    {
        "id": "34234NNM234234",
        "status": "VERIFIED",
        "brand": "VISA",
        "pan": "4756xxxxxxxx6346",
        "expiry": "1225",
        "cardholder": "James Bond",
        "registeredAt": "1415266887057",
        "merchantId": "TESTMERCHANT"
    }
]
```

#### Card deactivation

[](#card-deactivation)

```
use Zorb\BOGConsole\Facades\BOGConsole;

class FakeController
{
    public function __invoke()
    {
        $response = BOGConsole::setCardId('34234NNM234234') // required
            ->deleteCard();
    }
}
```

If there was no exception, it means the session lifetime extended.

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

[](#environment-variables)

KeyMeaningTypeDefaultBOG\_CONSOLE\_PORTAL\_IDMerchant portal id for requestsstringBOG\_CONSOLE\_API\_URLOpenAPI console urlstringBOG\_CONSOLE\_USERNAMEOpenAPI console usernamestringBOG\_CONSOLE\_PASSWORDOpenAPI console passwordstringLicense
-------

[](#license)

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

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity7

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity48

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 66.7% 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

Unknown

Total

1

Last Release

1933d ago

### 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 (2 commits)")[![gabiezur](https://avatars.githubusercontent.com/u/131362365?v=4)](https://github.com/gabiezur "gabiezur (1 commits)")

### Embed Badge

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

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

###  Alternatives

[stripe/stripe-php

Stripe PHP Library

4.0k143.3M480](/packages/stripe-stripe-php)[twilio/sdk

A PHP wrapper for Twilio's API

1.6k92.9M272](/packages/twilio-sdk)[knplabs/github-api

GitHub API v3 client

2.2k15.8M187](/packages/knplabs-github-api)[facebook/php-business-sdk

PHP SDK for Facebook Business

90121.9M34](/packages/facebook-php-business-sdk)[meilisearch/meilisearch-php

PHP wrapper for the Meilisearch API

73813.7M114](/packages/meilisearch-meilisearch-php)[google/gax

Google API Core for PHP

263103.1M454](/packages/google-gax)

PHPackages © 2026

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