PHPackages                             mitoop/laravel-signature - 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. mitoop/laravel-signature

ActiveLibrary[Payment Processing](/categories/payments)

mitoop/laravel-signature
========================

v2.8.0(3mo ago)159MITPHPPHP ^8.2

Since Jan 20Pushed 3mo ago1 watchersCompare

[ Source](https://github.com/mitoop/laravel-signature)[ Packagist](https://packagist.org/packages/mitoop/laravel-signature)[ RSS](/packages/mitoop-laravel-signature/feed)WikiDiscussions main Synced today

READMEChangelogDependencies (8)Versions (26)Used By (0)

Laravel Signature
=================

[](#laravel-signature)

Laravel Signature is a robust and flexible package for handling API signature validation and generation. It supports multiple signing methods and can be easily extended to fit your application's needs.

✨ Features
----------

[](#-features)

- Supports **SHA256-RSA2048**, **SHA256-HMAC**, and **ED25519** signature methods.
- Customizable brand prefixes for signatures.
- Provides a flexible resolver interface for fetching application-specific configurations.
- Easily integrates with Laravel's service container.

📦 Installation
--------------

[](#-installation)

Install the package via Composer:

```
composer require mitoop/laravel-signature
```

⚙️ Configuration
----------------

[](#️-configuration)

Publish the configuration file:

```
php artisan vendor:publish --tag=config --provider="Mitoop\\LaravelSignature\\ServiceProvider"
```

This will create a `config/signature.php` file. Customize it as needed:

```
return [
    'brand' => 'your_brand',
    'max_clock_offset' => 300,
    'http_timeout' => 60,
];
```

🛡️Signature Validation Middleware
---------------------------------

[](#️signature-validation-middleware)

Laravel Signature provides a built-in middleware called ValidateSignature that verifies incoming API requests to ensure they are properly signed and not tampered with or replayed.

You can also create a custom middleware if you need more control over how the signature is verified or logged.

#### ✅ Registering the Middleware

[](#-registering-the-middleware)

```
use Mitoop\LaravelSignature\Middlewares\ValidateSignature;

Route::middleware([ValidateSignature::class])->group(function () {
    Route::post('/api/data/cities', [CityController::class, 'index']);
});
```

🔄 Making Callback Requests
--------------------------

[](#-making-callback-requests)

Laravel Signature also provides a Client class to help you send signed HTTP requests, which is useful for performing callback notifications.

#### ✅ Example: Sending a Signed Callback

[](#-example-sending-a-signed-callback)

```
use Mitoop\LaravelSignature\Http\Client;

$response = app(Client::class)->post('https://outer-service.com/api/notify', [
    'order_id' => '123456',
    'status' => 'success',
], 'platform-private-key');
```

References
----------

[](#references)

- [WechatPay-API-v3](https://wechatpay-api.gitbook.io/wechatpay-api-v3)
- [Alipay-open-v3](https://opendocs.alipay.com/open-v3/054kaq)

###  Health Score

43

—

FairBetter than 89% of packages

Maintenance82

Actively maintained with recent releases

Popularity10

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity61

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

Recently: every ~44 days

Total

25

Last Release

93d ago

Major Versions

v0.0.6 → v1.1.02025-04-20

v1.3.0 → v2.0.02025-05-29

### Community

Maintainers

![](https://www.gravatar.com/avatar/1645a978f51dcbbc8e50a17bf7daaa12fd1b01a4b19784d0010325d78c9b53f8?d=identicon)[Mitoop](/maintainers/Mitoop)

---

Top Contributors

[![mitoop](https://avatars.githubusercontent.com/u/7368344?v=4)](https://github.com/mitoop "mitoop (47 commits)")

---

Tags

paymentsignature

###  Code Quality

Code StyleLaravel Pint

### Embed Badge

![Health badge](/badges/mitoop-laravel-signature/health.svg)

```
[![Health](https://phpackages.com/badges/mitoop-laravel-signature/health.svg)](https://phpackages.com/packages/mitoop-laravel-signature)
```

###  Alternatives

[duncanmcclean/statamic-cargo

Comprehensive e-commerce addon for Statamic. Build bespoke e-commerce sites without the complexity.

3417.0k](/packages/duncanmcclean-statamic-cargo)[statamic-rad-pack/runway

Eloquently manage your database models in Statamic.

135224.7k7](/packages/statamic-rad-pack-runway)[api-platform/laravel

API Platform support for Laravel

58171.6k14](/packages/api-platform-laravel)

PHPackages © 2026

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