PHPackages                             acoriss/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. acoriss/payment-gateway

ActiveLibrary[Payment Processing](/categories/payments)

acoriss/payment-gateway
=======================

PHP SDK for Acoriss Payment Gateway

v0.1.4(4mo ago)06MITPHPPHP &gt;=8.1CI passing

Since Nov 15Pushed 4mo agoCompare

[ Source](https://github.com/Acoriss-RDC/payment-gateway-php-sdk)[ Packagist](https://packagist.org/packages/acoriss/payment-gateway)[ RSS](/packages/acoriss-payment-gateway/feed)WikiDiscussions main Synced 1mo ago

READMEChangelog (2)Dependencies (5)Versions (6)Used By (0)

Acoriss Payment Gateway PHP SDK
===============================

[](#acoriss-payment-gateway-php-sdk)

[![CI Status](https://github.com/acoriss/payment-gateway-php-sdk/workflows/CI/badge.svg)](https://github.com/acoriss/payment-gateway-php-sdk/actions)[![PHP Version](https://camo.githubusercontent.com/7663c9d53dc13cedaf0660a8745a7e77d2dd711257f36aa86ebce12a0600ef42/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f7068702d253345253344382e312d626c75652e737667)](https://php.net)[![License](https://camo.githubusercontent.com/8bb50fd2278f18fc326bf71f6e88ca8f884f72f179d3e555e20ed30157190d0d/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f6c6963656e73652d4d49542d677265656e2e737667)](https://opensource.org/licenses/MIT)

A PHP SDK for interacting with the Acoriss Payment Gateway API. Mirrors the functionality of the existing Node.js SDK: creating payment sessions and retrieving payments.

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

[](#installation)

Require via Composer (after publishing to Packagist or using VCS repo):

```
composer require acoriss/payment-gateway
```

For local development inside this monorepo:

```
cd sdks/php
composer install
```

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

[](#quick-start)

```
use Acoriss\PaymentGateway\Client;

$client = new Client([
    'apiKey' => 'your-api-key',
    'apiSecret' => 'your-api-secret', // enables automatic HMAC-SHA256 signing
    // 'environment' => 'live', // default is 'sandbox'
]);

$session = $client->createSession([
    'amount' => 5000,
    'currency' => 'USD',
    'customer' => [
        'email' => 'john@example.com',
        'name' => 'John Doe'
    ],
    'description' => 'Order #1234',
    'serviceId' => 'service_123' // Optional: specify a service
]);

echo $session['checkoutUrl'];

$payment = $client->getPayment($session['id']);
print_r($payment);
```

Configuration Options
---------------------

[](#configuration-options)

KeyTypeDescriptionapiKeystringRequired API keyapiSecretstringOptional secret for HMAC signingenvironment`sandboxlive`baseUrlstringOverrides environment base URLsigner`SignerInterface`Custom signing strategytimeoutfloatTimeout in seconds (default 15)logger`LoggerInterface`PSR-3 logger for debugging (default: NullLogger)verifybool|stringSSL certificate verification (default: true)Features
--------

[](#features)

### Signing

[](#signing)

- `createSession` signs the raw JSON request body.
- `getPayment` signs only the payment ID string.
- Provide either `apiSecret`, a custom `SignerInterface`, or pass `signatureOverride` per call.

### Webhook Verification

[](#webhook-verification)

Verify webhook signatures to ensure authenticity:

```
$payload = file_get_contents('php://input');
$signature = $_SERVER['HTTP_X_SIGNATURE'] ?? '';

if ($client->verifyWebhookSignature($payload, $signature)) {
    $data = json_decode($payload, true);
    // Process webhook
} else {
    http_response_code(401);
    echo 'Invalid signature';
}
```

### PSR-3 Logging

[](#psr-3-logging)

Add a PSR-3 compatible logger for debugging:

```
use Monolog\Logger;
use Monolog\Handler\StreamHandler;

$logger = new Logger('payment-gateway');
$logger->pushHandler(new StreamHandler('path/to/your.log', Logger::DEBUG));

$client = new Client([
    'apiKey' => 'your-api-key',
    'apiSecret' => 'your-api-secret',
    'logger' => $logger,
]);
```

Logs include:

- Debug: Client initialization, request details
- Info: Successful operations
- Error: Failures and exceptions

Error Handling
--------------

[](#error-handling)

All API/network errors throw `Acoriss\PaymentGateway\Exceptions\APIException` exposing:

```
try {
    $client->createSession($payload);
} catch (\Acoriss\PaymentGateway\Exceptions\APIException $e) {
    echo $e->getMessage();
    var_dump($e->getStatus(), $e->getData(), $e->getHeaders());
}
```

Development
-----------

[](#development)

### Running Tests

[](#running-tests)

```
composer install
composer test
```

### Static Analysis

[](#static-analysis)

Run PHPStan for type safety:

```
composer analyse
```

### Code Style

[](#code-style)

Format code with PHP-CS-Fixer:

```
# Fix code style
composer format

# Check without fixing
composer format-check
```

Versioning &amp; Compatibility
------------------------------

[](#versioning--compatibility)

SDK targets PHP &gt;= 8.1 and Guzzle 7.x.

License
-------

[](#license)

MIT

###  Health Score

32

—

LowBetter than 72% of packages

Maintenance74

Regular maintenance activity

Popularity4

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity37

Early-stage or recently created project

 Bus Factor1

Top contributor holds 100% of commits — single point of failure

How is this calculated?**Maintenance (25%)** — Last commit recency, latest release date, and issue-to-star ratio. Uses a 2-year decay window.

**Popularity (30%)** — Total and monthly downloads, GitHub stars, and forks. Logarithmic scaling prevents top-heavy scores.

**Community (15%)** — Contributors, dependents, forks, watchers, and maintainers. Measures real ecosystem engagement.

**Maturity (30%)** — Project age, version count, PHP version support, and release stability.

###  Release Activity

Cadence

Every ~7 days

Total

5

Last Release

147d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/ec5b291ea7640c68c684d4bdd6dce84f5736263f70b0a98475eb96ccde275339?d=identicon)[theblackman2](/maintainers/theblackman2)

---

Top Contributors

[![theblackman2](https://avatars.githubusercontent.com/u/104510010?v=4)](https://github.com/theblackman2 "theblackman2 (8 commits)")

###  Code Quality

TestsPHPUnit

Static AnalysisPHPStan

Code StylePHP CS Fixer

Type Coverage Yes

### Embed Badge

![Health badge](/badges/acoriss-payment-gateway/health.svg)

```
[![Health](https://phpackages.com/badges/acoriss-payment-gateway/health.svg)](https://phpackages.com/packages/acoriss-payment-gateway)
```

###  Alternatives

[dnetix/redirection

Library to connect with PlacetoPay Checkout service

17123.3k2](/packages/dnetix-redirection)[buckaroo/sdk

Buckaroo payment SDK

12189.1k9](/packages/buckaroo-sdk)[aedart/athenaeum

Athenaeum is a mono repository; a collection of various PHP packages

255.2k](/packages/aedart-athenaeum)[amazonpaymentservices/aps-php-sdk

Amazon Payment Services PHP SDK

3114.6k](/packages/amazonpaymentservices-aps-php-sdk)[contica/facturador-electronico-cr

Un facturador de código libre para integrar facturación electrónica en Costa Rica a un proyecto PHP

2128.8k](/packages/contica-facturador-electronico-cr)

PHPackages © 2026

[Directory](/)[Categories](/categories)[Trending](/trending)[Changelog](/changelog)[Analyze](/analyze)
