PHPackages                             nevogate/payment-gateway-sdk - 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. nevogate/payment-gateway-sdk

ActiveLibrary[Payment Processing](/categories/payments)

nevogate/payment-gateway-sdk
============================

Nevogate Payment Gateway SDK

5.0.1(2mo ago)6693—3.6%1[2 PRs](https://github.com/Nevogate/payment-gateway-sdk-php/pulls)MITPHPPHP &gt;=7.2CI passing

Since Aug 27Pushed 2mo ago6 watchersCompare

[ Source](https://github.com/Nevogate/payment-gateway-sdk-php)[ Packagist](https://packagist.org/packages/nevogate/payment-gateway-sdk)[ Docs](https://www.nevogate.com/)[ RSS](/packages/nevogate-payment-gateway-sdk/feed)WikiDiscussions master Synced 1mo ago

READMEChangelog (10)Dependencies (2)Versions (52)Used By (0)

> Repository github.com/pmgw-hu/payment-gateway-php7-sdk (pmgw/payment-gateway-php7-sdk) is abandoned, you should avoid using it.
>
> Use  ([nevogate/payment-gateway-sdk](https://packagist.org/packages/nevogate/payment-gateway-sdk)) instead.

Nevogate Payment Gateway SDK - PHP
==================================

[](#nevogate-payment-gateway-sdk---php)

Version
-------

[](#version)

5.0.1

Requirements
------------

[](#requirements)

- PHP 7.2
- PHP cURL extension
- PHP OpenSSL extension
- PHP JSON extension

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

[](#installation)

Nevogate Payment Gateway is available at packagist.org, so you can use composer to download this library.

```
{
    "require": {
        "nevogate/payment-gateway-sdk": "^5.0@stable"
    }
}
```

or run

```
composer require nevogate/payment-gateway-sdk
```

Technical documentation
-----------------------

[](#technical-documentation)

Source code
-----------

[](#source-code)

Example usage
-------------

[](#example-usage)

### Basic configuration

[](#basic-configuration)

```
$config = new \Nevogate\PaymentGateway\Config();
$config->storeName = "example store name";
$config->apiKey = "ExamPleApiKey";
$config->encryptPublicKey = "publicKeyGoesHere";
$config->testMode = true;

$paymentGateway = new \Nevogate\PaymentGateway($config);
```

### Init request

[](#init-request)

```
$init = new \Nevogate\PaymentGateway\Request\Init();
$init->setProviderName(\Nevogate\PaymentGateway::PROVIDER_CIB) // the chosen payment method
    ->setResponseUrl('http://your.companys.webshop.url/payment_gateway_response') // callback url
    ->setAmount(1234)
    ->setCurrency('HUF')
    ->setOrderId('ORD-1234') // your custom order id
    ->setUserId('USER-1234') // your custom user id
    ->setLanguage('HU');

$response = $paymentGateway->send($init);
```

#### Start request

[](#start-request)

```
if (!$response->ResultCode == "SUCCESSFUL" || !$response->TransactionId) {
    // handle error here
}

$paymentGateway->send(
        (new \Nevogate\PaymentGateway\Request\Start())->setTransactionId($response->TransactionId)
    );
```

#### Result request

[](#result-request)

```
$result = $paymentGateway->send(
        (new \Nevogate\PaymentGateway\Request\Result())->setTransactionId($_GET['TransactionId'])
    );
```

#### Details request

[](#details-request)

```
$details = $paymentGateway->send(
        (new \Nevogate\PaymentGateway\Request\Details())->setTransactionId($_GET['TransactionId'])
    );
```

#### Close request

[](#close-request)

```
$response = $paymentGateway->send(
        (new \Nevogate\PaymentGateway\Request\Close())->setTransactionId($transactionId)
    );
```

#### Refund request

[](#refund-request)

```
$response = $paymentGateway->send(
        (new \Nevogate\PaymentGateway\Request\Refund())
            ->setTransactionId($transactionId)
            ->setAmount(100)
    );
```

#### Payout request

[](#payout-request)

```
$payout = new \Nevogate\PaymentGateway\Request\Payout();
$payout->setPayoutType(\Nevogate\PaymentGateway::PAYOUT_TYPE_FUNDS_DISBURSEMENT)
    ->setReferenceTransactionId("783593c87fee4d372f47f53840028682")
    ->setAmount(200)
    ->setOrderId("NEVOGATE-TEST-ORDER-REG") // your custom order id
    ->setAdditionalMessage("NEVOGATE-TEST-PAYOUT-MESSAGE");

$response = $paymentGateway->send($payout);
```

#### Get payment registrations request

[](#get-payment-registrations-request)

```
$response = $paymentGateway->send(
    (new \Nevogate\PaymentGateway\Request\GetPaymentRegistrations())
        ->setProviderName(\Nevogate\PaymentGateway::PROVIDER_BARION2)
        ->setUserId('User1')
    );
```

#### Get payment registration request

[](#get-payment-registration-request)

```
$response = $paymentGateway->send(
    (new \Nevogate\PaymentGateway\Request\GetPaymentRegistration())
        ->setTransactionId($transactionId)
);
```

#### Cancel payment registration request

[](#cancel-payment-registration-request)

```
$response = $paymentGateway->send(
        (new \Nevogate\PaymentGateway\Request\CancelPaymentRegistration())->setTransactionId($transactionId)
    );
```

#### Cancel all payment registrations request

[](#cancel-all-payment-registrations-request)

```
$response = $paymentGateway->send(
        (new \Nevogate\PaymentGateway\Request\CancelAllPaymentRegistrations())
            ->setProviderName(\Nevogate\PaymentGateway::PROVIDER_BORGUN2)
            ->setUserId('userId')
    );
```

### Init Recurring Payment - InitRP

[](#init-recurring-payment---initrp)

```
$initRP = new \Nevogate\PaymentGateway\Request\InitRP();
$initRP->setReferenceTransactionId("783593c87fee4d372f47f53840028682")
    ->setResponseUrl("http://your.companys.webshop.url/payment_gateway_response") // callback url
    ->setAmount(200)
    ->setCurrency("HUF")
    ->setOrderId("NEVOGATE-TEST-ORDER-REG") // your custom order id
    ->setUserId("NEVOGATE-TEST-USER-REG");

$response = $paymentGateway->send($initRP);
```

#### StartRP request

[](#startrp-request)

```
if (!$response->ResultCode == "SUCCESSFUL" || !$response->TransactionId) {
    // handle error here
}

$result = $paymentGateway->send(
        (new \Nevogate\PaymentGateway\Request\StartRP())->setTransactionId($response->TransactionId)
    );
```

### Create Payment Link - PaymentLinkCreate

[](#create-payment-link---paymentlinkcreate)

```
$paymentLink = new \Nevogate\PaymentGateway\Request\PaymentLinkCreate();
$paymentLink->setProviderName(\Nevogate\PaymentGateway::PROVIDER_CIB) // the chosen payment method
    ->setAmount(1234)
    ->setCurrency('HUF')
    ->setOrderId('ORD-1234') // your custom order id
    ->setUserId('USR-1234') // your customer id
    ->setLanguage('HU');

$response = $paymentGateway->send($paymentLink);
```

#### Cancel request

[](#cancel-request)

```
$response = $paymentGateway->send(
        (new \Nevogate\PaymentGateway\Request\PaymentLinkCancel())->setPaymentLinkName($paymentLinkName)
    );
```

#### Details request

[](#details-request-1)

```
$response = $paymentGateway->send(
        (new \Nevogate\PaymentGateway\Request\PaymentLinkDetails())->setPaymentLinkName($paymentLinkName)
    );
```

### Info data

[](#info-data)

#### Basic usage

[](#basic-usage)

```
$infoObject = new \Nevogate\PaymentGateway\Data\Info();

$infoCustomerGeneral = new \Nevogate\PaymentGateway\Data\Info\Customer\InfoCustomerGeneral();
$infoCustomerGeneral->setFirstName("John")
    ->setLastName("Doe")
    ->setEmail("test@testmail.com");

$infoObject->setObject($infoCustomerGeneral); //add $infoCustomerGeneral to $infoObject

$infoShipping = new \Nevogate\PaymentGateway\Data\Info\Order\InfoOrderShippingData();
$infoShipping->setFirstName("John")
    ->setLastName("Doe")
    ->setEmail("test@testmail.com")
    ->setPhoneCc("36")
    ->setPhone("801234567")
    ->setCity("Budapest");

$infoObject->setObject($infoShipping); //add $infoShipping to $infoObject

$infoOrderProductItem = new \Nevogate\PaymentGateway\Data\Info\Order\InfoOrderProductItem();
$infoOrderProductItem->setSku("PMG055005")
    ->setName("Product11")
    ->setQuantity("10")
    ->setQuantityUnit("db")
    ->setUnitPrice("22.00")
    ->setImageUrl("http://webhsop/product11.jpg")
    ->setDescription("Product11 desc.");

$infoObject->setObject($infoOrderProductItem); //add $infoOrderProductItem to $infoObject

$infoOrderProductItem = new \Nevogate\PaymentGateway\Data\Info\Order\InfoOrderProductItem();
$infoOrderProductItem->setSku("PMG055008")
    ->setName("Product12")
    ->setQuantity("10")
    ->setQuantityUnit("db")
    ->setUnitPrice("22.00")
    ->setImageUrl("http://webhsop/product12.jpg")
    ->setDescription("Product12 desc.");

$infoObject->setObject($infoOrderProductItem); //add $infoOrderProductItem to $infoObject
```

#### Init

[](#init)

```
...
    $init->setInfo($infoObject);
...
```

#### Payout

[](#payout)

```
...
    $payout->setInfo($infoObject);
...
```

#### InitRP

[](#initrp)

```
...
    $initRP->setInfo($infoObject);
...
```

#### Payment Link

[](#payment-link)

```
...
    $paymentLink->setInfo($infoObject);
...
```

###  Health Score

52

—

FairBetter than 96% of packages

Maintenance88

Actively maintained with recent releases

Popularity26

Limited adoption so far

Community15

Small or concentrated contributor base

Maturity66

Established project with proven stability

 Bus Factor1

Top contributor holds 51.6% 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 ~52 days

Recently: every ~13 days

Total

47

Last Release

62d ago

Major Versions

3.21.0 → 4.0.02024-07-03

4.4.4-beta.1 → 5.0.0-beta.12026-01-12

### Community

Maintainers

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

---

Top Contributors

[![bt-nevogate](https://avatars.githubusercontent.com/u/46439251?v=4)](https://github.com/bt-nevogate "bt-nevogate (32 commits)")[![rcs-nevogate](https://avatars.githubusercontent.com/u/131351553?v=4)](https://github.com/rcs-nevogate "rcs-nevogate (19 commits)")[![viderspan](https://avatars.githubusercontent.com/u/5574455?v=4)](https://github.com/viderspan "viderspan (8 commits)")[![gaborbencebekesi](https://avatars.githubusercontent.com/u/20973318?v=4)](https://github.com/gaborbencebekesi "gaborbencebekesi (3 commits)")

---

Tags

phpsdkpaymentecommercewebshop

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/nevogate-payment-gateway-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/nevogate-payment-gateway-sdk/health.svg)](https://phpackages.com/packages/nevogate-payment-gateway-sdk)
```

###  Alternatives

[yandex-money/yandex-money-sdk-php

Yandex.Money API SDK for PHP

105167.4k2](/packages/yandex-money-yandex-money-sdk-php)[sumup/sumup-ecom-php-sdk

SumUp PHP SDK

51277.1k1](/packages/sumup-sumup-ecom-php-sdk)[sylius/payment-bundle

Flexible payments system for Symfony e-commerce applications.

22268.0k5](/packages/sylius-payment-bundle)[sylius/payment

Flexible payments system for PHP e-commerce applications.

17324.0k7](/packages/sylius-payment)[cryptonator/merchant-php-sdk

Cryptonator.com Merchant API SDK for PHP

2713.7k](/packages/cryptonator-merchant-php-sdk)

PHPackages © 2026

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