Adding Payment Gateways
How to create custom payment gateway modules
Adding a New Payment Gateway
Step 1: Create Directory
Create directory: /modules/gateways/yourgateway/
Step 2: Create module.json
{
"name": "yourgateway",
"display_name": "Your Gateway",
"description": "Payment gateway description",
"version": "1.0.0"
}
Step 3: Create Gateway Class
Create YourgatewayGateway.php implementing ModuleInterface.
The module will be auto-detected in Admin → Modules.
Required Methods
processPayment()- Process paymenthandleWebhook()- Handle webhook callbacksgetConfigFields()- Return configuration fields