PHPackages                             knit-pay/payum-payu-india - 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. knit-pay/payum-payu-india

ActiveLibrary[Payment Processing](/categories/payments)

knit-pay/payum-payu-india
=========================

The Payum extension. It provides PayU India (payu.in) and PayUBiz payment gateway integration.

1.0.1(3y ago)011GPL-3.0-or-laterPHP

Since Nov 14Pushed 3y ago1 watchersCompare

[ Source](https://github.com/knit-pay/payum-payu-india)[ Packagist](https://packagist.org/packages/knit-pay/payum-payu-india)[ Docs](https://www.knitpay.org/)[ RSS](/packages/knit-pay-payum-payu-india/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (2)Versions (3)Used By (0)

Payum PayU India and PayUBiz Extension
======================================

[](#payum-payu-india-and-payubiz-extension)

The Payum extension. It provides [PayU India](http://go.thearrangers.xyz/payu?utm_source=knit-pay&utm_medium=ecommerce-module&utm_campaign=github&utm_content=help-signup) and PayUBiz payment integration.

Before proceeding, kindly create an account at **PayU** if you don't have one already.
[Sign Up on PayU Live](http://go.thearrangers.xyz/payu?utm_source=knit-pay&utm_medium=ecommerce-module&utm_campaign=github&utm_content=help-signup)

For Testing, kindly create an account at **PayU UAT Dashboard** if you don't have one already.
[Sign Up on PayU Test/UAT](https://test.payumoney.com/url/QIJLMsgaurL3)

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

[](#installation)

The preferred way to install the library is using [composer](http://getcomposer.org/). Run composer require to add dependencies to *composer.json*:

```
php composer.phar require knit-pay/payum-payu-india php-http/guzzle6-adapter
```

Register the `payu_india` Payum factory using `PayumBuilder` (config.php):
--------------------------------------------------------------------------

[](#register-the-payu_india-payum-factory-using-payumbuilder-configphp)

```
use Payum\Core\GatewayFactoryInterface;
use KnitPay\PayuIndia\PayuIndiaGatewayFactory;

$payum = (new PayumBuilder())
    ->addDefaultStorages()
    ->addGatewayFactory('payu_india', function(array $config, GatewayFactoryInterface $gatewayFactory) {
        return new PayuIndiaGatewayFactory($config, $gatewayFactory);
    })

    ->addGateway('payu_india', [
        'factory' => 'payu_india',
        'merchant_key' => 'Key', // Change this.
        'merchant_salt' => 'Salt', // Change this.
        'sandbox' => true,
    ])

    ->getPayum()
;
```

prepare.php
-----------

[](#preparephp)

Here you have to modify a `gatewayName` value. Set it to `payu_india`. The rest remain almost the same as described in basic [get it started](https://github.com/Payum/Payum/blob/master/docs/get-it-started.md#preparephp) documentation. Optional fields can be added as shown in the code below.

```
$gatewayName = 'payu_india';

/** @var \Payum\Core\Payum $payum */
$storage = $payum->getStorage($paymentClass);

$payment = $storage->create();
$payment->setNumber(uniqid());
$payment->setCurrencyCode('INR');
$payment->setTotalAmount(123); // 1.23 INR
$payment->setDescription('A description');
$payment->setClientId('anId');
$payment->setClientEmail('foo@example.com');

$payment->setDetails(array(
  // put here any fields in a gateway format.
  // for example if you use PayU India you can define optional fields like this.
  // Kindly refer to this link for more details. https://devguide.payu.in/docs/payu-hosted-checkout/payu-hosted-checkout-integration/https://devguide.payu.in/docs/payu-hosted-checkout/payu-hosted-checkout-integration/
  // Uncomment the optional field below that you want to pass to the payment gateway.
    //'firstname'          => 'First Name',
    //'lastname'           => 'Last Name',
    //'address1'           => 'Address Line 1',
    //'address2'           => 'Address Line 2',
    //'city'               => 'City',
    //'state'              => 'State',
    //'country'            => 'Country',
    //'zipcode'            => 'Zip Code',
    //'phone'              => 'Phone Number',
    //'pg'                 => 'CC',
    //'enforce_paymethod'  => 'creditcard',
    //'display_lang'       => 'Hindi'
));
```

capture.php
-----------

[](#capturephp)

capture.php remains almost the same as described in basic [get it started](https://github.com/Payum/Payum/blob/master/docs/get-it-started.md#capturephp) documentation. Although there is a minor modification. We need need to handle the HttpPostRedirect response also.

```
/** @var \Payum\Core\GatewayInterface $gateway */
if ($reply = $gateway->execute(new Capture($token), true)) {
    if ($reply instanceof HttpRedirect) {
        header("Location: ".$reply->getUrl());
        die();
    } elseif ($reply instanceof HttpPostRedirect) {
        echo $reply->getContent();
        die();
    }

    throw new \LogicException('Unsupported reply', null, $reply);
}
```

Support
-------

[](#support)

Feel free to contact us for any kind of support required.

###  Health Score

22

—

LowBetter than 22% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity47

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.

###  Release Activity

Cadence

Every ~1 days

Total

2

Last Release

1273d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1818f8924f951fcb0c9f82c77008d2b81e96de33f3b08d1b0bb89dee4606b66e?d=identicon)[knit-pay](/maintainers/knit-pay)

---

Top Contributors

[![knit-pay](https://avatars.githubusercontent.com/u/65900807?v=4)](https://github.com/knit-pay "knit-pay (13 commits)")

---

Tags

paymentpayment gatewaypayumpayubizpayu india

### Embed Badge

![Health badge](/badges/knit-pay-payum-payu-india/health.svg)

```
[![Health](https://phpackages.com/badges/knit-pay-payum-payu-india/health.svg)](https://phpackages.com/packages/knit-pay-payum-payu-india)
```

###  Alternatives

[flux-se/payum-stripe

Payum Stripe gateways

29407.5k4](/packages/flux-se-payum-stripe)[crevillo/payum-redsys

Redsys gateway

1648.0k1](/packages/crevillo-payum-redsys)[valiton/payum-payone

The Payum extension. It provides PAYONE payment integration.

1114.6k](/packages/valiton-payum-payone)

PHPackages © 2026

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