Author: Hasin Hayder
GitHub: https://github.com/hasinhayder
Plugin Repository: https://github.com/hasinhayder/tutor-sslcommerz
SSLCommerz payment gateway integration for Tutor LMS. This plugin enables one-time course payments through SSLCommerz.
- ✅ One-time payments for course purchases
- ✅ Support for multiple currencies (BDT, USD, EUR, GBP, etc.)
- ✅ Sandbox and Live environment support
- ✅ IPN (Instant Payment Notification) integration
- ✅ Secure payment processing with hash validation
- ✅ Transaction validation through SSLCommerz API
- ✅ Support for all SSLCommerz payment methods (Cards, Mobile Banking, Internet Banking)
- ✅ Internationalization (i18n) support for translations
- ✅ WordPress HTTP API for secure external communications
- WordPress 5.3 or higher
- PHP 7.4 or higher
- Tutor LMS (Free version)
- SSLCommerz merchant account
- Upload the plugin folder to
/wp-content/plugins - Activate the plugin through WordPress admin
- Ensure Tutor LMS is activated
- Configure settings in Tutor LMS > Settings > Payments
For Sandbox (Testing):
- Register at https://developer.sslcommerz.com/registration/
- You'll receive Store ID and Store Password via email
For Live (Production):
- Apply for merchant account at https://sslcommerz.com/
- Complete KYC verification
- Get your Store ID and Store Password from merchant panel
- Go to Tutor LMS > Settings > Payments
- Find SSLCommerz in the payment gateways list
- Click to enable and configure:
- Environment: Select
Sandboxfor testing orLivefor production - Store ID: Enter your SSLCommerz Store ID
- Store Password: Enter your Store Password (NOT your merchant panel login password)
- IPN URL: Copy this URL
- Environment: Select
- Login to your SSLCommerz merchant panel
- Go to IPN Settings for your store
- Add the IPN URL from step 2
- Save settings
- Set environment to "Sandbox"
- Use sandbox credentials
- Test with SSLCommerz test cards:
- Test Card Number:
4111111111111111 - Any future expiry date
- Any CVV
- Test Card Number:
- Create a test course in your LMS
- Set a price for the course
- Add course to cart and proceed to checkout
- Select SSLCommerz as payment method
- Complete payment on SSLCommerz page
- Verify order status in Tutor LMS
Student clicks "Purchase"
↓
Plugin sends payment request to SSLCommerz
↓
Student redirected to SSLCommerz payment page
↓
Student completes payment
↓
SSLCommerz sends IPN notification to your site
↓
Plugin validates transaction with SSLCommerz API
↓
Order status updated (Success/Failed/Cancelled)
↓
Student gets access to course (if successful)
- Hash Verification: Validates SSLCommerz callback signatures
- Transaction Validation: Double-checks payment status with SSLCommerz API
- Amount Verification: Ensures paid amount matches order amount
- SSL Communication: All API calls use HTTPS
SSLCommerz supports the following currencies:
- BDT (Bangladeshi Taka) - Primary
- USD (US Dollar)
- EUR (Euro)
- GBP (British Pound)
- SGD (Singapore Dollar)
- INR (Indian Rupee)
- MYR (Malaysian Ringgit)
Note: For non-BDT currencies, SSLCommerz converts to BDT at current exchange rates.
- Endpoint:
{api_domain}/gwprocess/v4/api.php - Method: POST
- Authentication: Store ID & Store Password
- Endpoint:
{api_domain}/validator/api/validationserverAPI.php - Method: GET
- Purpose: Verify payment status
- Receives POST data from SSLCommerz
- Validates transaction
- Updates order status
tutor-sslcommerz/
├── tutor-sslcommerz.php # Main plugin file
├── composer.json # Composer dependencies
├── composer.lock # Composer lock file
├── readme.txt # WordPress plugin readme
├── README.md # This file
├── .gitignore # Git ignore rules
├── assets/ # Plugin assets
│ └── sslcommerz-logo.png # Gateway logo
├── integration/ # Tutor LMS integration
│ ├── Init.php # Plugin initialization
│ ├── SslcommerzConfig.php # Configuration class
│ ├── SslcommerzGateway.php # Gateway registration
│ └── SslcommerzOrderProcess.php # Order processing and callbacks
├── languages/ # Translation files
│ └── tutor-sslcommerz.pot # Translation template
├── payments/ # Payment processing
│ └── Sslcommerz.php # Core payment logic
└── vendor/ # Composer autoload
This plugin supports internationalization and is translation-ready. All user-facing strings are wrapped with WordPress translation functions.
- Use the
languages/tutor-sslcommerz.potfile as a template - Create language-specific
.pofiles using tools like Poedit or Loco Translate - Compile
.mofiles and place them in thelanguages/directory - File naming:
tutor-sslcommerz-{locale}.mo(e.g.,tutor-sslcommerz-bn_BD.mofor Bengali)
- Text Domain:
tutor-sslcommerz - Domain Path:
/languages/
Currently available in:
- English (default)
Contributions for additional language translations are welcome!
- Check Store Credentials: Ensure Store ID and Password are correct
- Environment Mismatch: Sandbox credentials won't work in Live mode
- IPN URL: Verify IPN URL is correctly configured in SSLCommerz panel
- SSL Certificate: Ensure your site has valid SSL certificate
- Check if IPN URL is accessible (not blocked by firewall)
- Verify webhook_url in plugin settings
- Enable debug logging in WordPress (WP_DEBUG)
- Check error logs for detailed messages
- Verify IPN is configured correctly
- Check if order ID is being passed correctly (value_a parameter)
- Ensure hash verification is working
- Check webhook response in browser console
- No Subscription Support: SSLCommerz doesn't provide native recurring payment functionality
- Currency Conversion: Non-BDT transactions are auto-converted to BDT
- Refunds: Manual refund processing through SSLCommerz merchant panel required
- Security: Added comprehensive input sanitization to prevent XSS attacks
- Security: Implemented proper data validation for all user inputs
- Security: Enhanced hash verification with sanitized inputs
- Improvement: Enhanced error handling and logging
- Improvement: Code organization and structure improvements
- Feature: Added complete internationalization (i18n) support
- Feature: Created translation template (.pot file)
- Improvement: Added languages directory for translation files
- Improvement: Updated plugin constants and code structure
- Improvement: Enhanced documentation with translation information
- Minor fixes and improvements
- Minor fixes and improvements
- Improvement: Replaced cURL with WordPress HTTP API for better compatibility
- Improvement: Enhanced error handling and JSON validation
- Improvement: More descriptive error messages
- Security: Fixed fatal errors in IPN handling
- Security: Improved validation for webhook requests
- Improvement: Better error logging and debugging
- Fix: Corrected payment amount sending (was sending 0)
- Fix: Updated to use correct Tutor LMS field names
- Improvement: Added payment amount validation
- Initial release
- One-time payment support
- Sandbox and Live environments
- IPN integration
- Multi-currency support
- Transaction validation
For issues related to:
- Plugin functionality: Create issue on GitHub or contact plugin developer
- SSLCommerz API: Contact SSLCommerz support at support@sslcommerz.com
- Tutor LMS: Contact Themeum support
This plugin is licensed under GPLv2 or later.
- Developed for Tutor LMS
- SSLCommerz API integration
- Based on Tutor LMS Payment Gateway framework