PHPackages                             p4u1d34n0/opayo-payment-gateway - PHPackages - PHPackages  [Skip to content](#main-content)[PHPackages](/)[Directory](/)[Categories](/categories)[Trending](/trending)[Leaderboard](/leaderboard)[Changelog](/changelog)[Analyze](/analyze)[Collections](/collections)[Log in](/login)[Sign up](/register)

1. [Directory](/)
2. /
3. [Payment Processing](/categories/payments)
4. /
5. p4u1d34n0/opayo-payment-gateway

ActiveLibrary[Payment Processing](/categories/payments)

p4u1d34n0/opayo-payment-gateway
===============================

Production-ready Opayo (SagePay) payment gateway integration library for PHP with fixed signature verification

v1.0.0(6mo ago)00MITPHPPHP &gt;=8.1

Since Oct 24Pushed 3mo agoCompare

[ Source](https://github.com/p4u1d34n0/opayo-payment-gateway)[ Packagist](https://packagist.org/packages/p4u1d34n0/opayo-payment-gateway)[ Docs](https://github.com/p4u1d34n0/opayo-payment-gateway)[ RSS](/packages/p4u1d34n0-opayo-payment-gateway/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (6)Versions (2)Used By (0)

Opayo Payment Gateway - Production-Ready PHP Library
====================================================

[](#opayo-payment-gateway---production-ready-php-library)

[![Tests](https://camo.githubusercontent.com/3e2e8ff985efc97725dc6a3adf05ae8ede5a6b41cac28c15404b22ed5f5d1338/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f74657374732d32313525323070617373696e672d627269676874677265656e)](phpunit.xml)[![PHP Version](https://camo.githubusercontent.com/6518db1335bf20fdff07253dc6d6d0cec955b5fb6a8ef1382ac6d73687ecc07f/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344382e312d626c7565)](composer.json)[![License](https://camo.githubusercontent.com/b8cadaa967891081f8f165695470689986c028821dd8a040132f6e661795dc0d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d626c7565)](LICENSE)[![SOLID](https://camo.githubusercontent.com/aa0f44031b13a3e3410a16cab91e6afbf09abd405588eec9b3859b43f51db343/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6172636869746563747572652d534f4c49442d707572706c65)](docs/ARCHITECTURE.md)

A fully production-ready, well-tested PHP library for integrating with the Opayo (formerly SagePay) payment gateway. Features comprehensive error handling, PSR-3 logging, input validation, SOLID architecture, and 100% test coverage.

Features
--------

[](#features)

- **Production-Ready**: Complete error handling, validation, and logging
- **Modern PHP**: Requires PHP 8.1+, uses latest language features
- **Well-Tested**: 215 passing tests with 500+ assertions
- **SOLID Architecture**: Follows all SOLID principles for maintainability
- **PSR Compliant**: PSR-3 logging, PSR-4 autoloading, PSR-12 coding standards
- **Type-Safe**: Full type declarations and PHPDoc annotations
- **Secure**: Proper encryption, signature verification, and input validation
- **Flexible**: Support for both sandbox and live environments
- **Immutable**: Value objects for configuration and responses
- **Dependency Injection**: Easy to mock and test
- **Comprehensive Documentation**: Architecture guide, use cases, and migration docs

Installation
------------

[](#installation)

```
composer require p4u1d34n0/opayo-payment-gateway
```

Requirements
------------

[](#requirements)

- PHP &gt;= 8.1
- ext-openssl
- ext-mbstring
- guzzlehttp/guzzle ^7.8
- psr/log ^3.0

Quick Start
-----------

[](#quick-start)

### 1. Configuration

[](#1-configuration)

Create a `.env` file from the example:

```
cp .env.example .env
```

Edit `.env` and add your Opayo credentials:

```
OPAYO_VENDOR=your_vendor_name
OPAYO_ENCRYPTION_PASSWORD=your_encryption_password
OPAYO_ENVIRONMENT=sandbox
OPAYO_BASE_URL=https://yourdomain.com
```

### 2. Register a Transaction

[](#2-register-a-transaction)

```
