PaymentProcessorInterface contract and registering it in the platform.
Built-in Processors
Processor IDs 0–99 are reserved for built-in processors. When you register a custom gateway, you must use an ID of 100 or higher.
The PaymentProcessorInterface Contract
Every processor — built-in or custom — must satisfy this interface:charge() returns a PaymentResult value object that carries the authorization code, transaction ID, success flag, and any error message back to the order processing pipeline.
Extending Built-in Processors
The cleanest way to customize a built-in processor is to extend its class. Place your extension file inside thepayment-processors/ directory at the project root — the platform auto-detects extension files in that directory on boot, so you don’t need to modify any core service provider.
- Stripe
- Paddle
- PayPal
Create
payment-processors/stripe/StripeProcessorExtension.php:The platform auto-detects extension files inside
payment-processors/ on boot. You don’t need to register them manually — just follow the namespace and directory naming convention shown above and the manager will pick them up.Building a Custom Payment Gateway
Follow these nine steps to integrate a brand-new payment provider from scratch.1
Copy the Example Gateway Template
Start from the bundled template to get the correct directory structure:
2
Implement PaymentProcessorInterface
Create your processor class in
payment-processors/my-gateway/MyGatewayProcessor.php:3
Add Environment Credentials
Add your gateway’s API keys to Reference these in
.env:config/services.php under a my_gateway key so they’re accessible via config('services.my_gateway.*').4
Insert a Row into order_processors
Register your processor in the database. Use an ID of 100 or higher:Set
production to 1 when you’re ready to accept live payments.5
Register the Class in config/payment_processors.php
Load your processor file and map its ID to the class:
6
Add the Processor Type to PaymentProcessorManager
Open
app/Services/Payments/PaymentProcessorManager.php and add your ID to the activeProcessorType() match expression:7
Handle Frontend Checkout Integration
Integrate your gateway’s JavaScript SDK (if applicable) inside
OrderReview::preparePayment(). This method is responsible for initialising the client-side checkout flow — tokenising card data, opening a hosted payment form, or triggering a redirect to your provider’s checkout page.8
Verify the Interface Contract
Double-check that your class satisfies all three methods required by PHP will throw a fatal error at runtime if any method is missing or has an incompatible signature.
PaymentProcessorInterface:9
Enable in the Admin Panel
Navigate to Admin → Checkout → Processors, find your new gateway in the list, and select it as the Primary processor. Toggle the sandbox flag off when you’re ready to go live.
Webhook Endpoints
Site Store Pro exposes dedicated webhook endpoints for each supported payment provider. Configure these URLs in your payment provider’s dashboard so that payment events — confirmations, subscription updates, refunds, and disputes — are pushed to your Site Store Pro installation in real time.
Each endpoint verifies the incoming request signature before processing the event payload:
- Stripe — validates using
STRIPE_WEBHOOK_SECRET(whsec_...) via Stripe’sWebhookSignatureVerifier. - Paddle — validates using
PADDLE_WEBHOOK_SECRET(pwh_...) via Paddle’s notification verifier. - PayPal — validates using
PAYPAL_CLIENT_IDandPAYPAL_CLIENT_SECRETto verify webhook event authenticity.