承接 nexuspay/payment-made-easy 相关项目开发

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

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

nexuspay/payment-made-easy

Composer 安装命令:

composer require nexuspay/payment-made-easy

包简介

A Laravel package for handling payments with multiple gateways (Paystack, Flutterwave, Stripe, Seerbit, etc.)

README 文档

README

A comprehensive Laravel package for integrating multiple payment gateways with webhook support.

Supported Payment Gateways

  • Paystack - Nigerian payment gateway

Installation Instructions

1. Install via Composer

composer require nexuspay/payment-made-easy

2. Publish Configuration

php artisan vendor:publish --provider="NexusPay\PaymentMadeEasy\PaymentServiceProvider"

3. Environment Variables

Add the following to your .env file:

# Default Gateway
PAYMENT_GATEWAY=paystack
PAYMENT_CURRENCY=NGN

# Paystack
PAYSTACK_PUBLIC_KEY=your_paystack_public_key
PAYSTACK_SECRET_KEY=your_paystack_secret_key
PAYSTACK_CALLBACK_URL=https://yoursite.com/payment/callback

# Flutterwave
FLUTTERWAVE_PUBLIC_KEY=your_flutterwave_public_key
FLUTTERWAVE_SECRET_KEY=your_flutterwave_secret_key
FLUTTERWAVE_ENCRYPTION_KEY=your_flutterwave_encryption_key
FLUTTERWAVE_CALLBACK_URL=https://yoursite.com/payment/callback

# Stripe
STRIPE_PUBLIC_KEY=your_stripe_public_key
STRIPE_SECRET_KEY=your_stripe_secret_key
STRIPE_WEBHOOK_SECRET=your_stripe_webhook_secret
STRIPE_CALLBACK_URL=https://yoursite.com/payment/callback

4. Usage

The package is now ready to use! See the usage examples for implementation details.

Basic Usage

use NexusPay\PaymentMadeEasy\Facades\Payment;

// Initialize payment
$response = Payment::driver('paystack')->initializePayment([
    'email' => 'customer@example.com',
    'amount' => 1000, // Amount in kobo/cents
    'reference' => 'ORDER_123',
    'callback_url' => 'https://yoursite.com/payment/callback',
]);

// Verify payment
$verification = Payment::driver('paystack')->verifyPayment('ORDER_123');

// Process refund
$refund = Payment::driver('paystack')->refundPayment('ORDER_123', 500);

Webhook Support

The package includes comprehensive webhook support for all gateways:

// Webhook URLs are automatically registered:
// POST /webhooks/payment-gateways/{gateway}

// Example: https://yoursite.com/webhooks/payment-gateways/paystack

Advanced Features

  • Driver Pattern: Easy to extend with new payment gateways
  • Event System: Laravel events for payment notifications
  • Webhook Verification: Automatic signature verification
  • Exception Handling: Comprehensive error handling
  • Multi-Currency: Support for multiple currencies
  • Subscription Support: Recurring payment support where available

Testing

composer test

Contributing

Please see CONTRIBUTING.md for details.

Security

If you discover any security-related issues, please email babusunnah@gmail.com instead of using the issue tracker.

License

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

统计信息

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

GitHub 信息

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

其他信息

  • 授权协议: MIT
  • 更新时间: 2025-07-13