PHPackages                             bd-payments/laravel-payment-gateway - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Payment Processing](/categories/payments)
4. /
5. bd-payments/laravel-payment-gateway

ActiveLibrary[Payment Processing](/categories/payments)

bd-payments/laravel-payment-gateway
===================================

A comprehensive Laravel 12 package for 13+ payment gateways integration with AI-powered management, PHP 8.4+ support

1.0.0(7mo ago)19MITPHPPHP ^8.4CI failing

Since Sep 24Pushed 7mo agoCompare

[ Source](https://github.com/laravelgpt/bdpayments)[ Packagist](https://packagist.org/packages/bd-payments/laravel-payment-gateway)[ RSS](/packages/bd-payments-laravel-payment-gateway/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (6)Versions (3)Used By (0)

Laravel Payment Gateway Package
===============================

[](#laravel-payment-gateway-package)

A comprehensive Laravel 12 package for integrating multiple payment gateways (Nagad, bKash, Binance, PayPal, Rocket, Upay, SureCash, UCash, MCash, MyCash, AamarPay, ShurjoPay, SSLCOMMERZ) with PHP 8.4+ support, featuring advanced payment management, invoice generation, problem resolution, enhanced security features, and AI-powered management.

Features
--------

[](#features)

- 🚀 **Laravel 12 &amp; PHP 8.4+ Support** - Built with modern Laravel and PHP features
- 💳 **Multiple Gateways** - Support for 13+ payment gateways including Nagad, bKash, Binance, PayPal, Rocket, Upay, SureCash, UCash, MCash, MyCash, AamarPay, ShurjoPay, SSLCOMMERZ
- 🔒 **Enhanced Security** - Advanced fraud detection, payment tampering protection, data encryption, and comprehensive security features
- 📝 **Comprehensive Logging** - Track all payment operations with detailed logs
- 🧪 **Well Tested** - Full test coverage with PHPUnit and Laravel testing
- 🛠️ **Easy Integration** - Simple facade and service provider integration
- 📊 **Rich Models** - Eloquent models for payments, logs, refunds, and invoices
- 🎨 **Beautiful Views** - Responsive payment forms and result pages
- ⚡ **Performance** - Caching, rate limiting, and optimized database queries
- 📋 **Payment History** - Complete payment lifecycle tracking
- 🧾 **Invoice Generation** - Automatic invoice creation and management
- 🔄 **Refund Management** - Comprehensive refund tracking and history
- 🚨 **Problem Resolution** - Advanced problem reporting and resolution system
- 📊 **Admin Dashboard** - Complete admin interface for payment management
- 📈 **Analytics** - Payment statistics and reporting
- 🎯 **Status Tracking** - Real-time payment status monitoring
- 🛡️ **Fraud Protection** - Advanced fraud detection and prevention
- 🔐 **Data Encryption** - Automatic encryption of sensitive payment data
- 🚫 **Tampering Protection** - Payment integrity verification and hash validation
- ⚡ **Rate Limiting** - Intelligent rate limiting to prevent abuse
- 🤖 **AI Agent** - Intelligent payment management, fraud detection, and automated support
- 📊 **Smart Analytics** - AI-powered insights and recommendations
- 🔮 **Predictive Analytics** - Payment failure prediction and risk assessment
- 🎯 **Optimal Gateway Selection** - AI-driven gateway recommendation based on success rates
- 📱 **QR Code Generation** - Dynamic QR codes for payments, invoices, and receipts
- 📊 **Transaction Reports** - Comprehensive analytics and reporting system
- 📈 **Export Functionality** - PDF, Excel, CSV export options
- 📊 **Analytics Dashboard** - Real-time insights and metrics
- 🔍 **Fraud Analysis** - Advanced fraud detection and risk assessment
- 👥 **Customer Behavior Analysis** - Customer segmentation and behavior insights

Installation
------------

[](#installation)

```
composer require bd-payments/laravel-payment-gateway
```

### Publish Configuration

[](#publish-configuration)

```
php artisan vendor:publish --provider="BDPayments\LaravelPaymentGateway\Providers\PaymentGatewayServiceProvider" --tag="config"
```

### Publish Migrations

[](#publish-migrations)

```
php artisan vendor:publish --provider="BDPayments\LaravelPaymentGateway\Providers\PaymentGatewayServiceProvider" --tag="migrations"
```

### Run Migrations

[](#run-migrations)

```
php artisan migrate
```

### Publish Views (Optional)

[](#publish-views-optional)

```
php artisan vendor:publish --provider="BDPayments\LaravelPaymentGateway\Providers\PaymentGatewayServiceProvider" --tag="views"
```

Configuration
-------------

[](#configuration)

### Environment Variables

[](#environment-variables)

Add these to your `.env` file:

```
# Default Gateway
PAYMENT_DEFAULT_GATEWAY=nagad

# Nagad Configuration
NAGAD_MERCHANT_ID=your_merchant_id_here
NAGAD_MERCHANT_PRIVATE_KEY=your_merchant_private_key_here
NAGAD_PUBLIC_KEY=your_nagad_public_key_here
NAGAD_SANDBOX=true

# bKash Configuration
BKASH_APP_KEY=your_app_key_here
BKASH_APP_SECRET=your_app_secret_here
BKASH_USERNAME=your_username_here
BKASH_PASSWORD=your_password_here
BKASH_SANDBOX=true

# Binance Configuration
BINANCE_API_KEY=your_api_key_here
BINANCE_SECRET_KEY=your_secret_key_here
BINANCE_SANDBOX=true

# Logging Configuration
PAYMENT_LOGGING_ENABLED=true
PAYMENT_LOG_LEVEL=info

# QR Code Configuration
QR_CODE_ENABLED=true
QR_CODE_STORAGE_PATH=qr-codes
QR_CODE_SIZE=200
QR_CODE_FORMAT=png
QR_CODE_ERROR_CORRECTION=M
QR_CODE_MARGIN=1
QR_CODE_CLEANUP_DAYS=30

# Reports Configuration
REPORTS_ENABLED=true
REPORTS_CACHE_TTL=3600
REPORTS_DASHBOARD_REFRESH=300

# Notifications Configuration
PAYMENT_NOTIFICATIONS_MAIL_ENABLED=true
PAYMENT_NOTIFICATIONS_FROM_ADDRESS=noreply@example.com
PAYMENT_NOTIFICATIONS_FROM_NAME=Payment System
PAYMENT_NOTIFICATIONS_SLACK_ENABLED=false
PAYMENT_NOTIFICATIONS_SLACK_WEBHOOK_URL=
PAYMENT_NOTIFICATIONS_SLACK_CHANNEL=#payments
```

### Configuration File

[](#configuration-file)

The package will create `config/payment-gateway.php` with comprehensive configuration options.

Quick Start
-----------

[](#quick-start)

### Basic Usage

[](#basic-usage)

```
