承接 engalalfy/laravel-payments 相关项目开发

从需求分析到上线部署,全程专人跟进,保证项目质量与交付效率

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

engalalfy/laravel-payments

最新稳定版本:v1.0.25

Composer 安装命令:

composer require engalalfy/laravel-payments

包简介

A unified Laravel package for multiple payment gateways (Paymob, Kashier, etc.) with easy integration and extensibility.

README 文档

README

A unified Laravel package for multiple payment gateways (Paymob, Kashier, etc.) with easy integration and extensibility. Simplify your payment processing with a consistent API across different payment providers.

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads License: MIT Issues Pull Requests

Features

  • Unified API: Work with multiple payment gateways using a consistent interface
  • Extensible: Easily add support for new payment gateways
  • Provider Agnostic: Switch between payment providers without changing your application code
  • Event Driven: Leverage Laravel's event system for payment notifications
  • Thorough Documentation: Well-documented API with examples for each supported gateway
  • Robust Testing: Comprehensive test suite for reliability

Package Structure

laravel-payments/
├── config/                  # Configuration files
├── database/
│   └── migrations/          # Database migrations
├── resources/
│   └── views/               # Views for payment pages if needed
├── src/
│   ├── Facades/             # Laravel Facades
│   ├── Gateways/            # Payment gateway implementations
│   │   ├── Paymob/
│   │   ├── Kashier/
│   │   └── ...
│   ├── Contracts/           # Interfaces defining the API
│   ├── Models/              # Eloquent models
│   ├── Events/              # Payment-related events
│   ├── Exceptions/          # Custom exceptions
│   └── LaravelPayments.php  # Main package class
└── tests/                   # Test suite

Installation

You can install the package via composer:

composer require engalalfy/laravel-payments

After installation, publish the configuration and migrations:

php artisan vendor:publish --tag="laravel-payments-config"

Configuration

Configure your payment gateways in the published config file:

// config/laravel-payments.php

return [
    'default' => env('PAYMENT_GATEWAY', 'paymob'),
    
    'gateways' => [
        'paymob' => [
            'api_key' => env('PAYMOB_API_KEY'),
            'integration_id' => env('PAYMOB_INTEGRATION_ID'),
            'iframe_id' => env('PAYMOB_IFRAME_ID'),
            // Additional Paymob configuration...
        ],
        
        'kashier' => [
            'merchant_id' => env('KASHIER_MERCHANT_ID'),
            'api_key' => env('KASHIER_API_KEY'),
            // Additional Kashier configuration...
        ],
        
        // Additional payment gateways...
    ],
    
    'currency' => env('PAYMENT_CURRENCY', 'EGP'),
    'callback_url' => env('PAYMENT_CALLBACK_URL', '/payment/callback'),
];

Basic Usage

Testing

The package comes with a comprehensive test suite:

composer test

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details on how to contribute to this package.

Reporting Issues

If you encounter any issues, please open an issue on GitHub.

Pull Requests

Pull requests are welcome. For major changes, please open an issue first to discuss what you would like to change.

Security Vulnerabilities

Please review our security policy on how to report security vulnerabilities.

Support the Development

If you find this package helpful, consider supporting its development:

PayPal

Credits

License

The MIT License (MIT). Please see License File for more information.

统计信息

  • 总下载量: 145
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 1
  • 点击次数: 5
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 1
  • Watchers: 1
  • Forks: 0
  • 开发语言: PHP

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-04-06