PHPackages                             mdrazamani/asanpardakht-ipg-rest - 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. [API Development](/categories/api)
4. /
5. mdrazamani/asanpardakht-ipg-rest

ActiveLibrary[API Development](/categories/api)

mdrazamani/asanpardakht-ipg-rest
================================

AsanPardakht IPG REST API integration package

1.0.26(1y ago)059PHPPHP ^7.3|^8.0

Since Aug 21Pushed 1y ago1 watchersCompare

[ Source](https://github.com/mdrazamani/AsanPardakhtIpgRest)[ Packagist](https://packagist.org/packages/mdrazamani/asanpardakht-ipg-rest)[ RSS](/packages/mdrazamani-asanpardakht-ipg-rest/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (4)Dependencies (2)Versions (26)Used By (0)

AsanPardakht IPG REST Laravel Package
=====================================

[](#asanpardakht-ipg-rest-laravel-package)

This Laravel package provides a seamless integration with AsanPardakht's IPG REST API, allowing you to handle online payments, transaction verifications, and settlements effortlessly.

Features
--------

[](#features)

- **Token Generation:** Easily generate payment tokens.
- **Transaction Verification:** Verify the status of transactions.
- **Settlement Processing:** Manage post-transaction settlements.
- **Seamless Redirection:** Redirect users to the AsanPardakht payment gateway with ease.

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

[](#installation)

To get started with this package, follow these simple steps:

### 1. Install via Composer

[](#1-install-via-composer)

Run the following command in your Laravel project:

```
composer require mdrazamani/asanpardakht-ipg-rest
```

### 2. Publish Configuration

[](#2-publish-configuration)

Publish the package configuration file using the following Artisan command:

```
php artisan vendor:publish --provider="mdrazamani\AsanPardakhtIpgRest\AsanPardakhtIpgRestServiceProvider"
```

### 3. Update Environment Variables

[](#3-update-environment-variables)

Add the following variables to your .env file to configure the package:

```
ASANPARDAKHT_USERNAME=your_username
ASANPARDAKHT_PASSWORD=your_password
ASANPARDAKHT_MERCHANT_CONFIG_ID=your_merchant_config_id
ASANPARDAKHT_CALLBACK_URL=your_callback_url
```

Usage
-----

[](#usage)

### 1. Generate Token and Redirect

[](#1-generate-token-and-redirect)

Initiate a payment by generating a token and redirecting the user to AsanPardakht's payment gateway:

```
$gateway = app('asanpardakht')->init($invoiceId, $amount);
$response = $gateway->token();
$gateway->redirect($response['token']);
```

### 2. Verify Transaction

[](#2-verify-transaction)

After the user returns to your site, verify the transaction:

```
$verifyResponse = app('asanpardakht')->verify($transactionId);
```

### 3. Process Settlement

[](#3-process-settlement)

Once the transaction is verified, you can process the settlement:

```
$settlementResponse = app('asanpardakht')->settlement($transactionId);
```

Methods Overview
----------------

[](#methods-overview)

- `init($invoiceId, $amount)`: Initializes the payment with the given invoice ID and amount.
- `token()`: Generates a payment token.
- `verify($transactionId)`: Verifies the transaction.
- `settlement($transactionId)`: Processes the settlement for the given transaction.
- `redirect($token, $mobile = null)`: Redirects the user to the payment gateway.

###  Health Score

28

—

LowBetter than 54% of packages

Maintenance34

Infrequent updates — may be unmaintained

Popularity8

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity55

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

Total

25

Last Release

632d ago

PHP version history (2 changes)v1.0.0PHP ^7.4|^8.0

1.0.17PHP ^7.3|^8.0

### Community

Maintainers

![](https://www.gravatar.com/avatar/4f537930d0d2b395f0089f882ecce111177cfb2dcbf10eff181eeb6f1b4c9018?d=identicon)[mdrazamani](/maintainers/mdrazamani)

---

Top Contributors

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

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/mdrazamani-asanpardakht-ipg-rest/health.svg)

```
[![Health](https://phpackages.com/badges/mdrazamani-asanpardakht-ipg-rest/health.svg)](https://phpackages.com/packages/mdrazamani-asanpardakht-ipg-rest)
```

###  Alternatives

[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[convertkit/convertkitapi

Kit PHP SDK for the Kit API

2167.1k1](/packages/convertkit-convertkitapi)[mapado/rest-client-sdk

Rest Client SDK for hydra API

1125.9k2](/packages/mapado-rest-client-sdk)

PHPackages © 2026

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