PHPackages                             princealikhan/paytm-payment - 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. princealikhan/paytm-payment

ActiveLibrary[Payment Processing](/categories/payments)

princealikhan/paytm-payment
===========================

Payment Integration with Paytm.

v1.0.9(4y ago)38296[3 issues](https://github.com/princealikhan/paytm-payment/issues)MITPHPPHP &gt;=5.5.9

Since Oct 6Pushed 3y ago1 watchersCompare

[ Source](https://github.com/princealikhan/paytm-payment)[ Packagist](https://packagist.org/packages/princealikhan/paytm-payment)[ RSS](/packages/princealikhan-paytm-payment/feed)WikiDiscussions master Synced 2mo ago

READMEChangelog (10)Dependencies (2)Versions (13)Used By (0)

Paytm Payment Library For Laravel 5
===================================

[](#paytm-payment-library-for-laravel-5)

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

[](#introduction)

It simplifies the payment flow with the defined methods. You can pay through paytm just writing few lines of codes. Before you start installing this service, please complete your Paytem setup at [on Paytm](http://paywithpaytm.com).

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

[](#installation)

First, you'll need to require the package with Composer:

```
composer require princealikhan/paytm-payment
```

Aftwards, run `composer update` from your command line.

Then, update `config/app.php` by adding an entry for the service provider.

```
'providers' => [
	// ...
	'Princealikhan\PaytmPayment\PaytmServiceProvider',
];
```

Then, register class alias by adding an entry in aliases section

```
'aliases' => [
	// ...
	'Paytm' => 'Princealikhan\PaytmPayment\Facades\Paytm',
];
```

Finally, from the command line again, run `php artisan vendor:publish` to publish the default configuration file. This will publish a configuration file named `paytm.php` which includes your Paytm authorization keys and aditional settings.

Configuration
-------------

[](#configuration)

You need to fill in `paytm.php` file that is found in your applications `config` directory.

Usage
-----

[](#usage)

### Request for Payment

[](#request-for-payment)

You can easily send a message to all registered users with the command

```
$request = array('CUST_ID' => 1 ,'TXN_AMOUNT'=> 1 );
Paytm::pay($request);
```

`CUST_ID` and `TXN_AMOUNT` fields value are pass to Paytm and redirect to callback URL.

### After redirect to callback URL

[](#after-redirect-to-callback-url)

Once we redirected to callback URL we need to verify whether transaction `Success` or `Fail`.

#### Example

[](#example)

Suppose, your callback URL is `https://your-app.io/payment/callback`Paytm `POST` respone on your URL. we need to get response.

In `routes.php` add a post method.

```
Route::post("payment/callback", "PaymentController@callback");
```

In `PaymentController` create a method

```
public function callback(Request $Request)
{
$paymentResponse =  $Request->all();
$paymentData     = Paytm::verifyPayment($paymentResponse);
}
```

`$postData` gives transcation details. after, use your business logic to save.

### Check Transaction Status

[](#check-transaction-status)

```
Paytm::transactionStatus($orderID);
```

`$orderID` is the Unique ID generated for the transaction by merchant

### Initiate Refund Process

[](#initiate-refund-process)

```
Paytm::initiateTransactionRefund($orderID,$amount,$txnType);
```

`$orderID`: Transaction Order Id by merchant.

`$amount`: Amount to refund.

`$txnType`; Any one of below values: `REFUND` `CANCEL`

Please refer to [Documentation](http://paywithpaytm.com/developer/paytm_api_doc). for all customizable parameters.

###  Health Score

27

—

LowBetter than 49% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity20

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity65

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 ~198 days

Recently: every ~444 days

Total

10

Last Release

1716d ago

Major Versions

v0.0.1 → v1.02016-10-06

### Community

Maintainers

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

---

Top Contributors

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

---

Tags

laravelpaymentgatewayindiapaytm

### Embed Badge

![Health badge](/badges/princealikhan-paytm-payment/health.svg)

```
[![Health](https://phpackages.com/badges/princealikhan-paytm-payment/health.svg)](https://phpackages.com/packages/princealikhan-paytm-payment)
```

###  Alternatives

[sebdesign/laravel-viva-payments

A Laravel package for integrating the Viva Payments gateway

4845.9k](/packages/sebdesign-laravel-viva-payments)[omalizadeh/laravel-multi-payment

A driver-based laravel package for online payments via multiple gateways

491.1k](/packages/omalizadeh-laravel-multi-payment)[parsisolution/gateway

A Laravel package for connecting to all Iraninan payment gateways

231.7k](/packages/parsisolution-gateway)[dena-a/iran-payment

a Laravel package to handle Internet Payment Gateways for Iran Banking System

312.4k1](/packages/dena-a-iran-payment)

PHPackages © 2026

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