PHPackages                             novotnyj/thepay-client - 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. novotnyj/thepay-client

ActiveLibrary[Payment Processing](/categories/payments)

novotnyj/thepay-client
======================

Client for thepay payment gate.

0525PHP

Since Feb 6Pushed 9y ago1 watchersCompare

[ Source](https://github.com/novotnyj/thepay-client)[ Packagist](https://packagist.org/packages/novotnyj/thepay-client)[ RSS](/packages/novotnyj-thepay-client/feed)WikiDiscussions master Synced 3d ago

READMEChangelogDependenciesVersions (1)Used By (0)

Thepay Client
=============

[](#thepay-client)

[![CircleCI](https://camo.githubusercontent.com/e1f41ac889b2fd5a09a56c8ee59424356c2133a63361937a3fd88ff39c0b70f3/68747470733a2f2f636972636c6563692e636f6d2f67682f736d617274656d61696c696e672f6d61696c6f7661746b6f2e7376673f7374796c653d73766726636972636c652d746f6b656e3d38386361633431376438386532336138303937333465323234643636633165393365373735656362)](https://circleci.com/gh/smartemailing/mailovatko)

Unofficial client for ThePay payment gate.

Instalation
-----------

[](#instalation)

Add following to your config:

```
extensions:
	thepayClient: NovotnyJ\ThepayClient\DI\ThepayClientExtension

thepayClient:
	merchantId: 1
	accountId: 1
	secret: 'xxx'
	apiKey: 'xxx'
	demo: false
```

Create payment
--------------

[](#create-payment)

Create new payment:

```
$payment = new PaymentRequest($method->getId(), 10.00, 'http://my-super-eshop.com/thepay');
$payment->setMerchantData('test data');
$payment->setDescription('test description');
$payment->setBackToEshopUrl('http://my-super-shop.com/');

$url = $this->thepayClient->getPaymentUrl($payment);
```

Now redirect your customer to the payment gate on `$url`.

Process payment response
------------------------

[](#process-payment-response)

```
$get = $this->getParameters();
$response = new PaymentResponse($get);

if ($response->isPaid()) {
	...
}

if ($response->isUnderPaid()) {
	$paymentInfo = $this->thepayClient->getPaymentInfo($response->getPaymentId());
	$paid = $paymentInfo->getReceivedValue();
}

if ($response->isCancelled()) {
	...
}

if ($response->isError()) {
	...
}
```

Available payment methods
-------------------------

[](#available-payment-methods)

To get available payment methods:

```
$methods = $this->thepayClient->getPaymentMethods();
```

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity12

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 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.

### Community

Maintainers

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

---

Top Contributors

[![novotnyj](https://avatars.githubusercontent.com/u/1233185?v=4)](https://github.com/novotnyj "novotnyj (23 commits)")

### Embed Badge

![Health badge](/badges/novotnyj-thepay-client/health.svg)

```
[![Health](https://phpackages.com/badges/novotnyj-thepay-client/health.svg)](https://phpackages.com/packages/novotnyj-thepay-client)
```

###  Alternatives

[omnipay/paypal

PayPal gateway for Omnipay payment processing library

3156.8M53](/packages/omnipay-paypal)[eduardokum/laravel-boleto

Biblioteca com boletos para o laravel

626351.9k2](/packages/eduardokum-laravel-boleto)[tbbc/money-bundle

This is a Symfony bundle that integrates moneyphp/money library (Fowler pattern): https://github.com/moneyphp/money.

1961.9M](/packages/tbbc-money-bundle)[2checkout/2checkout-php

2Checkout PHP Library

83740.3k2](/packages/2checkout-2checkout-php)[smhg/sepa-qr-data

Generate QR code data for SEPA payments

61717.2k5](/packages/smhg-sepa-qr-data)[omnipay/dummy

Dummy driver for the Omnipay payment processing library

271.2M33](/packages/omnipay-dummy)

PHPackages © 2026

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