PHPackages                             masmaleki/calculator - 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. [Utility &amp; Helpers](/categories/utility)
4. /
5. masmaleki/calculator

ActiveLibrary[Utility &amp; Helpers](/categories/utility)

masmaleki/calculator
====================

Simple Laravel Transaction fee Calculator for laravel 8|9

1.2.1(3y ago)016MITPHPPHP ^7.4|^8.0

Since Jul 10Pushed 3y ago1 watchersCompare

[ Source](https://github.com/masmaleki/calculator)[ Packagist](https://packagist.org/packages/masmaleki/calculator)[ Docs](https://github.com/masmaleki/calculator)[ RSS](/packages/masmaleki-calculator/feed)WikiDiscussions master Synced today

READMEChangelog (3)Dependencies (4)Versions (6)Used By (0)

Simple Laravel Package - Transaction fee calculator - By MSM
============================================================

[](#simple-laravel-package---transaction-fee-calculator---by-msm)

[![Latest Version on Packagist](https://camo.githubusercontent.com/8ddfd59d1fb85a477b8e6d357ba3f7e7cc865da2d5f857ceb614a5a7c1c2efb8/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f762f6d61736d616c656b692f63616c63756c61746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/masmaleki/calculator)[![Total Downloads](https://camo.githubusercontent.com/853cd403447d95bd4ad764e12ded8ef1c54fe1e48bb3840c04abca4bd136330c/68747470733a2f2f696d672e736869656c64732e696f2f7061636b61676973742f64742f6d61736d616c656b692f63616c63756c61746f722e7376673f7374796c653d666c61742d737175617265)](https://packagist.org/packages/masmaleki/calculator)

This package is just for using in an internal project, and it's not use full for all projects,but you can use it and extend it based on your needs.

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

[](#installation)

You can install the package via composer:

```
composer require masmaleki/calculator
```

Usage
-----

[](#usage)

After installing the package with composer, then you need to run your laravel application:

```
php artisan serv
```

Then call this url in your browser:

```
http://127:0.0.1:8000/calculator
```

Then you should see this: [![image](https://user-images.githubusercontent.com/5430351/178139960-4f046c5f-c843-4421-b00f-c15fdb5cef23.png)](https://user-images.githubusercontent.com/5430351/178139960-4f046c5f-c843-4421-b00f-c15fdb5cef23.png)

After submiting the form you will see the table of trasaction with the calculated commissions based on your rules [![image](https://user-images.githubusercontent.com/5430351/178139878-2c62cf25-4034-404b-b137-9eabb7270908.png)](https://user-images.githubusercontent.com/5430351/178139878-2c62cf25-4034-404b-b137-9eabb7270908.png)

Publish Resources
-----------------

[](#publish-resources)

If you want to modify the config file for rates or Rate API url or view and asset files you need to run the below commands:

```
php artisan vendor:publish --tag=Calculator-Assets
php artisan vendor:publish --tag=Calculator-Config
php artisan vendor:publish --tag=Calculator-Views
```

Config
------

[](#config)

There is pre-defined values in the config file which you can publish the config file and find it in /config/calculator.php or assign the values in your .env file

```
    'currencies' => [

        'EUR' => 1,
        'USD' => 1.1497,
        'JPY' => 129.53

    ],

    'commission_fees' => [

        'private' => [
            'deposit'=> 0.0003,
            'withdraw'=> 0.003
        ],
        'business' => [
            'deposit'=> 0.0003,
            'withdraw'=> 0.005
        ]

    ],

    'rate_url' => env('CALC_RATE_URL', 'https://developers.paysera.com/tasks/api/currency-exchange-rates'),

    'limit' => env('CALC_limit', 1000),
```

### Testing

[](#testing)

For testing first you should publish the package test then run the laravel test command. follow this :

```
php artisan vendor:publish --tag=Calculator-Tests
php artisan test
```

### Changelog

[](#changelog)

Please see [CHANGELOG](CHANGELOG.md) for more information what has changed recently.

Contributing
------------

[](#contributing)

Please see [CONTRIBUTING](CONTRIBUTING.md) for details.

### Security

[](#security)

If you discover any security related issues, please email  instead of using the issue tracker.

Credits
-------

[](#credits)

- [MohammadSadegh Maleki](https://github.com/masmaleki)
- [All Contributors](../../contributors)

License
-------

[](#license)

The MIT License (MIT). Please see [License File](LICENSE.md) for more information.

###  Health Score

25

—

LowBetter than 35% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity6

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity57

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

5

Last Release

1452d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/700c615243c927236af92c6ce4f857b0047639518570866f96b0ec9adca1a773?d=identicon)[masmaleki](/maintainers/masmaleki)

---

Top Contributors

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

---

Tags

calculatormasmaleki

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/masmaleki-calculator/health.svg)

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

###  Alternatives

[psalm/plugin-laravel

Psalm plugin for Laravel

3355.3M346](/packages/psalm-plugin-laravel)[renatomarinho/laravel-page-speed

Laravel Page Speed

2.5k1.7M11](/packages/renatomarinho-laravel-page-speed)[illuminate/pagination

The Illuminate Pagination package.

12234.1M1.0k](/packages/illuminate-pagination)[illuminate/pipeline

The Illuminate Pipeline package.

9349.2M278](/packages/illuminate-pipeline)[illuminate/broadcasting

The Illuminate Broadcasting package.

7127.2M208](/packages/illuminate-broadcasting)[illuminate/redis

The Illuminate Redis package.

8314.6M371](/packages/illuminate-redis)

PHPackages © 2026

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