PHPackages                             connorhu/khvpos - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. connorhu/khvpos

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

connorhu/khvpos
===============

K&amp;H Payment Gateway client library with Symfony and Payum support.

v2.0.0(2mo ago)045921MITPHPPHP &gt;=8.2CI failing

Since Apr 13Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/connorhu/khvpos)[ Packagist](https://packagist.org/packages/connorhu/khvpos)[ RSS](/packages/connorhu-khvpos/feed)WikiDiscussions 2.x Synced 3w ago

READMEChangelog (7)Dependencies (21)Versions (22)Used By (1)

PHP Library for K&amp;H Payment Gateway
---------------------------------------

[](#php-library-for-kh-payment-gateway)

[![Tests status](https://github.com/connorhu/khvpos/actions/workflows/tests.yml/badge.svg?branch=2.x)](https://github.com/connorhu/khvpos/actions/workflows/tests.yml) [![Static Analysis](https://github.com/connorhu/khvpos/actions/workflows/static-analysis.yml/badge.svg)](https://github.com/connorhu/khvpos/actions/workflows/static-analysis.yml) [![Coverage Status](https://camo.githubusercontent.com/7183ec74d54cde4a841437ed30dd0b0d3f6ce2b13cfcad3c1b24d8d18b18d5bf/68747470733a2f2f636f6465636f762e696f2f67682f636f6e6e6f7268752f6b6876706f732f6272616e63682f322e782f67726170682f62616467652e737667)](https://codecov.io/gh/connorhu/khvpos/branch/2.x)

[API documentation HU](https://github.com/khpos/Payment-gateway_HU) | [API documentation EN](https://github.com/khpos/Payment-gateway_EN)

Support chart
-------------

[](#support-chart)

MethodSupportecho[yes](https://github.com/connorhu/khvpos/blob/2.x/examples/01-echo-request.php)payment/init[yes](https://github.com/connorhu/khvpos/blob/2.x/examples/02-payment-init.php)payment/process[yes](https://github.com/connorhu/khvpos/blob/2.x/examples/03-payment-process.php)payment/status[yes](https://github.com/connorhu/khvpos/blob/2.x/examples/04-payment-status.php)payment/reverse[yes](https://github.com/connorhu/khvpos/blob/2.x/examples/05-payment-reverse.php)payment/close[yes](https://github.com/connorhu/khvpos/blob/2.x/examples/06-payment-close.php)payment/refund[yes](https://github.com/connorhu/khvpos/blob/2.x/examples/07-payment-refund.php)oneclick/echo[yes](https://github.com/connorhu/khvpos/blob/2.x/examples/08-oneclick-echo.php)oneclick/init[yes](https://github.com/connorhu/khvpos/blob/2.x/examples/09-oneclick-init.php)oneclick/process[yes](https://github.com/connorhu/khvpos/blob/2.x/examples/10-oneclick-process.php)applepay/echo[yes](https://github.com/connorhu/khvpos/blob/2.x/examples/11-applepay-echo.php)applepay/init[yes](https://github.com/connorhu/khvpos/blob/2.x/examples/12-applepay-init.php)applepay/process[yes](https://github.com/connorhu/khvpos/blob/2.x/examples/13-applepay-process.php)googlepay/echo[yes](https://github.com/connorhu/khvpos/blob/2.x/examples/14-googlepay-echo.php)googlepay/init[yes](https://github.com/connorhu/khvpos/blob/2.x/examples/15-googlepay-init.php)googlepay/process[yes](https://github.com/connorhu/khvpos/blob/2.x/examples/16-googlepay-process.php)Installation
------------

[](#installation)

```
composer require connorhu/khvpos
```

---

Symfony Bundle
--------------

[](#symfony-bundle)

There is no Flex recipe — bundle registration is manual.

### Register the bundle

[](#register-the-bundle)

```
// config/bundles.php
return [
    KHTools\VPos\Bundle\KHVPosBundle::class => ['all' => true],
];
```

### Configuration

[](#configuration)

```
# config/packages/khvpos.yaml
khvpos:
    test: true   # set to false for production
    merchants:
        default:
            merchant_id: '%env(KHVPOS_MERCHANT_ID)%'
            private_key_path: '%kernel.project_dir%/config/keys/merchant.pem'
            private_key_passphrase: '%env(KHVPOS_PRIVATE_KEY_PASSPHRASE)%'  # optional, default ''
            currency: HUF
```

A single `VPosClient` service is registered as `khvpos.vpos_client` (also autowirable as `VPosClient`). Inject `MerchantProviderInterface` to look up the correct merchant by currency:

```
use KHTools\VPos\Bundle\Providers\MerchantProviderInterface;
use KHTools\VPos\Requests\PaymentInitRequest;
use KHTools\VPos\VPosClient;

public function __construct(
    private VPosClient $client,
    private MerchantProviderInterface $merchantProvider,
) {}

public function pay(): void
{
    $merchant = $this->merchantProvider->getMerchant('HUF');
    $request = new PaymentInitRequest();
    $request->setMerchant($merchant);
    // ...
}
```

### Multiple merchants (multiple currencies)

[](#multiple-merchants-multiple-currencies)

```
khvpos:
    test: false
    merchants:
        huf:
            merchant_id: '%env(KHVPOS_HUF_MERCHANT_ID)%'
            private_key_path: '%kernel.project_dir%/config/keys/huf.pem'
            currency: HUF
        eur:
            merchant_id: '%env(KHVPOS_EUR_MERCHANT_ID)%'
            private_key_path: '%kernel.project_dir%/config/keys/eur.pem'
            currency: EUR
```

`$merchantProvider->getMerchant('EUR')` returns the EUR merchant.

### All configuration options

[](#all-configuration-options)

KeyTypeDefaultDescription`test`bool`true`Use sandbox endpoint`mips_public_key_path`string`null`Path to MIPS public key PEM; `null` uses the bundled key`version`string`rv1`API version`merchants..merchant_id`stringrequiredK&amp;H merchant ID`merchants..private_key_path`stringrequiredPath to RSA private key PEM`merchants..private_key_passphrase`string`''`Optional key passphrase`merchants..currency`string`HUF`Default currency (`HUF`, `EUR`, `USD`)---

Payum Integration
-----------------

[](#payum-integration)

Requires `payum/core ^1.7`. For Symfony, also install `payum/payum-bundle`:

```
composer require payum/payum-bundle
```

With `payum/payum-bundle` installed and a `khvpos:` config block present, the `khvpos` Payum gateway is registered automatically — no extra YAML required:

```
$gateway = $payum->getGateway('khvpos');
$gateway->execute(new Capture($payment));
```

The first configured merchant is used. Supported Payum requests: `Capture`, `Authorize`, `Refund`, `Cancel`, `Sync`, `GetHumanStatus`, `Convert`.

---

###  Health Score

49

—

FairBetter than 94% of packages

Maintenance84

Actively maintained with recent releases

Popularity15

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity74

Established project with proven stability

 Bus Factor1

Top contributor holds 100% 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 ~228 days

Recently: every ~447 days

Total

9

Last Release

83d ago

Major Versions

v1.0.4 → v2.0.02026-04-11

PHP version history (3 changes)v1.0-beta1PHP ^7.4

v1.0.1PHP ^7.4|^8.0

v2.0.0PHP &gt;=8.2

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/1845575?v=4)[Connor](/maintainers/connorhu)[@connorhu](https://github.com/connorhu)

---

Top Contributors

[![connorhu](https://avatars.githubusercontent.com/u/1845575?v=4)](https://github.com/connorhu "connorhu (98 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Type Coverage Yes

### Embed Badge

![Health badge](/badges/connorhu-khvpos/health.svg)

```
[![Health](https://phpackages.com/badges/connorhu-khvpos/health.svg)](https://phpackages.com/packages/connorhu-khvpos)
```

###  Alternatives

[api-platform/core

Build a fully-featured hypermedia or GraphQL API in minutes!

2.6k51.2M339](/packages/api-platform-core)[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.5k5.9M738](/packages/sylius-sylius)[api-platform/serializer

API Platform core Serializer

274.8M87](/packages/api-platform-serializer)[easycorp/easyadmin-bundle

Admin generator for Symfony applications

4.3k17.9M386](/packages/easycorp-easyadmin-bundle)[drupal/core-recommended

Locked core dependencies; require this project INSTEAD OF drupal/core.

6942.5M421](/packages/drupal-core-recommended)[web-auth/webauthn-framework

FIDO2/Webauthn library for PHP and Symfony Bundle.

515100.5k3](/packages/web-auth-webauthn-framework)

PHPackages © 2026

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