PHPackages                             lightools/payu - 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. lightools/payu

AbandonedLibrary[Payment Processing](/categories/payments)

lightools/payu
==============

Simple PayU client for online payments with automatic confirmations enabled.

16.8k↓100%PHP

Since Jun 15Pushed 9y ago1 watchersCompare

[ Source](https://github.com/lightools/payu)[ Packagist](https://packagist.org/packages/lightools/payu)[ RSS](/packages/lightools-payu/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

Introduction
------------

[](#introduction)

This library provides API for the simplest possible online payment via PayU where automatic payment confirmation is enabled.

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

[](#installation)

```
$ composer require lightools/payu
```

Simple usage
------------

[](#simple-usage)

```
// 1. redirect to payment gate
$httpClient = new Bitbang\Http\Clients\CurlClient();
$xmlLoader = new Lightools\Xml\XmlLoader();
$payu = new Lightools\PayU\PayU($posId, $posAuthKey, $key1, $key2, $httpClient, $xmlLoader);
$payment = new Lightools\PayU\NewPayment(
    $orderId, // your order identification
    $priceAmount, // in crowns (not in hellers)
    PayU::CHANNEL_TEST,
    $paymentDescription,
    $clientFirstname,
    $clientSurname,
    $clientEmail
);

$ipAddress = $_SERVER['REMOTE_ADDR'];
$redirectUrl = $payu->getRedirectUrl($payment, $ipAddress);

header("Location: $redirectUrl");
exit();

// 2. accept payment update (on "UrlOnline")
try {
    $post = filter_input_array(INPUT_POST);
    $status = $payu->getPaymentStatus($post);

    $status->getOrderId();
    $status->getStatus(); // e.g. PaymentStatus::STATUS_PAID

    echo 'OK';
    exit();

} catch (InvalidRequestException $ex) {
    // invalid request received (e.g. some data missing)

} catch (InvalidSignatureException $ex) {
    // invalid signature in request or response

} catch (RequestFailedException $ex) {
    // HTTP request to PayU failed
}
```

How to run tests
----------------

[](#how-to-run-tests)

```
$ vendor/bin/tester tests
```

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity23

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/5b545e3f9d982d538f11bc42b3dc2d186f706cef92c8bc8bc8f8788b08186ea5?d=identicon)[janedbal](/maintainers/janedbal)

---

Top Contributors

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

---

Tags

online-paymentspayu

### Embed Badge

![Health badge](/badges/lightools-payu/health.svg)

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

###  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)
