A WordPress plugin that integrates SeaCoast's loan application system with the Lendfusion API.
- Retailer Application Form (Form #15) integration
- Loan Application Form (Form #16) integration
- Personal Loan Application Form (Form #2) integration
- Automatic OAuth token management
- Comprehensive logging system
- Admin interface for log management
- Proxy support for API requests
- Environment-based configuration (Production/Sandbox)
- Customizable API base URLs for each environment
- Plaid Integration for identity verification and bank account setup
- Dynamic form confirmation handling
- Entry meta management for application tracking
- Automatic email notifications for API errors
- Comprehensive error tracking and reporting
- Upload the plugin files to the
/wp-content/plugins/seacoast-lendfusion-integration
directory - Activate the plugin through the 'Plugins' menu in WordPress
- Configure the plugin settings in the WordPress admin panel
The plugin supports configuring two separate environments:
-
Sandbox (Testing)
- Separate API Base URL field (default: https://core-test-massimpact.lendfusiondev.com)
- Sandbox-specific Client ID and Client Secret
- Quick Bucks Application Type ID: 6
-
Production (Live)
- Separate API Base URL field (default: https://core.seacoastloans.com)
- Production-specific Client ID and Client Secret
- Quick Bucks Application Type ID: 2
You can select your active environment (Sandbox or Production) via the radio buttons at the top of the settings page. The current active environment is always prominently displayed.
For each environment (Sandbox and Production), you'll need to configure:
-
API Base URL
- The root URL for the Lendfusion API
- Default values are provided but can be customized
-
API Credentials
- Client ID
- Client Secret
-
Proxy Settings (if required)
- Proxy Host:Port
- Proxy Username (if required)
- Proxy Password (if required)
When switching between environments:
- Select the desired environment radio button (Sandbox or Production)
- Save your settings
- The plugin will immediately begin using the selected environment for all API calls
- A visual indicator at the top of the settings page shows your current active environment
The plugin includes a comprehensive error handling system with automatic email notifications:
- Authentication errors (invalid tokens, access denied)
- Connection errors (timeouts, network issues)
- JSON parsing errors (malformed responses)
- Application-specific errors
When an API error occurs, the plugin automatically sends an email to the site administrator containing:
- Form title and entry ID
- Error code and message
- Timestamp of the error
- Additional error details
- Error categorization
- Relevant form data
All errors are logged with detailed information:
- Full error stack trace
- Request and response data
- User context
- Form submission details
- Error categorization
The plugin maintains detailed logs of all API interactions in the wp-content/seacoast-logs
directory.
- View recent logs in the WordPress admin panel under "SeaCoast Integration"
- Download full log file using the "Download Log File" button
- View complete logs in a modal window using the "View Full Log" button
- Clear all logs using the "Clear All Logs" button
- Logs include:
- API requests and responses
- OAuth token management
- Error messages and stack traces
- Form submission details
- Plaid integration events
- Application status changes
- Email notification events
Logs are stored in a structured format:
[timestamp] message: data
The log file can be downloaded as a plain text file for offline analysis or archiving.
- Creates agency records in Lendfusion
- Handles file uploads for business licenses
- Manages Plaid integration for identity verification
- Stores application status and agency ID in entry meta
- Provides admin interface for viewing application details
- Creates loan applications in Lendfusion
- Handles payment receipt uploads
- Manages application submission workflow
- Integrates with Plaid for identity verification and bank account setup
- Stores Plaid URLs and application status in entry meta
- Provides dynamic confirmation messages with next steps
- Creates personal loan applications in Lendfusion
- Manages application submission workflow
- Integrates with Plaid for identity verification and bank account setup
- Stores application status and Plaid URLs in entry meta
- Provides dynamic confirmation messages with next steps
The plugin integrates with Plaid for:
-
Identity Verification
- Generates shareable verification URLs
- Stores verification status
- Provides verification links in confirmation messages
-
Bank Account Setup
- Generates hosted link URLs for bank connection
- Stores bank connection status
- Provides bank setup links in confirmation messages
- URLs are stored in form entry meta
- Available through admin interface
- Accessible via shortcodes
- Included in confirmation messages
- Protected by WordPress security measures
- Check the logs in the WordPress admin panel
- Verify API credentials and environment settings
- Ensure proxy settings are correct (if using)
- Check file permissions for the logs directory
- Try clearing cached OAuth tokens through the API Test page
- Verify Plaid integration settings
- Check entry meta for stored application data
- Review error email notifications for API issues
- All API credentials are stored securely
- Logs are protected and only accessible to administrators
- Nonce verification for all admin actions
- Input sanitization and validation
- Secure storage of Plaid URLs
- Protected access to application data
- Secure error handling and reporting
For support or issues, please contact the development team.
- Updated file upload field mapping for Quickbucks Loan form to use only the correct receipt upload field (ID 107) and send its URL to the Lendfusion API.
- Enhanced logging for file uploads: logs now clearly show detected file uploads, document mapping, and API payloads for better traceability.
- Updated personal loan application endpoint handling
- Added support for individual and business applications
- Improved form data structure and field mappings
- Enhanced data sanitization and type casting
- Updated confirmation message to show application status and next steps
- Fixed environment-specific endpoint URLs for personal loan applications
- Updated loan retailer field ID from 63 to 114
- Improved field validation and sanitization
- Enhanced error handling for retailer field
- Removed file handling from API requests to fix validation errors
- Improved error handling and logging
- Fixed retailer validation
- Added support for proxy settings
- Added automatic email notifications for API errors
- Enhanced error handling with detailed error reporting
- Improved logging system with email alerts
- Added error categorization (authentication, connection, JSON parsing)
- Added customizable API base URLs for each environment
- Improved environment selection with visual indicators
- Reorganized settings page for better clarity
- Initial release
- Basic form integration
- Logging system
- Admin interface
- Proxy support