akira/laravel-sisp
Composer 安装命令:
composer require akira/laravel-sisp
包简介
this is a laravel package to handle SISP payment
关键字:
README 文档
README
Laravel SISP is a Laravel package for SISP Cabo Verde payment flows, with transaction management, invoice generation, callback validation, sandbox tooling, and multi-merchant credential support.
Install
composer require akira/laravel-sisp php artisan laravel-sisp:install
{
"require": {
"akira/laravel-sisp": "^2.0"
}
}
| Area | Included |
|---|---|
| Payments | Payment request building, SISP form rendering, callbacks, cancellation, retry, and refunds |
| Transactions | Eloquent models, audit logs, reconciliation, and status queries |
| Invoices | PDF invoice generation after approved payments |
| Security | Fingerprint validation, signed retry and cancellation requests, rate limits, metadata collection, and blacklist support |
| Frontend | Blade views and optional Inertia rendering |
Quick Start
SISP_URL=https://mc.vinti4net.cv/Client_VbV_v2/biz_vbv_clientdata.jsp SISP_POS_ID=your_pos_id SISP_POS_AUT_CODE=your_authorization_code SISP_MERCHANT_ID=your_merchant_id SISP_SANDBOX=true
<form action="{{ route('sisp.payment') }}" method="POST"> @csrf <input type="number" name="amount" required> <input type="text" name="items[0][product_name]" required> <input type="number" name="items[0][quantity]" required> <input type="number" name="items[0][unit_price]" required> <input type="number" name="items[0][total_price]" required> <input type="email" name="customer_email"> <button type="submit">Pay</button> </form>
Use the facade when application code needs lower-level package operations:
use Akira\Sisp\Facades\Sisp; $transaction = Sisp::reconcileTransactionStatus($transaction); $countries = Sisp::countries();
Requirements (v2)
- PHP 8.5+
- Laravel 13+
Architecture (v2)
Version 2 is built on four explicit patterns. Each one is an extension point.
Builders
Compose payment and refund requests fluently instead of assembling value objects by hand:
use Akira\Sisp\Facades\Sisp; $paymentRequest = Sisp::payment() ->amount(1500.0) ->currency('132') ->customerEmail('buyer@example.cv') ->locale('pt') ->build(); $transaction = Sisp::refund($transaction) ->amount(500.0) ->reason('partial_return') ->process();
Drivers
Gateway interactions go through a driver resolved by SispManager. The production driver targets the live Vinti4 gateway and the sandbox driver targets the local simulator. Selection follows config('sisp.driver'), falling back to the resolved credentials' sandbox flag. Register custom gateways with SispManager::extend():
use Akira\Sisp\Drivers\SispManager; resolve(SispManager::class)->extend('custom', fn () => new CustomDriver());
Pipelines
The payment and callback flows run through Laravel pipelines. Every stage is a small, single-purpose pipe, and the stages are configurable in config/sisp.php under pipelines.payment and pipelines.callback, so you can reorder, remove, or append your own pipes:
'pipelines' => [ 'payment' => [ EnsureIpIsNotBlacklisted::class, EnforceRateLimits::class, BuildPaymentRequest::class, PersistTransaction::class, CaptureRequestMetadata::class, YourCustomPipe::class, // implements Akira\Sisp\Contracts\PaymentPipe ], ],
Actions
Every unit of work remains a dedicated, final, constructor-injected action class with a single handle() method. Pipes and builders delegate to actions, and actions depend on contracts, never on concrete infrastructure.
The package also uses native Laravel 13 syntax throughout: #[Fillable], #[UseFactory], and #[Scope] attributes on Eloquent models, #[Signature] and #[Description] on console commands, and #[Bind]/#[Singleton] container attributes on contracts and services.
Documentation
- Roadmap
- Installation
- Configuration
- Quick Start
- Payment Flow
- Transaction Management
- Invoice Generation
- Security
- Examples
- Troubleshooting
- FAQ
- API Reference
- Architecture (v2)
- Upgrade Guide (1.x → 2.0)
- Idempotency
Reference documentation is maintained in this repository under docs.
Testing
composer test
Additional focused checks are available through Composer scripts:
composer test:coverage composer test:type-coverage composer test:types composer test:lint
Changelog
See CHANGELOG.md for release history. Releases are generated with git-cliff.
Contributing
See CONTRIBUTING.md for local setup, test expectations, commit style, and pull request guidance.
Security
Report security issues through the process documented in SECURITY.md.
Credits
Laravel SISP is maintained by Kidiatoliny and the Akira team. Contributor recognition is managed through All Contributors.
License
Laravel SISP is dual-licensed under MIT or Apache-2.0. Unless you state otherwise, contributions are licensed under both licenses.
akira/laravel-sisp 适用场景与选型建议
akira/laravel-sisp 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 757 次下载、GitHub Stars 达 16, 最近一次更新时间为 2025 年 09 月 22 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「laravel」 「akira」 「laravel-sisp」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 akira/laravel-sisp 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 akira/laravel-sisp 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 akira/laravel-sisp 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
A clean, modern, and easy-to-use QR code generator for Laravel
Track, query, and act on authentication activity in your Laravel application. Automatically records successful and failed sign-ins, with optional notifications and geolocation context.
A modern, strictly typed, and extensible invoice generator for Laravel 12+ built with PHP 8.4 syntax. This package provides a clean builder pattern API, immutable data objects, and modular design inspired by LaravelDaily/laravel-invoices but rewritten from scratch with SOLID principles and Laravel b
Commentable is a lightweight and flexible comment system package designed to seamlessly integrate into any Laravel project. Whether you’re building a blog, a forum, or a platform like DevHunter – this package makes it incredibly easy to make any model commentable.
This is my package filament-user-invitation
Alfabank REST API integration
统计信息
- 总下载量: 757
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 16
- 点击次数: 22
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-09-22