PHPackages                             geniv/nette-comgate - 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. [Framework](/categories/framework)
4. /
5. geniv/nette-comgate

ActiveLibrary[Framework](/categories/framework)

geniv/nette-comgate
===================

Comgate wrapper extension for Nette Framework

v1.0.3(5y ago)13321MITPHPPHP &gt;=7.0.0

Since Oct 11Pushed 5y ago1 watchersCompare

[ Source](https://github.com/geniv/nette-comgate)[ Packagist](https://packagist.org/packages/geniv/nette-comgate)[ RSS](/packages/geniv-nette-comgate/feed)WikiDiscussions develop Synced yesterday

READMEChangelog (1)Dependencies (2)Versions (6)Used By (0)

Comgate
=======

[](#comgate)

Comgate payment gateway

inspired:  ,

comgate info pdf:

list test payment:

api:

need set in:

[https://portal.comgate.cz/cs/propojeni-obchodu-detail/id/\*\*XXmerchantIdXX](https://portal.comgate.cz/cs/propojeni-obchodu-detail/id/**XXmerchantIdXX)\*\*

- Url zaplacený
- Url zrušený
- Url nevyřízený
- Url pro předání výsledku platby
- Povolené IP adresy

---

thanks for code review: @AdamSmid

---

example url for production:
---------------------------

[](#example-url-for-production)

redirect url (GET redirect from Comgate): `https://example.cz/summary/result/${id}?refId=${refId}`

status url (POST check from Comgate): `https://example.cz/summary/status`

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

[](#installation)

```
$ composer require geniv/nette-comgate
```

or

```
"geniv/nette-comgate": ">=1.0.0"
```

require:

```
"php": ">=7.0.0",
"nette/nette": ">=2.4.0",
"renat-magadiev/comgate-client": "^1.0"
```

Include in application
----------------------

[](#include-in-application)

neon configure:

```
# comgate
comgate:
    merchantId: "xxxyyy"
    secret: "******"
    sandbox: true
```

neon configure extension:

```
extensions:
    comgate: Comgate\Bridges\Nette\Extension
```

presenter create payment:

```
/** @var Comgate @inject */
public $comgate;
```

create payment:

```
try {
    // process Comgate
    $payment = $this->comgate->createPayment($values['order_price'] * 100, $values['order_id'], $values['email'], $game['name']);
    $payment->setPrepareOnly(true);

    $response = $this->comgate->sendResponse($payment);
    if ($response->isOk()) {
        // edit checkout_id
        $this->model->editItem($id, ['checkout_id' => $response->getTransId()]);
        $this->redirectUrl($response->getRedirectUrl());
    }
} catch (\Comgate\Exception\InvalidArgumentException $e) {
    Debugger::log($e);
    $this->redirect('error');
} catch (\Comgate\Exception\LabelTooLongException $e) {
    Debugger::log($e);
    $this->redirect('error');
}
```

status payment:

```
public function actionStatus()
{
    $this->getHttpResponse()->setContentType('application/javascript');
    $request = $this->getHttpRequest();
    if ($request->isMethod('POST')) {
        $transId = $request->getPost('transId');
        $status = $request->getPost('status');
        if ($transId && $status) {
            $item = $this->model->getByCheckoutId($transId);
            if ($item) {
                if ($this->model->editItem((int) $item['id'], ['status' => $status, 'checkout_date%sql' => 'NOW()', 'active' => ($status == PaymentStatus::PAID)])) {
                    $this->sendResponse(new ComgateResponse('code=0&message=OK'));
                }
                $this->sendResponse(new ComgateResponse('code=1&message=SAVE_ERROR'));
            }
            $this->sendResponse(new ComgateResponse('code=1&message=TRANS_ID_NOT_FOUND'));
        }
        $this->sendResponse(new ComgateResponse('code=1&message=MISSING_PARAMETERS'));
    }
    $this->sendResponse(new ComgateResponse('code=1&message=FAIL'));
}
```

result payment:

```
public function actionResult(string $id, string $refId)
{
    $item = $this->model->getByCheckoutId($id);
    if ($item) {
        if ($item['status'] == PaymentStatus::PAID) {
            //success
        } else {
            //danger
        }
    }
    $this->redirect('Homepage:');
}
```

###  Health Score

29

—

LowBetter than 57% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity61

Established project with proven stability

 Bus Factor1

Top contributor holds 88.9% 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 ~260 days

Total

4

Last Release

2039d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/bc7e200eb4e96d99020297684063209160ea1347d8a2a8b4cd769d532204867e?d=identicon)[geniv](/maintainers/geniv)

---

Top Contributors

[![geniv](https://avatars.githubusercontent.com/u/563659?v=4)](https://github.com/geniv "geniv (8 commits)")[![MikKuba](https://avatars.githubusercontent.com/u/22917857?v=4)](https://github.com/MikKuba "MikKuba (1 commits)")

---

Tags

nettecomgategeniv

### Embed Badge

![Health badge](/badges/geniv-nette-comgate/health.svg)

```
[![Health](https://phpackages.com/badges/geniv-nette-comgate/health.svg)](https://phpackages.com/packages/geniv-nette-comgate)
```

###  Alternatives

[vojtech-dobes/nette-ajax-history

Adds History API support for Nette Framework.

30180.8k2](/packages/vojtech-dobes-nette-ajax-history)[flame/modules

Nette modules on the Steroids

1361.8k3](/packages/flame-modules)

PHPackages © 2026

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