定制 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
  • 点击次数: 4
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

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

其他信息

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

承接程序开发

PHP开发

VUE

Vue开发

前端开发

小程序开发

公众号开发

系统定制

数据库设计

云部署

网站建设

安全加固