Skip to main content
Site Store Pro ships with four payment processors — a test gateway and production-ready integrations for Stripe, Paddle Billing, and PayPal. You can customize the behavior of any built-in processor without touching core files by extending its class, or build an entirely new gateway by implementing the 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 the payment-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.
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.
Custom processor IDs must be 100 or higher. IDs 0–99 are reserved for Site Store Pro’s built-in processors. Using a reserved ID will cause conflicts that are difficult to debug.
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 .env:
Reference these in 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 PaymentProcessorInterface:
PHP will throw a fatal error at runtime if any method is missing or has an incompatible signature.
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’s WebhookSignatureVerifier.
  • Paddle — validates using PADDLE_WEBHOOK_SECRET (pwh_...) via Paddle’s notification verifier.
  • PayPal — validates using PAYPAL_CLIENT_ID and PAYPAL_CLIENT_SECRET to verify webhook event authenticity.
Webhook endpoints are CSRF-exempt by design — they receive POST requests from external payment providers. Ensure STRIPE_WEBHOOK_SECRET, PADDLE_WEBHOOK_SECRET, and PayPal credentials are set correctly in .env before exposing these URLs to production traffic. Missing or incorrect secrets will cause signature verification to fail and all incoming events to be rejected.
Register these URLs in your provider dashboards:
For local development and testing, use a tunnelling tool (such as the Stripe CLI or ngrok) to expose your local server and forward provider events to your machine before deploying to a publicly accessible URL.