CartModules: Safepay Payment Gateway
Accept Online Payments in Pakistan via Safepay
Integrate Safepay -- Pakistan's modern payment gateway -- directly into your CS-Cart or Multi-Vendor store. Accept credit/debit card payments, bank transfers, and local payment methods through a secure hosted checkout flow.
Key Features
- Hosted Checkout -- Customers pay on Safepay's secure payment page (PCI SAQ A compliant)
- Multiple Payment Methods -- Credit/debit cards, bank transfers, and local options
- Multi-Currency -- Supports PKR (Pakistani Rupee) and USD (US Dollar)
- Webhook Notifications -- Server-to-server payment confirmation with HMAC-SHA256 signature verification
- Sandbox/Production Toggle -- Switch between test and live environments from the admin panel
- Configurable Order Statuses -- Map Safepay payment states to any CS-Cart order status
- Secure API Communication -- Bearer token authentication with SSL verification enabled
- Idempotent Callbacks -- Duplicate callbacks and webhooks are safely ignored
- Automatic Order Updates -- Payment status verified on customer return and via webhook
Requirements
- CS-Cart or Multi-Vendor 4.x
- PHP 7.1 or higher
- Safepay merchant account with API credentials (API Key, API Secret)
How It Works
- Customer selects Safepay at checkout and clicks "Place Order"
- The addon creates a checkout session via the Safepay API
- Customer is redirected to the Safepay hosted checkout page
- Customer completes payment using their preferred method
- Safepay redirects customer back to your store and sends a webhook notification
- The addon verifies the payment status and updates the order
Installation
- Go to Add-ons > Manage add-ons, click Manual installation, and upload the addon zip
- Activate the addon and enter the license key
- Go to Administration > Payment methods and create a new payment method
- Select "Safepay Payment Gateway" as the processor
- Enter your API Key, API Secret, and Webhook Secret from the Safepay dashboard
- Configure order status mappings as desired
- Save and test with sandbox mode before going live
Country & Currency
This addon is designed for merchants operating in Pakistan or accepting payments from Pakistani customers. Safepay supports PKR (Pakistani Rupee) and USD (US Dollar).
Security
- PCI SAQ A compliant -- no card data touches your server
- HMAC-SHA256 webhook signature verification with timing-safe comparison
- SSL peer verification enabled on all API requests
- Sensitive credentials stripped from all log entries
- Idempotent processing prevents duplicate order updates
