Getting Started with Payment Gateway Module Development
Welcome to WhatsmarkSaaS custom module development! This guide introduces you to creating payment gateway modules that extend the platform's payment processing capabilities while maintaining clean architecture and multi-tenant support.
What are WhatsmarkSaaS Custom Modules?
WhatsmarkSaaS custom modules are self-contained payment gateway extensions built on Laravel's modular architecture that add new payment processing capabilities to the platform. Currently, we support:
- Payment Gateway Integration: Add new payment processors and regional payment methods
- Multi-Tenant Support: Works seamlessly across different tenant environments
- Event-Driven Architecture: Loose coupling through Laravel events
- Maintainability: Easy to update, enable, disable, or remove
- Distribution: Can be packaged and shared across installations
CURRENT FOCUS
Initially, WhatsmarkSaaS provides custom module development support exclusively for payment gateway integration. Support for other module types will be gradually introduced in future releases.
IMPORTANT
Other module types (feature modules, integrations, UI enhancements) are not yet supported. This documentation focuses exclusively on payment gateway module development.
Prerequisites
System Requirements
WhatsmarkSaaS Version:
- WhatsmarkSaaS v1.3.8+: Minimum version required for custom module development
Required Knowledge
Essential Skills:
- Laravel 12+: Framework fundamentals, service providers, events
- PHP 8.3+: Modern PHP features, OOP principles
- Multi-Tenant Architecture: Understanding tenant isolation using Spatie Laravel Multitenancy
- Payment Gateway APIs: HTTP methods, JSON responses, webhook handling
- Livewire 3.6+: For dynamic UI components
Payment Gateway Development Workflow
Quick Start Process
- Generate Payment Gateway Module using the custom type command
- Configure Module Metadata for payment gateway
- Create Payment Gateway Service implementing PaymentGatewayInterface
- Implement Gateway API Service for payment provider communication
- Add Payment Event Listeners to register gateway
- Create Admin Settings for gateway configuration
- Build Payment Flow with checkout and callback handling
- Test Payment Processing and webhook handling
- Enable Module and verify integration
Essential Commands
# Generate new payment gateway module (REQUIRED COMMAND)
php artisan module:make YourGatewayName --type=custom
# Generate module components
php artisan module:make-controller YourGatewayController YourGatewayName
# Check module status
php artisan module:list
IMPORTANT COMMAND
Always use php artisan module:make ModuleName --type=custom
when creating payment gateway modules. This ensures proper custom module structure and configuration.
Maintenance
You are responsible for maintaining the modules you create, ensuring they remain compatible with the latest version of WhatsMarkSaaS when major changes occur.
WhatsMarkSaaS is still a new modular application. With each update, we aim to enhance the code and make it more modular. Due to this, there will be breaking changes, and you will need to adapt your modules accordingly.
Security
WhatsMarkSaaS is built with the Laravel PHP framework, which follows security practices to ensure reliability.
When creating new modules, you must ensure that your modules are secure and utilize existing functions and methods within the Laravel PHP framework.
Selling Modules on CodeCanyon
If you want to create modules and sell them as an author on CodeCanyon, you are free to do so. However, keep in mind that due to our exclusivity agreement, you can ONLY sell the modules on CodeCanyon.
Selling WhatsMarkSaaS modules on CodeCanyon means you are responsible for:
- Setting the appropriate price of the module
- Presenting the module
- Offering support
- Ensuring compatibility with the latest version changes
- Developing your marketing strategy
You cannot present us as a partner, either as an individual or a company. Publishing a module from your Envato account means you own all the copyright to the module and the code.
At our discretion, we may decide to market your module or recommend it to our customers.
Support for Module Creation
We will not offer support for creating modules. If you are certain that something is not working correctly and believe it to be a bug, you can open a support ticket at WhatsMarkSaaS Support and provide more information. We will be happy to take a look.
However, please note that we do not provide guidance on how to create specific features. Module development support is not included. You are encouraged to figure things out on your own, or explore the code if you need specific functions.
PRO TIP
Study the provided Payment Gateway Implementation Guide thoroughly before starting development. Understanding payment flows and security requirements is crucial for successful integration.
Next Steps
Continue your payment gateway development journey:
- Module Structure Guide - Payment gateway directory organization
- Payment Gateway Guide - Comprehensive payment implementation guide
- Tenant Billing Integration - Multi-tenant billing system integration
- Advanced Topics - Payment events, testing, security