Hi folks,
In frappe V 7.1 we are introducing Integration Broker. Integration Broker is a common platform for 3rd party Integrations.
For a first cut, we have introduced four integrations as part of framework
- PayPal
- Razorpay
- LDAP Authentication
- DropBox backup upload (re-written as per new design)
What Is Integration Service Broker ?
Why?
- Avoid application duplication
- To code reuse
- Code Maintainability
Ref : Integration broker by saurabh6790 · Pull Request #1968 · frappe/frappe · GitHub
Example:
Introducing new service:
- Add Service name in frappe/hooks.py
integration_services = ["PayPal", "Razorpay", "Dropbox Integration", "LDAP Auth"]
- Create controller for service.
-
Create handler file under frappe/integrations
-
Setup parameter template for and a scheduler hob handler for service
https://github.com/frappe/frappe/blob/develop/frappe/integrations/razorpay.py#L64-L86 -
Controller business logic
https://github.com/frappe/frappe/blob/develop/frappe/integrations/razorpay.py#L92 -
Add js side customizations (if any)
https://github.com/frappe/frappe/blob/develop/frappe/integrations/razorpay.py#L88
https://github.com/frappe/frappe/blob/develop/frappe/public/js/integrations/razorpay.js
ref for developer:
Configuring Service:
-
If service is not pre-created then create new service by selecting service name from dropdown. To
create integration service,Setup > Integrations > Integration Service
–
-
Next step is, setup credentials for respective service,
-
To setup parameters click on
Edit Settings
button, this will open a popup with pre-defined paramters
–
-
After filling required details, click on
Set
.
–
-
After setting up all mandatory parameters, check enable and Save a document to enable service.
–