Frappe Payment Midtrans
A custom Frappe App that integrates Midtrans Payment Gateway with the Frappe Framework, specifically designed to work seamlessly with Frappe LMS.
- Author: ptrmtb
- Repository: https://github.com/ptrmtb/frappe_payment_midtrans
- GitHub stars: 1
- Forks: 0
- License: MIT
- Category: Accounting
- Maintenance: Minimally Maintained
- Frappe versions: develop
Install Frappe Payment Midtrans
bench get-app https://github.com/ptrmtb/frappe_payment_midtrans
Add the Frappe Gems badge to your README
Maintain Frappe Payment Midtrans? Paste this into your README:
[](https://frappegems.com/gems/apps/ptrmtb/frappe_payment_midtrans)
About Frappe Payment Midtrans
Midtrans Payment Gateway for Frappe
A custom Frappe App that integrates Midtrans Payment Gateway with the Frappe Framework, specifically designed to work seamlessly with Frappe LMS.
Features
- Midtrans Snap Integration: Secure and modern payment popup experience.
- Frappe LMS Support: Automatically enrolls students in Courses or Batches upon successful payment.
- Webhook Handling: Robust background processing of payment notifications (Success, Pending, Failure) to ensure enrollment happens even if the user closes the browser.
- Dynamic Redirects: Redirects users back to the specific course or page they initiated payment from.
- Currency Validation: Ensures transactions are processed in IDR (Indonesian Rupiah).
Prerequisites
- Frappe Framework (v15+)
- Payments App
- Frappe LMS App
Installation
Get the app
bench get-app payment_midtrans https://github.com/your-repo/payment_midtrans.gitInstall the app on your site
bench --site [your-site-name] install-app payment_midtransMigrate database
bench --site [your-site-name] migrate
Configuration
1. Midtrans Dashboard Setup
- Login to your Midtrans Dashboard.
- Go to Settings > Access Keys to get your
Merchant ID,Client Key, andServer Key. - Go to Settings > Configuration.
- Set the Notification URL (Webhook) to:
Note: If developing locally, use an Ngrok URL.https://[your-domain.com]/api/method/payment_midtrans.midtrans_payment_gateway.doctype.midtrans_settings.midtrans_settings.midtrans_notification
2. Frappe Site Setup
- Open your Frappe Desk.
- Search for Midtrans Settings.
- Enter your Merchant ID, Client Key, and Server Key.
- Enable Is Sandbox if you are testing.
- Save.
- Search for LMS Settings.
- Set Payment Gateway to
Midtrans. - Save.
Local Development
To test webhooks locally, you must expose your local server to the internet.
- Start Ngrok
bench ngrok --bind-tls - Copy the
httpsforwarding URL. - Update the Notification URL in Midtrans Dashboard with this Ngrok URL.
License
MIT
Related Accounting apps for Frappe & ERPNext
- Books — Free Accounting Software
- Lending — Open Source Lending software
- Payments — A payments app for frappe
- Banking — Load your bank transactions into ERPNext and reconcile them with your vouchers.
- Erpnext Quota — App to manage ERPNext Site, User, Company and Space limitations
- Utility Billing — The Utility Billing & Property Management App is a powerful addition to ERPNext, designed to streamline utility billing, property leasing, and tenant management. Ideal for municipal utilities, real estate managers, and property developers.
- Expense Request — ERPNext Expense Requests
- Vendor Payments — A frappe app that has workflows and reports to make payments to vendors by a company and track them