ysg / payment-core
Core payment abstractions, contracts and DTOs for Laravel payment integrations.
v1.0.1
2026-07-13 17:47 UTC
Requires
- php: ^8.3
- illuminate/contracts: ^11.0 || ^12.0 || ^13.0
- illuminate/support: ^11.0 || ^12.0 || ^13.0
README
Core payment abstractions and contracts for Laravel payment integrations.
Features
- Provider-agnostic payment contracts
- Immutable DTOs
- Shared payment responses
- Shared exceptions
- SOLID architecture
- Designed for extension
Requirements
- PHP 8.3+
- Laravel 11+
Installation
composer require ysg/payment-core
Purpose
This package contains the shared abstractions used by payment provider implementations.
It intentionally contains no provider-specific code.
Provider packages (such as ysg/laravel-mpesa) implement the contracts defined here.
Included
- PaymentProcessor contract
- PaymentRequest
- PaymentResponse
- Money
- Payer
- AccessToken
- Shared payment exceptions
License
MIT