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 2w 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 21% 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://avatars.githubusercontent.com/u/1233185?v=4)[Jan Novotný](/maintainers/novotnyj)[@novotnyj](https://github.com/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/coinbase

Coinbase driver for the Omnipay payment processing library

18570.2k1](/packages/omnipay-coinbase)[oxid-esales/amazon-pay-module

AmazonPay module for OXID

1824.3k](/packages/oxid-esales-amazon-pay-module)

PHPackages © 2026

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