azaharizaman / nexus-payment-gateway
Payment gateway extension providing integrations with Stripe, PayPal, Square, and other online payment processors
Package info
github.com/azaharizaman/nexus-payment-gateway
pkg:composer/azaharizaman/nexus-payment-gateway
Requires
- php: ^8.3
- azaharizaman/nexus-common: dev-main
- azaharizaman/nexus-connector: dev-main
- psr/event-dispatcher: ^1.0
- psr/http-client: ^1.0
- psr/log: ^3.0
Requires (Dev)
- friendsofphp/php-cs-fixer: ^3.0
- phpstan/phpstan: ^1.10
- phpunit/phpunit: ^10.0
Suggests
- azaharizaman/nexus-payment: dev-main
This package is auto-updated.
Last update: 2026-05-05 03:04:19 UTC
README
Version: 0.1.0
Status: In Development
PHP: ^8.3
Extends: azaharizaman/nexus-payment
Overview
Nexus\PaymentGateway is an extension package for Nexus\Payment providing integrations with online payment processors like Stripe, PayPal, Square, Adyen, and regional gateways. This package handles tokenization, authorization, capture, refunds, and webhook processing.
Installation
composer require azaharizaman/nexus-payment-gateway
Features
- Multi-Gateway Support - Stripe, PayPal, Square, Adyen, Braintree
- Tokenization - Secure card tokenization (PCI DSS compliant)
- Payment Intents - 3D Secure / SCA support
- Webhooks - Standardized webhook handling
- Refunds - Full and partial refunds
- Disputes - Chargeback handling
Security & PCI Compliance
CRITICAL: This package is designed to minimize PCI scope.
- Never Store PAN/CVV: You must NEVER store raw credit card numbers (PAN) or CVV codes in your database or logs.
- Use Tokenization: Always use client-side tokenization (e.g., Stripe Elements, PayPal JS SDK) to send card data directly to the gateway. Your server should only receive a
payment_method_idortoken. - Logging Redaction: Ensure your logging configuration redacts sensitive fields. This package's DTOs are designed to carry tokens, not raw card data.
Quick Start
use Nexus\PaymentGateway\Contracts\GatewayManagerInterface; final readonly class OnlinePaymentService { public function __construct( private GatewayManagerInterface $gatewayManager, ) {} public function charge(string $gateway, ChargeRequest $request): ChargeResult { $processor = $this->gatewayManager->getProcessor($gateway); return $processor->charge($request); } }
Supported Gateways
| Gateway | Status | Features |
|---|---|---|
| Stripe | Planned | Cards, ACH, SEPA, 3DS |
| PayPal | Planned | PayPal, Venmo |
| Square | Planned | Cards, Apple Pay |
| Adyen | Planned | Cards, Local Methods |
| Braintree | Planned | Cards, PayPal |
Documentation
License
MIT License. See LICENSE for details.