ajadipaul/laravel-payment-hub
Composer 安装命令:
composer require ajadipaul/laravel-payment-hub
包简介
A comprehensive and versatile package designed to integrate multiple payment gateways into your Laravel application. This package supports a wide array of popular payment options. With Laravel Payment Hub, you can seamlessly handle payments, ensuring a smooth and unified experience for both develope
README 文档
README
A comprehensive and versatile package designed to integrate multiple payment gateways into your Laravel application. This package supports a wide array of popular payment options. With Laravel Payment Hub, you can seamlessly handle payments, ensuring a smooth and unified experience for both developers and users. The package offers a standardized interface for all supported gateways, simplifying the process of switching between different payment providers without altering your codebase significantly. Enhance your Laravel application's payment capabilities with ease and flexibility using Laravel Payment Hub.
Installation
You can install the package via composer:
composer require ajadipaul/laravel-payment-hub
Usage
// API keys to the .env file PAYSTACK_PUBLIC_KEY=your_paystack_public_key PAYSTACK_SECRET_KEY=your_paystack_secret_key FLUTTERWAVE_PUBLIC_KEY=your_flutterwave_public_key FLUTTERWAVE_SECRET_KEY=your_flutterwave_secret_key // Publish the configuration file to your application php artisan vendor:publish --provider="Ajadipaul\LaravelPaymentHub\LaravelPaymentHubServiceProvider" // Application Code Usage class PaymentController extends Controller { protected $paystack; protected $flutterwave; public function __construct() { $paystackConfig = config('paymenthub.paystack'); $flutterwaveConfig = config('paymenthub.flutterwave'); $this->paystack = new PaystackService(); $this->paystack->initialize($paystackConfig); $this->flutterwave = new FlutterwaveService(); $this->flutterwave->initialize($flutterwaveConfig); } public function chargeWithPaystack() { $data = [ 'amount' => 5000, // Amount in Naira 'email' => 'user@example.com', 'callback_url' => route('payment.callback'), ]; $response = $this->paystack->charge($data); if ($response['status'] === 'success') { return redirect($response['authorization_url']); } return redirect()->back()->withErrors($response['message']); } public function chargeWithFlutterwave() { $data = [ 'amount' => 5000, // Amount in Naira 'currency' => 'NGN', 'email' => 'user@example.com', 'callback_url' => route('payment.callback'), ]; $response = $this->flutterwave->charge($data); if ($response['status'] === 'success') { return redirect($response['link']); } return redirect()->back()->withErrors($response['message']); } public function verifyTransaction($transactionId) { $response = $this->paystack->verify($transactionId); if ($response['status'] === 'success') { // Handle successful verification, e.g., updating order status } else { // Handle verification failure } } }
Testing
composer test
Changelog
Please see CHANGELOG for more information what has changed recently.
Contributing
Please see CONTRIBUTING for details.
Security
If you discover any security related issues, please email ajadi.ololade@gmail.com instead of using the issue tracker.
Credits
License
The GNU AGPLv. Please see License File for more information.
Laravel Package Boilerplate
This package was generated using the Laravel Package Boilerplate.
ajadipaul/laravel-payment-hub 适用场景与选型建议
ajadipaul/laravel-payment-hub 是一款 基于 PHP 开发的 Composer 扩展包,目前已累计 5 次下载、GitHub Stars 达 0, 最近一次更新时间为 2024 年 08 月 31 日, 在 PHP 生态内属于活跃度较高的组件。
它主要适用于以下技术方向: 「paystack」 「flutterwave」 「monnify」 「ajadipaul」 「laravel-payment-hub」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。
我们在过去多个企业项目中使用过 ajadipaul/laravel-payment-hub 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。
基于 ajadipaul/laravel-payment-hub 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。
线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。
承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。
与 ajadipaul/laravel-payment-hub 相关的其它包
同方向 / 同关键字的高下载量 PHP Composer 包推荐,方便对比选型:
PHP Implementation of Paystack API
A laravel package to seamlessly integrate monnify api within your laravel application
A Laravel Monnify Package
Laravel wrapper for the flutterwave-php library
A laravel package to seamlessly integrate monnify api within your laravel application
A simple interface to Paystack's subscription billing services. It takes the pain of implementing subscription management off you.
统计信息
- 总下载量: 5
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 23
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: GNU
- 更新时间: 2024-08-31