Download the PHP package fiachehr/laravel-pardakht without Composer
On this page you can find all versions of the php package fiachehr/laravel-pardakht. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download fiachehr/laravel-pardakht
More information about fiachehr/laravel-pardakht
Files in fiachehr/laravel-pardakht
Package laravel-pardakht
Short Description Professional Laravel payment gateway package for Iranian payment providers with SOLID principles and clean architecture
License MIT
Homepage https://github.com/fiachehr/laravel-pardakht
Informations about the package laravel-pardakht
Laravel Pardakht
Professional Laravel payment gateway package for Iranian payment providers with full SOLID principles and Clean Architecture.
Documentation
Laravel Pardakht — Documentation (hosted on fiachehr.ir)
Table of Contents
- Documentation
- Supported Gateways
- Key Features
- Requirements
- Installation
- Configuration
- Usage
- Testing
- Architecture
- Contributing
- Security
- License
Supported Gateways
- ✅ Bank Mellat (Bank-e Mellat) - SOAP
- ✅ Mabna Card (Sepehr) - REST API
- ✅ ZarinPal - REST API
Key Features
Architecture & Design
- 🏗️ SOLID Principles - Full adherence to SOLID principles
- 🎨 Clean Architecture - Clean and maintainable architecture
- 🎯 Design Patterns - Repository, Factory, Facade patterns
- 🧩 Contract-Based - Interface-driven programming
Capabilities
- 📦 Auto Storage - Automatic transaction storage in database
- 🔄 Easy Switching - Switch between gateways easily
- 🛡️ Error Handling - Professional exception handling
- ✨ Value Objects - Type-safe value objects
- 🧪 Test Coverage - Comprehensive unit and feature tests
- 🔌 Extensible - Easy to add custom gateways
- 🌐 Sandbox Support - Full sandbox/test environment support
Developer Experience
- 📝 Full Documentation - Comprehensive docs with examples
- 🎓 Educational - Self-documented, readable code
- 🔧 Simple Config - Easy configuration via .env
Requirements
- PHP 8.1 or higher (use PHP 8.2+ when running Laravel 12)
- Laravel 10.x, 11.x, or 12.x
- PHP SOAP extension (for Mellat gateway)
- PHP JSON extension
Installation
1. Install via Composer
2. Publish Assets
Or separately:
3. Run Migrations
This creates the pardakht_transactions table for storing transactions.
Configuration
Environment Variables
Add to your .env file:
Sandbox Mode (Testing)
For development and testing, enable sandbox mode:
Get Test Credentials:
- For Bank Mellat and Mabna: BankTest.ir
- For ZarinPal: ZarinPal Sandbox
Advanced Configuration
The config/pardakht.php file:
Usage
1. Create Payment Request
2. Verify Payment (Callback)
3. Advanced Usage
Working with Multiple Gateways
Working with Transactions via Repository
Using Transaction Model
Adding Custom Gateway
Testing
Running Tests
Available Tests
- ✅ Value Objects Tests
- ✅ Gateway Manager Tests
- ✅ Transaction Model Tests
- ✅ Exception Handling Tests
- ✅ Facade Tests
- ✅ Repository Tests
Security
Reporting Security Vulnerabilities
If you discover a security vulnerability, please email [email protected].
Best Practices
- ✅ Always store credentials in
.env - ✅ Never commit credentials
- ✅ Always use SSL in production
- ✅ Ensure
SANDBOX=falsein production - ✅ Review payment logs regularly
Contributing
Contributions are welcome! Please:
- Fork the repository
- Create a new branch (
git checkout -b feature/amazing-feature) - Commit your changes (
git commit -m 'Add amazing feature') - Push to the branch (
git push origin feature/amazing-feature) - Open a Pull Request
Contribution Guidelines
- Code must follow PSR-12
- Add necessary tests
- Update documentation
- Record changes in CHANGELOG.md
Changelog
See CHANGELOG.md for full changelog.
License
This package is open-sourced software licensed under the MIT license. See LICENSE for details.
Author
Fiachehr
- GitHub: @fiachehr
- Email: [email protected]
Acknowledgments
- Laravel community
- Payment gateway developers
- All contributors
Useful Links
- Laravel Documentation
- BankTest.ir - Bank gateway testing environment
- ZarinPal Documentation
FAQ
How do I switch between gateways?
How do I disable transaction storage?
How do I handle errors?
All versions of laravel-pardakht with dependencies
illuminate/support Version ^10.0|^11.0|^12.0
illuminate/database Version ^10.0|^11.0|^12.0
illuminate/http Version ^10.0|^11.0|^12.0
guzzlehttp/guzzle Version ^7.0
ext-soap Version *
ext-json Version *