bKash payment gateway integration for Tutor LMS. This plugin enables one-time course payments through bKash Tokenized Checkout.
✅ One-time and subscription payments for course purchases
✅ Tokenized Checkout for secure payment processing
✅ Sandbox and Live environment support
✅ IPN (Instant Payment Notification) integration
✅ Secure payment processing with transaction verification
✅ WordPress HTTP API for secure external communications
✅ Internationalization (i18n) support for translations
- WordPress 5.3 or higher
- PHP 7.4 or higher
- Tutor LMS (Free version)
- bKash 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 bKash merchant portal
- Apply for SandBox credentials by contacting bKash
- Receive username, password, app_key, and app_secret
For Live (Production):
- Apply for live/production API username, password, app_key, and app_secret
- Complete necessary verification (follow your bKash Key Account Manager's (KAM) instructions)
- Get credentials from bKash
- Go to Tutor LMS > Settings > Payments
- Find bKash in the payment gateways list
- Click to enable and configure:
- Environment: Select
Sandboxfor testing orLivefor production - Username: Enter your bKash merchant username
- Password: Enter your merchant password
- App Key: Enter your bKash App Key
- App Secret: Enter your bKash App Secret
- Webhook URL: Copy this URL
- Environment: Select
- Login to your bKash merchant portal
- Go to Webhook Settings
- Add the webhook URL from step 2
- Save settings
- Set environment to "Sandbox"
- Use sandbox credentials provided by bKash
- Test with bKash mobile app
- Create a test course in your LMS
- Set a price for the course
- Add course to cart and proceed to checkout
- Select bKash as payment method
- Complete payment on bKash page
- Verify order status in Tutor LMS
Student clicks "Purchase"
↓
Plugin authenticates with bKash and creates payment
↓
Student redirected to bKash payment page
↓
Student completes payment
↓
bKash sends webhook notification to your site
↓
Plugin validates transaction with bKash API
↓
Order status updated (Success/Failed/Cancelled)
↓
Student gets access to course (if successful)
- Token Authentication: Uses grant token for secure API access
- Transaction Validation: Double-checks payment status with bKash API
- Amount Verification: Ensures paid amount matches order amount
- SSL Communication: All API calls use HTTPS
bKash Tokenized Checkout API v1.2.0-beta
Live Environment:
Tokenized Pay v1.2.0-beta
Sandbox Environment:
Tokenized Sandbox v2
Please verify that you are using the correct API version before going live.
- Token Grant:
/tokenized/checkout/token/grant - Payment Create:
/tokenized/checkout/payment/create - Payment Execute:
/tokenized/checkout/payment/execute - Payment Query:
/tokenized/checkout/payment/query
tutor-bkash/
├── tutor-bkash.php # Main plugin file (entry point with plugin headers)
├── composer.json # Composer autoload configuration
├── composer.lock # Composer dependency lock file
├── README.md # GitHub/Documentation readme
├── readme.txt # WordPress.org-style readme
│
├── assets/ # Static assets (images, CSS, JS)
│ └── bkash-logo.png # bKash payment gateway logo
│
├── integration/ # Integration layer with Tutor LMS
│ ├── Init.php # Handles plugin hooks and initialization
│ ├── BkashConfig.php # Configuration (API keys, credentials, environment)
│ ├── BkashGateway.php # Registers bKash as a Tutor LMS payment gateway
│ ├── ExecutePayment.php # Handles payment execution via API
│ └── RewriteRules.php # Custom URL rewrite rules for API callbacks
│
├── languages/ # Localization files
│ └── tutor-bkash.pot # Base translation template file
│
├── payments/ # Core payment logic
│ └── Bkash.php # Handles payment creation, validation, and processing
│
└── vendor/ # Composer dependencies (autoloaded libraries)
This plugin supports internationalization and is translation-ready. All user-facing strings are wrapped with WordPress translation functions.
- Use the
languages/tutor-bkash.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-bkash-{locale}.mo(e.g.,tutor-bkash-bn_BD.mofor Bengali)
- Text Domain:
tutor-bkash - Domain Path:
/languages/
Currently available in:
- English (default)
Contributions for additional language translations are welcome!
- Check Credentials: Ensure Username, Password, App Key, and App Secret are correct
- Environment Mismatch: Sandbox credentials won't work in Live mode
- Webhook URL: Verify webhook URL is correctly configured in bKash panel
- SSL Certificate: Ensure your site has valid SSL certificate
- Check if webhook URL is accessible (not blocked by firewall)
- Copy the webhook URL and test it using your browser’s network tab or an API client (like Postman). Make sure the HTTP response status is 200 (OK) — that means it’s working correctly.
- Verify webhook_url in plugin settings
- Enable debug logging in WordPress (WP_DEBUG)
- Check error/debug logs for detailed messages
- Verify webhook is configured correctly
- Check if order ID is being passed correctly
- Ensure authentication tokens are working
- Check webhook response in browser console
- Wrong Timezone: Check your website timezone from Settings > General > Timezone and choose either a city in the same timezone as you or a UTC (Coordinated Universal Time) time offset.
- Currency Support: Currently supports BDT (Bangladeshi Taka) only
- Refunds: Manual refund processing through bKash merchant panel required
For issues related to:
- Plugin functionality: Contact plugin developer
- bKash API: Contact support@bkash.com or developer@bkash.com
- Tutor LMS: Contact Themeum support
This plugin is licensed under GPLv2 or later.
- Developed by S. Saif
- bKash Tokenized API integration
- Based on Tutor LMS Custom Payment Gateway Framework
This plugin is not affiliated with, maintained, endorsed, or sponsored by Themeum, Tutor LMS, or bKash.
- "Tutor" and "Tutor LMS" are trademarks of Themeum.
- "bKash" is a trademark of bKash Limited.
These names are used solely to indicate compatibility. The plugin is developed and maintained independently by the open-source community.