PHPackages                             m74asoud/paymenter - 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. m74asoud/paymenter

ActiveLibrary

m74asoud/paymenter
==================

handle all user payment by wallet and onlinePay

0.0.8(5y ago)5681[1 PRs](https://github.com/masoudnazarpoor/Paymenter/pulls)MITPHPPHP &gt;=7.1.0

Since Sep 5Pushed 1y ago1 watchersCompare

[ Source](https://github.com/masoudnazarpoor/Paymenter)[ Packagist](https://packagist.org/packages/m74asoud/paymenter)[ RSS](/packages/m74asoud-paymenter/feed)WikiDiscussions master Synced 6d ago

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

Paymenter
---------

[](#paymenter)

- handle user payment
- create wallet for user
- prepare online payment by multi bank portal (by default ZarinPal)

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

[](#installation)

```
$ composer require m74asoud/paymenter
$ php artisan vendor:publish --provider="M74asoud\\Paymenter\\PaymenterServiceProvider"
$ php artisan migrate
```

usage
-----

[](#usage)

> **Step 1 :** add trait PaymenterAble to User model .

```
use M74asoud\Paymenter\Services\Payment\Contract\PaymenterAble;

class  User  extends  Authenticatable  {
	use PaymenterAble;
}

```

**PaymenterAble** includes below methods:

```
use M74asoud\Paymenter\Models\Bill;
use M74asoud\Paymenter\ObjectValue\Money;
use M74asoud\Paymenter\Services\Payment\PaymenterTDO;
use M74asoud\Paymenter\Services\Payment\Types\Contract\PaymenterTypeInterface;

```

- $user-&gt;balance() : Money

    > balance method return the latest inventory of the user's wallet
- $user-&gt;hasMoney(Money $money): bool

    > does user hasMoney in wallet
- $user-&gt;getPaymenterTypes(): array

    > return existing payment method example : wallet - online , ...
- $user-&gt;getOnlinePaymentPortals(): array

    > return all active bank portals
- $user-&gt;pay( PaymenterTDO $paymenterTDO, PaymenterTypeInterface $paymenter\_type = null ): bill
- $user-&gt;recharge( PaymenterTDO $paymenterTDO, PaymenterTypeInterface $paymenter\_type = null ): bill

> **Step 2 :** create a custom class any where and implement PaymenterControllerInterface like below

```
namespace  App\Http\Controllers;
use M74asoud\Paymenter\Services\Payment\Contract\PaymenterControllerInterface;

class  PaymentVerify  implements  PaymenterControllerInterface
{

	public  function  verifyHandler(Bill  $bill)
	{
		// do something you like
	}

}

```

> **Step 3 :** in your project AppServiceProvider Bind PaymenterControllerInterface to your Custom Class

```
public  function  register()
{
	$this->app->bind(PaymenterControllerInterface::class,CustomClass::class);
}

```

```
$bill->status :
const  Status  =  [
                 'pending'  	 	 =>  0,
                 'watingPay'  	 =>  1,
                 'paid'  	 	 =>  2,
                 'noEnoughMoney'  =>  3,
                 'error'  		 =>  4
 			];

* if use online payment and $bill->status === 1 (watingPay)
you must redirect user to bank portal with link :
$bill->paymentTransaction->requestPay() , then verify user payment in your custom class than created.

* when you try to pay or recahrge you must pass an object of PaymenterTDO .
PaymenterTDO argumans  :
 - Money  $amount,
 - string  $description,
 - int  $type ### this arguman Special for you , you can pass any integer and then verify $bill in your custom handler by it;

```

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance28

Infrequent updates — may be unmaintained

Popularity14

Limited adoption so far

Community8

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.

###  Release Activity

Cadence

Every ~5 days

Total

3

Last Release

2068d ago

### Community

Maintainers

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

---

Top Contributors

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

### Embed Badge

![Health badge](/badges/m74asoud-paymenter/health.svg)

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

###  Alternatives

[vemcogroup/laravel-sparkpost-driver

SparkPost driver to use with Laravel 6.x|7.x|8.x|9.x|10.x

421.7M1](/packages/vemcogroup-laravel-sparkpost-driver)[scriptdevelop/whatsapp-manager

Paquete para manejo de WhatsApp Business API en Laravel

762.6k](/packages/scriptdevelop-whatsapp-manager)

PHPackages © 2026

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