lisosoft / lisopay-gates-laravel-payment-gateway
A comprehensive payment gateway package for Laravel with support for multiple payment providers including PayFast, PayStack, PayPal, Stripe, Ozow, Zapper, Crypto, EFT, QR Code, VodaPay, and SnapScan
Installs: 0
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 0
Forks: 0
Open Issues: 0
pkg:composer/lisosoft/lisopay-gates-laravel-payment-gateway
Requires
- php: ^8.1
- guzzlehttp/guzzle: ^7.0
- laravel/framework: ^10.0|^11.0
Requires (Dev)
- mockery/mockery: ^1.6
- orchestra/testbench: ^8.0
- phpunit/phpunit: ^10.0
This package is auto-updated.
Last update: 2025-12-31 11:53:32 UTC
README
A comprehensive payment gateway package for Laravel with support for multiple payment providers including PayFast, PayStack, PayPal, Stripe, Ozow, Zapper, Crypto, EFT, QR Code, VodaPay, and SnapScan.
๐ฏ Features
- Multi-Gateway Support: 10+ payment gateways including international and South African providers
- Unified API: Consistent interface across all payment gateways
- Subscription Management: Recurring payments and subscription handling
- Webhook Support: Real-time payment notifications
- Transaction Management: Complete transaction history and reporting
- Security: Built-in security features and encryption
- Analytics: Payment analytics and reporting dashboard
- Extensible: Easy to add custom payment gateways
๐ฆ Supported Gateways
International Gateways
- โ PayPal - Global payment processing
- โ PayStack - African payment gateway
- โ Stripe - International cards & payments
- โ Cryptocurrency - Bitcoin, Ethereum, USDT, USDC
South African Gateways
- โ PayFast - Leading SA payment gateway
- โ Ozow - Instant EFT payments
- โ Zapper - QR code payments
- โ SnapScan - Mobile QR payments
- โ VodaPay - Mobile wallet payments
- โ EFT/Bank Transfer - Manual bank deposits
๐ Quick Start
Installation
composer require lisosoft/laravel-payment-gateway
Publish Configuration
php artisan vendor:publish --tag=payment-gateway-config
Run Migrations
php artisan migrate
Configure Environment Variables
Add to your .env file:
# Default Gateway PAYMENT_GATEWAY_DEFAULT=payfast # PayFast Configuration PAYFAST_ENABLED=true PAYFAST_MERCHANT_ID=your_merchant_id PAYFAST_MERCHANT_KEY=your_merchant_key PAYFAST_PASSPHRASE=your_passphrase PAYFAST_TEST_MODE=true # PayStack Configuration PAYSTACK_ENABLED=true PAYSTACK_PUBLIC_KEY=your_public_key PAYSTACK_SECRET_KEY=your_secret_key PAYSTACK_MERCHANT_EMAIL=your_email # PayPal Configuration PAYPAL_ENABLED=true PAYPAL_CLIENT_ID=your_client_id PAYPAL_CLIENT_SECRET=your_client_secret PAYPAL_MODE=sandbox # Stripe Configuration STRIPE_ENABLED=true STRIPE_PUBLISHABLE_KEY=your_publishable_key STRIPE_SECRET_KEY=your_secret_key STRIPE_WEBHOOK_SECRET=your_webhook_secret
๐ผ Basic Usage
Initialize a Payment
use Lisosoft\PaymentGateway\Facades\Payment; // Initialize payment $result = Payment::initializePayment('payfast', [ 'amount' => 100.00, 'currency' => 'ZAR', 'description' => 'Product Purchase', 'customer' => [ 'email' => 'customer@example.com', 'name' => 'John Doe', 'phone' => '+27123456789', ], 'metadata' => [ 'order_id' => 12345, 'product_id' => 67890, ], ]); // Redirect user to payment page return redirect($result['payment_url']);
Verify Payment Status
use Lisosoft\PaymentGateway\Facades\Payment; $status = Payment::getPaymentStatus('payfast', 'TXN-123456'); if (Payment::isPaymentSuccessful('payfast', 'TXN-123456')) { // Payment successful }
Handle Webhooks
// Webhook routes are automatically registered // Handle callbacks in your controller public function handlePayFastWebhook(Request $request) { $result = Payment::processCallback('payfast', $request->all()); // Process the result }
๐ง Advanced Features
Custom Payment Gateway
Create your own payment gateway by extending the abstract class:
namespace App\PaymentGateways; use Lisosoft\PaymentGateway\Gateways\AbstractGateway; class CustomGateway extends AbstractGateway { protected function getDefaultConfig(): array { return [ 'enabled' => true, 'api_key' => '', 'api_secret' => '', // ... other configuration ]; } protected function processInitializePayment(array $paymentData): array { // Your payment initialization logic } // ... implement other required methods }
Event Listeners
Listen to payment events for business logic:
// In your EventServiceProvider protected $listen = [ \Lisosoft\PaymentGateway\Events\PaymentCompleted::class => [ \App\Listeners\ProcessOrder::class, \App\Listeners\SendConfirmationEmail::class, ], \Lisosoft\PaymentGateway\Events\PaymentFailed::class => [ \App\Listeners\NotifyAdmin::class, \App\Listeners\RetryPayment::class, ], ];
Subscription Management
use Lisosoft\PaymentGateway\Facades\Payment; // Create subscription $subscription = Payment::gateway('payfast')->createSubscription([ 'amount' => 99.99, 'currency' => 'ZAR', 'description' => 'Monthly Subscription', 'customer_email' => 'customer@example.com', 'frequency' => 'monthly', 'cycles' => 12, // 12 months ]); // Cancel subscription Payment::gateway('payfast')->cancelSubscription($subscription['id']);
๐ Analytics Dashboard
Access payment analytics through the built-in dashboard:
# Visit the dashboard at
/admin/payments/dashboard
๐ก๏ธ Security Features
- Encryption: Sensitive data encryption at rest
- Signature Verification: Webhook signature validation
- Rate Limiting: Built-in rate limiting for API endpoints
- IP Whitelisting: Optional IP whitelisting for webhooks
- HTTPS Enforcement: Requires HTTPS for production
- Data Masking: Sensitive data masking in logs
๐ Performance
- Caching: Intelligent caching of gateway configurations
- Queue Support: Webhook processing via queues
- Retry Logic: Automatic retry for failed payments
- Bulk Operations: Efficient batch processing
- Async Processing: Non-blocking payment verification
๐งช Testing
# Run tests composer test # Generate test coverage composer test-coverage
๐ Documentation
Complete documentation is available in the docs/ directory:
๐ค Support
Get Help
- GitHub Issues: Report bugs or request features
- Documentation: Complete API reference and guides
- Examples: Real-world integration examples
Commercial Support
For enterprise support, custom integrations, or consulting services, contact support@lisosoft.com.
๐ License
This package is open-source software licensed under the MIT license.
๐ Why Choose Lisosoft Payment Gateway?
- Enterprise Ready: Built for high-volume, mission-critical applications
- South African Focus: Optimized for South African payment ecosystems
- Developer Friendly: Clean API, comprehensive documentation, and examples
- Active Maintenance: Regular updates and security patches
- Community Support: Active community and commercial support options
๐ Getting Started with Development
# Clone the repository git clone https://github.com/lisosoft/laravel-payment-gateway.git # Install dependencies composer install # Run tests composer test # Start development server php artisan serve
๐ Contact
- Website: https://lisosoft.com
- Email: info@lisosoft.com
- GitHub: lisosoft/laravel-payment-gateway
Lisosoft Payment Gateway - Powering payments for modern Laravel applications.