wontonee/paystack
最新稳定版本:1.0.1
Composer 安装命令:
composer require wontonee/paystack
包简介
Paystack Payment Gateway for Bagisto - Accept payments across Africa with Cards, Bank Transfer, Mobile Money & USSD
README 文档
README
Accept payments from customers across Africa using Paystack - one of Africa's leading payment processors.
🌍 Supported Countries & Payment Methods
Countries
- 🇳🇬 Nigeria
- 🇬🇭 Ghana
- 🇿🇦 South Africa
- 🇰🇪 Kenya
- And more across Africa
Payment Methods
- 💳 Cards (Visa, Mastercard, Verve)
- 🏦 Bank Transfer
- 📱 Mobile Money
- 📞 USSD
- 💰 Bank Account
- 🔄 QR Code
Supported Currencies
- NGN (Nigerian Naira)
- GHS (Ghanaian Cedi)
- ZAR (South African Rand)
- KES (Kenyan Shilling)
- USD (US Dollar)
📋 Requirements
- Bagisto 2.x
- PHP 8.2 or higher
- Laravel 11.x
- Paystack Account (Sign up here)
- SSL Certificate (Required for production)
Installation
Step 1: Install via Composer
composer require wontonee/paystack
Step 2: Publish Assets
php artisan vendor:publish --tag=paystack-assets
Step 3: Clear Cache
php artisan config:cache php artisan route:cache php artisan optimize:clear
⚙️ Configuration
1. Get Paystack Credentials
- Login to Paystack Dashboard
- Navigate to Settings → API Keys & Webhooks
- Copy your Public Key and Secret Key
2. Configure in Bagisto Admin
- Go to Admin Panel → Configuration → Sales → Payment Methods
- Find Paystack in the payment methods list
- Configure the following fields:
| Field | Description | Required |
|---|---|---|
| Title | Display name for payment method | Yes |
| Description | Description shown to customers | No |
| Payment Method Icon | Upload custom icon (100x50px recommended) | No |
| Public Key | Your Paystack Public Key (pk_test_ or pk_live_) | Yes |
| Secret Key | Your Paystack Secret Key (sk_test_ or sk_live_) | Yes |
| Status | Enable/Disable payment method | Yes |
- Click Save Configuration
🔧 How It Works
Payment Flow
- Customer Checkout: Customer selects Paystack and places order
- Transaction Initialization: System initializes transaction via Paystack API
- Redirect to Paystack: Customer redirected to Paystack payment page
- Payment Processing: Customer completes payment on Paystack
- Callback: Paystack redirects back with reference
- Verification: System verifies transaction with Paystack API
- Order Creation: Order created if payment successful
API Endpoints
All Transactions:
- Initialize:
https://api.paystack.co/transaction/initialize - Verify:
https://api.paystack.co/transaction/verify/:reference
🧪 Testing
Test Mode
- Use API keys starting with
pk_test_andsk_test_ - Test with Paystack test cards
- No real money charged
Test Cards
Success:
Card Number: 4084 0840 8408 4081
CVV: 408
Expiry: Any future date (e.g., 12/25)
PIN: 0000
OTP: 123456
Insufficient Funds:
Card Number: 5061 0200 0000 0000 094
Declined:
Card Number: 5061 0203 4000 0000 07
More test cards: https://paystack.com/docs/payments/test-payments
📝 Important Notes
Amount Handling
- Paystack requires amounts in kobo/cents (₦10 = 1,000 kobo)
- System automatically converts amounts to kobo
- Supports NGN, GHS, ZAR, KES, USD
Payment Status
success: Payment completed successfullyfailed: Payment failedabandoned: Payment not completed
Security
- Always verify transactions on server-side
- Never expose secret key on frontend
- Use HTTPS for production
� Troubleshooting
Common Issues
1. "Payment initialization failed"
- Solution: Check Public Key and Secret Key in admin configuration
2. "Payment verification failed"
- Solution: Verify API keys are correct and match environment (test/live)
3. "Callback not working"
- Solution: Ensure SSL certificate is valid (production) and callback URL is accessible
4. Route not found errors
- Solution: Run
php artisan route:cacheandphp artisan config:cache
5. Image not showing
- Solution: Run
php artisan vendor:publish --tag=paystack-assets --force
Debug Logs
Check logs in storage/logs/laravel.log for detailed error information.
🆘 Support
For support, contact:
- Email: dev@wontonee.com
- Website: https://www.wontonee.com
- Whatsapp: +91-9711381236, +91-9811381218
📄 License
This package is proprietary software. All rights reserved by Wontonee.
PROPRIETARY LICENSE - Unauthorized copying, distribution, modification, or use of this software is strictly prohibited.
🔮 Upcoming Features
- ✅ Webhook integration for real-time updates
- ✅ Refund functionality from admin panel
- ✅ Recurring payments support
- ✅ Split payments
📚 Additional Resources
Developed with ❤️ by Wontonee
统计信息
- 总下载量: 12
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 1
- 点击次数: 3
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: proprietary
- 更新时间: 2025-10-08