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

AbandonedArchivedProject[Payment Processing](/categories/payments)

zgabievi/laravel-ipay
=====================

iPay integration for Laravel

0.2.4(4y ago)71445[1 PRs](https://github.com/zgabievi/laravel-ipay/pulls)MITPHPPHP ^7.2

Since Nov 17Pushed 4y ago1 watchersCompare

[ Source](https://github.com/zgabievi/laravel-ipay)[ Packagist](https://packagist.org/packages/zgabievi/laravel-ipay)[ RSS](/packages/zgabievi-laravel-ipay/feed)WikiDiscussions main Synced 3d ago

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

iPay integration for Laravel
============================

[](#ipay-integration-for-laravel)

[![Packagist](https://camo.githubusercontent.com/536b8f6ac1f1e2dc8eb6d283929169df30d1040ba66e8600bf04c8b1dac23368/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f7a676162696576692f6c61726176656c2d697061792e737667)](https://packagist.org/packages/zgabievi/laravel-ipay)[![Packagist](https://camo.githubusercontent.com/a5b620f6a0e5e6422cbade9aa1a3ba4ab06d8208c14db91ed654614caa6b4280/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f7a676162696576692f6c61726176656c2d697061792e737667)](https://packagist.org/packages/zgabievi/laravel-ipay)[![license](https://camo.githubusercontent.com/e0361064ee9729260464410ffb8b3c938e606b6d802ba13cffedcbaa9c256152/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6c6963656e73652f7a676162696576692f6c61726176656c2d697061792e737667)](https://packagist.org/packages/zgabievi/laravel-ipay)

[![Laravel + iPay](https://raw.githubusercontent.com/zgabievi/laravel-ipay/main/assets/laravel-ipay.jpg)](https://raw.githubusercontent.com/zgabievi/laravel-ipay/main/assets/laravel-ipay.jpg)

[📝 iPay documentation can be found here](https://developer.ipay.ge/review)

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-ipay
```

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

```
'providers' => [
    ...
    Zorb\IPay\IPayServiceProvider::class,
    ...
];
```

You can publish config file using this command:

```
php artisan vendor:publish --provider="Zorb\IPay\IPayServiceProvider"
```

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:**

- [Payment Process](#payment-process) - Initialization of payment process
    - [Generate Token](#generate-token) - *(Optional)* Token will be auto generated if not provided
    - [Checkout](#checkout) - Request checkout order to iPay
    - [Redirect](#redirect) - Redirect user to url that was provided by checkout
- [Recurring](#recurring) - Repeat payment process using saved order id
- [Refund](#refund) - Reversal of transaction
- [Order Details](#order-details) - Check details of order
- [Order Status](#order-status) - Check status of order
- [Payment Details](#payment-details) - Check details of payment
- [Complete Pre-Authentication](#complete-pre-authentication) - Complete pre-authorized order
- [Helpers](#helpers) - Helper methods to generate checkout
    - [Purchase Unit](#purchase-unit) - Helper to generate object for purchase unit
    - [Purchase Item](#purchase-item) - Helper to generate object for purchase item

### Payment Process

[](#payment-process)

#### Generate Token

[](#generate-token)

This step is optional, and if you don't provide token to next request, it will automatically fetch token.

```
use Zorb\IPay\Facades\IPay;

class PaymentController
{
    public function __invoke()
    {
        $response = IPay::token();
    }
}
```

Example `$response:`

```
{
  "access_token": "eyJraWQiOiIxMDA2IiwiY3R5IjoiYXBwbGljYXRpb25cL2pzb24iLCJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJzdWIiOiJQdWJsaWMgcGF5bWVudCBBUEkgVjEiLCJhdWQiOiJpUGF5IERlbW8iLCJpc3M",
  "token_type": "Bearer",
  "app_id": "1A2019",
  "expires_in": 1605623557393
}
```

#### Checkout

[](#checkout)

Generate order in iPay system and get back order details and redirect urls.

```
use Zorb\IPay\Facades\IPay;
use Zorb\IPay\Enums\Intent;

class PaymentController
{
    public function __invoke()
    {
        $order_id = 1;

        $units = [
          IPay::purchaseUnit(10), // read more about purchaseUnit bellow
        ];

        $items = [
          IPay::purchaseItem(1, 10, 1, 'Item #1'), // read more about purchaseItem bellow
          IPay::purchaseItem(2, 10, 1, 'Item #2'), // read more about purchaseItem bellow
        ];

        // string $intent - 'CAPTURE', 'AUTHORIZE', 'LOAN'
        // int $order_id - Your order id
        // array $units - Purchase units
        // array $items = [] - (optional) Purchase items
        // string $token = null - (optional) JWT Token
        // string $capture_method = 'AUTOMATIC' - (optional) 'AUTOMATIC', 'MANUAL'
        // string $transaction_id = '' - (optional) Transaction id for recurring
        $response = IPay::checkout(Intent::Capture, $order_id, $units, $items);
    }
}
```

You can set parameters separately:

```
use Zorb\IPay\Facades\IPay;
use Zorb\IPay\Enums\Intent;
use Zorb\IPay\Enums\CaptureMethod;

class PaymentController
{
    public function __invoke()
    {
        $order_id = 1;

        $response = IPay::setIntent(Intent::Capture)
            ->setShopOrder($order_id)
            ->setPurchaseUnits([ IPay::purchaseUnit(10) ])
            ->setItems([
                IPay::purchaseItem(1, 10, 1, 'Item #1'),
                IPay::purchaseItem(2, 10, 1, 'Item #2'),
            ])
            ->setToken('IPAY_JWT_TOKEN')
            ->setCaptureMethod(CaptureMethod::Manual)
            ->setTransaction('IPAY_TRANSACTION_ID')
            ->checkout();
    }
}
```

Example `$response`:

```
{
  "status": "CREATED",
  "payment_hash": "d7936f718c2b0ec2517a28c9de76966bcbecfe29",
  "links": [
    {
      "href": "https://ipay.ge/opay/api/v1/checkout/orders/899318b1ce0d5885cb7405fe86e3930178ff90be",
      "rel": "self",
      "method": "GET"
    },
    {
      "href": "https://ipay.ge/?order_id=899318b1ce0d5885cb7405fe86e3930178ff90be&locale=ka",
      "rel": "approve",
      "method": "REDIRECT"
    }
  ],
  "order_id": "899318b1ce0d5885cb7405fe86e3930178ff90be"
}
```

#### Redirect

[](#redirect)

Redirect to payment page which is provided by checkout method.

```
use Zorb\IPay\Facades\IPay;
use Zorb\IPay\Enums\Intent;
use Zorb\IPay\Enums\CheckoutStatus;

class PaymentController
{
    public function __invoke()
    {
        $order_id = 1;

        $units = [
          IPay::purchaseUnit(10), // read more about purchaseUnit bellow
        ];

        $items = [
          IPay::purchaseItem(1, 10, 1, 'Item #1'), // read more about purchaseItem bellow
          IPay::purchaseItem(2, 10, 1, 'Item #2'), // read more about purchaseItem bellow
        ];

        $response = IPay::checkout(Intent::Capture, $order_id, $units, $items);

        if (isset($response->status) && $response->status === CheckoutStatus::Created) {
            return IPay::redirect($response);
            // IPay::redirectUrl($response); - will be used in some cases, like InertiaJS
        }
    }
}
```

You can set parameters separately:

```
use Zorb\IPay\Facades\IPay;
use Zorb\IPay\Enums\Intent;
use Zorb\IPay\Enums\CaptureMethod;
use Zorb\IPay\Enums\CheckoutStatus;

class PaymentController
{
    public function __invoke()
    {
        $order_id = 1;

        $response = IPay::setIntent(Intent::Capture)
            ->setShopOrder($order_id)
            ->setPurchaseUnits([ IPay::purchaseUnit(10) ])
            ->setItems([
                IPay::purchaseItem(1, 10, 1, 'Item #1'),
                IPay::purchaseItem(2, 10, 1, 'Item #2'),
            ])
            ->setToken('IPAY_JWT_TOKEN')
            ->setCaptureMethod(CaptureMethod::Manual)
            ->setTransaction('IPAY_TRANSACTION_ID')
            ->checkout();

        if (isset($response->status) && $response->status === CheckoutStatus::Created) {
            return IPay::setResponse($response)->redirect();
            // IPay::setResponse($response)->redirectUrl();
        }
    }
}
```

Redirect method will find redirect link for payment and redirect user to that page.

### Recurring

[](#recurring)

Recurring process is the same as checkout process. You just have to provide transaction id you want to be used for recurring.

```
use Zorb\IPay\Facades\IPay;
use Zorb\IPay\Enums\Intent;
use Zorb\IPay\Enums\CheckoutStatus;

class PaymentController
{
    public function __invoke(string $trx_id)
    {
        $order_id = 1;
        $transaction_id = '899318B1CE0D5885CB7'; // Transaction id was provided in you callback url

        $units = [
          IPay::purchaseUnit(10), // read more about purchaseUnit bellow
        ];

        $items = [
          IPay::purchaseItem(1, 10, 1, 'Item #1'), // read more about purchaseItem bellow
          IPay::purchaseItem(2, 10, 1, 'Item #2'), // read more about purchaseItem bellow
        ];

        $response = IPay::repeat($transaction_id, Intent::Capture, $order_id, $units, $items);

        if (isset($response->status) && $response->status === CheckoutStatus::Created) {
            return IPay::redirect($response);
        }
    }
}
```

You can set parameters separately:

```
use Zorb\IPay\Facades\IPay;
use Zorb\IPay\Enums\Intent;
use Zorb\IPay\Enums\CheckoutStatus;

class PaymentController
{
    public function __invoke()
    {
        $order_id = 1;
        $transaction_id = '899318B1CE0D5885CB7';

        $response = IPay::setIntent(Intent::Capture)
            ->setShopOrder($order_id)
            ->setPurchaseUnits([ IPay::purchaseUnit(10) ])
            ->setItems([
                IPay::purchaseItem(1, 10, 1, 'Item #1'),
                IPay::purchaseItem(2, 10, 1, 'Item #2'),
            ])
            ->setTransaction($transaction_id)
            ->repeat();

        if (isset($response->status) && $response->status === CheckoutStatus::Created) {
            return IPay::setResponse($response)->redirect();
        }
    }
}
```

### Refund

[](#refund)

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

```
use Zorb\IPay\Facades\IPay;

class PaymentController
{
    public function __invoke()
    {
        $order_id = '899318b1ce0d5885cb7405fe86e3930178ff90be';

        // string $order_id - Order id provided by checkout process
        // int $amount - Amount you want to refund (in cents)
        // string $token = null - (optional) JWT Token
        $response = IPay::refund($order_id, 10);
    }
}
```

You can set parameters separately:

```
use Zorb\IPay\Facades\IPay;

class PaymentController
{
    public function __invoke()
    {
        $order_id = '899318b1ce0d5885cb7405fe86e3930178ff90be';

        $response = IPay::setOrder($order_id)
            ->setAmount(10)
            ->refund();
    }
}
```

If response is OK, it means refund process was successful.

### Order Details

[](#order-details)

In order to get order details you need to have order\_id of payment.

```
use Zorb\IPay\Facades\IPay;

class PaymentController
{
    public function __invoke()
    {
        $order_id = '899318b1ce0d5885cb7405fe86e3930178ff90be';

        // string $order_id - Order id provided by checkout process
        // string $token = null - (optional) JWT Token
        $response = IPay::orderDetails($order_id);
    }
}
```

You can set parameters separately:

```
use Zorb\IPay\Facades\IPay;

class PaymentController
{
    public function __invoke()
    {
        $order_id = '899318b1ce0d5885cb7405fe86e3930178ff90be';

        $response = IPay::setOrder($order_id)
            ->orderDetails();
    }
}
```

Example `$response`:

```
{
  "id": "6ed105e54e703fb6d2e5b7f68a0face71fea2cc6",
  "status": "PERFORMED",
  "intent": "CAPTURE",
  "payer": {
     "name": null,
     "email_address": null,
     "payer_id": null
  },
  "purchaseUnit": {
     "amount": {
         "value": "0.10",
         "currency_code": "GEL"
     },
     "payee": {
         "addres": "Shartava str., 77",
         "contact": "0322444444",
         "email_address": "support@ipay.ge"
     },
     "payments": [
         {
             "captures": [
                 {
                     "id": "1",
                     "status": "PERFORMED",
                     "amount": {
                         "value": "0.10",
                         "currency_code": "GEL"
                     },
                     "final_capture": "true",
                     "create_time": "Tue Nov 17 19:04:29 GET 2020",
                     "update_time": "Tue Nov 17 19:04:29 GET 2020"
                 },
                 {
                     "id": "2",
                     "status": "PERFORMED",
                     "amount": {
                         "value": "0.10",
                         "currency_code": "GEL"
                     },
                     "final_capture": "true",
                     "create_time": "Tue Nov 17 19:04:29 GET 2020",
                     "update_time": "Tue Nov 17 19:04:29 GET 2020"
                 }
             ]
         }
     ],
     "shop_order_id": "1"
  },
  "createTime": null,
  "updateTime": null,
  "errorHistory": []
}
```

### Order Status

[](#order-status)

In order to get order status you need to have order\_id of payment.

```
use Zorb\IPay\Facades\IPay;

class PaymentController
{
    public function __invoke()
    {
        $order_id = '899318b1ce0d5885cb7405fe86e3930178ff90be';

        // string $order_id - Order id provided by checkout process
        // string $token = null - (optional) JWT Token
        $response = IPay::orderStatus($order_id);
    }
}
```

You can set parameters separately:

```
use Zorb\IPay\Facades\IPay;

class PaymentController
{
    public function __invoke()
    {
        $order_id = '899318b1ce0d5885cb7405fe86e3930178ff90be';

        $response = IPay::setOrder($order_id)
            ->orderStatus();
    }
}
```

Example `$response`:

```
{
  "status": "REJECTED"
}
```

### Payment Details

[](#payment-details)

In order to get payment details you need to have order\_id of payment.

```
use Zorb\IPay\Facades\IPay;

class PaymentController
{
    public function __invoke()
    {
        $order_id = '899318b1ce0d5885cb7405fe86e3930178ff90be';

        // string $order_id - Order id provided by checkout process
        // string $token = null - (optional) JWT Token
        $response = IPay::paymentDetails($order_id);
    }
}
```

You can set parameters separately:

```
use Zorb\IPay\Facades\IPay;

class PaymentController
{
    public function __invoke()
    {
        $order_id = '899318b1ce0d5885cb7405fe86e3930178ff90be';

        $response = IPay::setOrder($order_id)
            ->paymentDetails();
    }
}
```

Example `$response`:

```
{
  "status": "error",
  "pan": null,
  "order_id": "899318b1ce0d5885cb7405fe86e3930178ff90be",
  "pre_auth_status": null,
  "payment_hash": "d7936f718c2b0ec2517a28c9de76966bcbecfe29",
  "ipay_payment_id": "18625",
  "status_description": "REJECTED",
  "shop_order_id": "1",
  "payment_method": "UNKNOWN",
  "card_type": "UNKNOWN",
  "transaction_id": null
}
```

### Complete Pre-Authentication

[](#complete-pre-authentication)

In order to get complete pre-authorized order you need to have order\_id of payment.

```
use Zorb\IPay\Facades\IPay;

class PaymentController
{
    public function __invoke()
    {
        $order_id = '899318b1ce0d5885cb7405fe86e3930178ff90be';

        // string $order_id - Order id provided by checkout process
        // string $token = null - (optional) JWT Token
        $response = IPay::completePreAuth($order_id);
    }
}
```

You can set parameters separately:

```
use Zorb\IPay\Facades\IPay;

class PaymentController
{
    public function __invoke()
    {
        $order_id = '899318b1ce0d5885cb7405fe86e3930178ff90be';

        $response = IPay::setOrder($order_id)
            ->completePreAuth();
    }
}
```

All helper methods to set parameters separately
-----------------------------------------------

[](#all-helper-methods-to-set-parameters-separately)

MethodDescriptionPossible valuesDefaultUsed insetResponseResponse from other iPay request--redirect, redirectUrlsetRelRel to point correct link from responseapprove, selfapproveredirect, redirectUrlsetAmountMoney amount in cents (tetris)--purchaseUnit, purchaseItem, refundsetCurrencyCurrency of the amountGEL, USD, EURGELpurchaseUnitsetIndustryTypeIndustry type of purchase unitECOMMERCEECOMMERCEpurchaseUnitsetProductYour product id--purchaseItemsetQuantityQuantity of purchase item--purchaseItemsetDescriptionDescription of purchase item--purchaseItemsetTransactionTransaction id for recurring--checkout, repeatsetIntentIntent for paymentCAPTURE, AUTHORIZE, LOANCAPTUREcheckout, repeatsetShopOrderYour order id--checkout, repeatsetPurchaseUnitsOne purchase unit as an array--checkout, repeatsetItemsList of items of purchase--checkout, repeatsetTokenJWT Token from iPay--checkout, repeat, refund, orderDetails, orderStatus, paymentDetails, completePreAuthsetCaptureMethodMethod for checkoutAUTOMATIC, MANUALAUTOMATICcheckout, repeatsetOrderOrder id from iPay responses--refund, orderDetails, orderStatus, paymentDetails, completePreAuthEnvironment Variables
---------------------

[](#environment-variables)

KeyMeaningTypeDefaultIPAY\_DEBUGThis value decides to log or not to log requestsboolfalseIPAY\_URLPayment url from Bank of GeorgiastringIPAY\_REDIRECT\_URLCallback url where will be redirected after a success/failure paymentstringIPAY\_CLIENT\_IDClient ID provided by Bank of GeorgiastringIPAY\_LANGUAGEDefault language for Bank of Georgia paymentstringkaIPAY\_SECRET\_KEYSecret key provided by Bank of GeorgiastringLicense
-------

[](#license)

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

###  Health Score

26

—

LowBetter than 43% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity19

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity45

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 63.2% 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 ~32 days

Recently: every ~63 days

Total

9

Last Release

1748d ago

### Community

Maintainers

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

---

Top Contributors

[![gabiezur](https://avatars.githubusercontent.com/u/131362365?v=4)](https://github.com/gabiezur "gabiezur (12 commits)")[![zgabievi](https://avatars.githubusercontent.com/u/1515299?v=4)](https://github.com/zgabievi "zgabievi (5 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (1 commits)")[![shota-mentesh](https://avatars.githubusercontent.com/u/39200660?v=4)](https://github.com/shota-mentesh "shota-mentesh (1 commits)")

---

Tags

bank-of-georgiaipaylaravelpayments

### Embed Badge

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

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

###  Alternatives

[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)[cviebrock/eloquent-taggable

Easy ability to tag your Eloquent models in Laravel.

567694.8k3](/packages/cviebrock-eloquent-taggable)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

245.2k](/packages/aedart-athenaeum)[sebdesign/laravel-viva-payments

A Laravel package for integrating the Viva Payments gateway

4845.9k](/packages/sebdesign-laravel-viva-payments)[api-platform/laravel

API Platform support for Laravel

59126.4k6](/packages/api-platform-laravel)

PHPackages © 2026

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