PHPackages                             nexylan/paybox-direct - 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. [API Development](/categories/api)
4. /
5. nexylan/paybox-direct

ActiveLibrary[API Development](/categories/api)

nexylan/paybox-direct
=====================

PayBox Direct and Direct Plus API wrapper

v0.4.0(5y ago)628.2k9[7 issues](https://github.com/nexylan/paybox-direct/issues)[2 PRs](https://github.com/nexylan/paybox-direct/pulls)MITPHPPHP ^7.4 || ^8.0

Since May 3Pushed 5y ago4 watchersCompare

[ Source](https://github.com/nexylan/paybox-direct)[ Packagist](https://packagist.org/packages/nexylan/paybox-direct)[ RSS](/packages/nexylan-paybox-direct/feed)WikiDiscussions master Synced 1mo ago

READMEChangelogDependencies (12)Versions (13)Used By (0)

PayboxDirect SDK
================

[](#payboxdirect-sdk)

Paybox Direct and Paybox Direct Plus PHP SDK.

[![Latest Stable Version](https://camo.githubusercontent.com/5902a48b68ff4464d39c2d319619bb9460b731155892518a76e2335dbde5deeb/68747470733a2f2f706f7365722e707567782e6f72672f6e6578796c616e2f706179626f782d6469726563742f762f737461626c65)](https://packagist.org/packages/nexylan/paybox-direct)[![Latest Unstable Version](https://camo.githubusercontent.com/fdd210bce02dfe8ce6074db99c1a954bdad63566474e22b06187dda0d0c2c715/68747470733a2f2f706f7365722e707567782e6f72672f6e6578796c616e2f706179626f782d6469726563742f762f756e737461626c65)](https://packagist.org/packages/nexylan/paybox-direct)[![License](https://camo.githubusercontent.com/a202c81237565f79571d17c2a703ddf6aff809e6c550b80b6b64f620764b2627/68747470733a2f2f706f7365722e707567782e6f72672f6e6578796c616e2f706179626f782d6469726563742f6c6963656e7365)](https://packagist.org/packages/nexylan/paybox-direct)[![Dependency Status](https://camo.githubusercontent.com/fd27e214a1e2d48c2aa1fde580bc9a4bba1e4e3116505ec7f290bb67a6b55f68/68747470733a2f2f7777772e76657273696f6e6579652e636f6d2f7068702f6e6578796c616e3a706179626f782d6469726563742f62616467652e737667)](https://www.versioneye.com/php/nexylan:paybox-direct)[![Reference Status](https://camo.githubusercontent.com/05b25e8398f60948eef3f0723ed51928229f3c4b92fb9fa148c674804386caa9/68747470733a2f2f7777772e76657273696f6e6579652e636f6d2f7068702f6e6578796c616e3a706179626f782d6469726563742f7265666572656e63655f62616467652e737667)](https://www.versioneye.com/php/nexylan:paybox-direct/references)

[![Total Downloads](https://camo.githubusercontent.com/04f538a01311e4ab14a3accdf8985bb137ae5f795c92faa8fd65537a76ccc2b3/68747470733a2f2f706f7365722e707567782e6f72672f6e6578796c616e2f706179626f782d6469726563742f646f776e6c6f616473)](https://packagist.org/packages/nexylan/paybox-direct)[![Monthly Downloads](https://camo.githubusercontent.com/45b5e746dcd46118a17b08db993a9e3facf1981252adfd264ff0238c4691a9b6/68747470733a2f2f706f7365722e707567782e6f72672f6e6578796c616e2f706179626f782d6469726563742f642f6d6f6e74686c79)](https://packagist.org/packages/nexylan/paybox-direct)[![Daily Downloads](https://camo.githubusercontent.com/fbe9ba13e7fec15021fc4552a7019135af9daf20d278a8c9183d838013b3b40d/68747470733a2f2f706f7365722e707567782e6f72672f6e6578796c616e2f706179626f782d6469726563742f642f6461696c79)](https://packagist.org/packages/nexylan/paybox-direct)

[![Build Status](https://camo.githubusercontent.com/abb522e6ecfde9148471a4936612fd559a3575369f1e7b54f8109c4a84c3ec09/68747470733a2f2f7472617669732d63692e6f72672f6e6578796c616e2f706179626f782d6469726563742e7376673f6272616e63683d6d6173746572)](https://travis-ci.org/nexylan/paybox-direct)[![Scrutinizer Code Quality](https://camo.githubusercontent.com/c25b68837de8154943044562ecd15466f7623172d9a58c424b750ac2bffe2e0d/68747470733a2f2f7363727574696e697a65722d63692e636f6d2f672f6e6578796c616e2f706179626f782d6469726563742f6261646765732f7175616c6974792d73636f72652e706e673f623d6d6173746572)](https://scrutinizer-ci.com/g/nexylan/paybox-direct/?branch=master)[![Code Climate](https://camo.githubusercontent.com/a13bfe58eaf7bece1be45df726f005d96a349dc1ade79ffec6a8fdcfd6b0dfb6/68747470733a2f2f636f6465636c696d6174652e636f6d2f6769746875622f6e6578796c616e2f706179626f782d6469726563742f6261646765732f6770612e737667)](https://codeclimate.com/github/nexylan/paybox-direct)[![Coverage Status](https://camo.githubusercontent.com/75dd0299d545a2261f54c8b57dfcde6e7c6702bb10f60a5d482f1a67a1d5bc1e/68747470733a2f2f636f766572616c6c732e696f2f7265706f732f6e6578796c616e2f706179626f782d6469726563742f62616467652e7376673f6272616e63683d6d6173746572)](https://coveralls.io/r/nexylan/paybox-direct?branch=master)[![SensioLabsInsight](https://camo.githubusercontent.com/f9b97653a60a7ac73447dba38a628463ac9016352456202a3cceb3da5ba19636/68747470733a2f2f696e73696768742e73656e73696f6c6162732e636f6d2f70726f6a656374732f65633764363730632d373165332d346331612d386331322d6439316131633930633261372f6d696e692e706e67)](https://insight.sensiolabs.com/projects/ec7d670c-71e3-4c1a-8c12-d91a1c90c2a7)

Documentation
-------------

[](#documentation)

All the installation and usage instructions are located in this README. Check it for a specific versions:

- [**0.x**](https://github.com/nexylan/paybox-direct/tree/master) with support for Symfony `^2.7 || ^3.0`

Prerequisites
-------------

[](#prerequisites)

This version of the project requires:

- PHP 7.4+
- Symfony 2.7+ for bundle integration

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

[](#installation)

First of all, you need to require this library through Composer:

```
composer require nexylan/paybox-direct
```

After this, you can use it as is.

If you are using it on a **Symfony** project, you should read the following instructions for a better integration.

### As a Symfony bundle

[](#as-a-symfony-bundle)

If your project **is not using** [Symfony Full Stack](http://symfony.com/projects/symfonyfs), you must add the following dependencies:

```
composer require symfony/dependency-injection symfony/http-kernel
```

Register the bundle in the kernel of your application:

```
// app/AppKernel.php

public function registerBundles()
{
    $bundles = array(
        // ...
        new Nexy\PayboxDirect\Bridge\Symfony\Bundle\NexyPayboxDirectBundle(),
    );

    // ...

    return $bundles;
}
```

Some configuration is required. Here is the default one:

```
nexy_paybox_direct:
    client:               null
    options:
        timeout:              ~
        production:           ~
    paybox:               # Required
        version:              ~ # Required
        site:                 ~ # Required
        rank:                 ~ # Required
        identifier:           ~ # Required
        key:                  ~ # Required
        default_currency:     ~
        default_activity:     ~
```

Usage
-----

[](#usage)

### Get the client instance

[](#get-the-client-instance)

To communicate with the Paybox Direct (Plus) API, you have to instantiate the `Paybox` class:

```
use Nexy\PayboxDirect\Enum\Version;
use Nexy\PayboxDirect\Paybox;

$paybox = new Paybox([
    // Optional parameters:
    'timeout' => 30,        // Change the request timeout.
    'production' => true,   // Set to true to use the production API URL.
    // Required parameters:
    'paybox_version' => Version::DIRECT_PLUS,
    'paybox_site' => '1999888',
    'paybox_rank' => '32',
    'paybox_identifier' => '107904482',
    'paybox_key' => '1999888I',
]);
```

If you are using the Symfony bundle bridge, all the parameters are already defined on the configuration side.

All you have to do is call the paybox service:

```
/** @var \Nexy\PayboxDirect\Paybox $paybox */
$paybox = $this->container->get('nexy_paybox_direct.sdk');
```

### Make a request

[](#make-a-request)

Here is a commented example of how to make a Paybox Direct request with the SDK:

```
use Nexy\PayboxDirect\Exception\PayboxException;
use Nexy\PayboxDirect\Request\AuthorizeAndCaptureRequest;

$request = new AuthorizeAndCaptureRequest('CMD-42', 1000, '1111222233334444', '1224');
$request->setCardVerificationValue('123');
try {
    /** @var \Nexy\PayboxDirect\Response\DirectResponse $response */
    $response = $paybox->sendDirectRequest($request);
} catch (PayboxException $e) {
    echo $e->getMessage(); // Prints the Paybox error message.
    /** @var \Nexy\PayboxDirect\Response\DirectResponse $response */
    $response = $e->getResponse(); // Returns the response object if you want to manipulate it.
}
// Do stuff with the response!
```

If you want to do the same via the Direct Plus protocol with a subscriber reference:

```
$request = new AuthorizeAndCaptureRequest('CMD-42', 1000, 'subscriberCardRef', '1224', 'subscriberRef');
try {
    /** @var \Nexy\PayboxDirect\Response\DirectPlusResponse $response */
    $response = $paybox->sendDirectPlusRequest($request);
} catch (PayboxException $e) {
    echo $e->getMessage(); // Prints the Paybox error message.
    /** @var \Nexy\PayboxDirect\Response\DirectPlusResponse $response */
    $response = $e->getResponse(); // Returns the response object if you want to manipulate it.
}
// Do stuff with the response!
```

Note that you have to use `Paybox::sendDirectPlusRequest` method that returns a `DirectPlusResponse` object.

### Requests reference

[](#requests-reference)

Here is a table listing all the available requests:

Request ID`RequestInterface``Paybox` method`ResponseInterface`00001`AuthorizeRequest``sendDirectRequest``DirectResponse`00002`DebitRequest``sendDirectRequest``DirectResponse`00003`AuthorizeAndCaptureRequest``sendDirectRequest``DirectResponse`00004`CreditRequest``sendDirectRequest``DirectResponse`00005`CancelRequest``sendDirectRequest``DirectResponse`00013`UpdateAmountRequest``sendDirectRequest``DirectResponse`00014`RefundRequest``sendDirectRequest``DirectResponse`00017`InquiryRequest``sendInquiryRequest``InquiryResponse`00051`AuthorizeRequest``sendDirectPlusRequest``DirectPlusResponse`00052`DebitRequest``sendDirectPlusRequest``DirectPlusResponse`00053`AuthorizeAndCaptureRequest``sendDirectPlusRequest``DirectPlusResponse`00054`CreditRequest``sendDirectPlusRequest``DirectPlusResponse`00055`SubscriberCancelTransactionRequest``sendDirectPlusRequest``DirectPlusResponse`00056`SubscriberRegisterRequest``sendDirectPlusRequest``DirectPlusResponse`00057`SubscriberUpdateRequest``sendDirectPlusRequest``DirectPlusResponse`00058`SubscriberDeleteRequest``sendDirectPlusRequest``DirectPlusResponse`

###  Health Score

31

—

LowBetter than 68% of packages

Maintenance0

Infrequent updates — may be unmaintained

Popularity29

Limited adoption so far

Community18

Small or concentrated contributor base

Maturity65

Established project with proven stability

 Bus Factor1

Top contributor holds 96.8% 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 ~153 days

Recently: every ~259 days

Total

12

Last Release

1976d ago

PHP version history (2 changes)v0.1.0PHP ^5.6 || ^7.0

v0.4.0PHP ^7.4 || ^8.0

### Community

Maintainers

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

![](https://www.gravatar.com/avatar/3464715fc41a73a18c672fb02d88f6a38d98f961be390358597a7f14b269b3fd?d=identicon)[gallart](/maintainers/gallart)

![](https://www.gravatar.com/avatar/1a1663912e3590e776c4452caca8b9f92930ff89a900c8447094090c27cc80b7?d=identicon)[flubble](/maintainers/flubble)

---

Top Contributors

[![soullivaneuh](https://avatars.githubusercontent.com/u/1698357?v=4)](https://github.com/soullivaneuh "soullivaneuh (61 commits)")[![Byidi](https://avatars.githubusercontent.com/u/8182848?v=4)](https://github.com/Byidi "Byidi (1 commits)")[![greg0ire](https://avatars.githubusercontent.com/u/657779?v=4)](https://github.com/greg0ire "greg0ire (1 commits)")

---

Tags

apisymfonydirectpaybox

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/nexylan-paybox-direct/health.svg)

```
[![Health](https://phpackages.com/badges/nexylan-paybox-direct/health.svg)](https://phpackages.com/packages/nexylan-paybox-direct)
```

###  Alternatives

[sylius/sylius

E-Commerce platform for PHP, based on Symfony framework.

8.4k5.6M648](/packages/sylius-sylius)[ec-cube/ec-cube

EC-CUBE EC open platform.

78527.0k1](/packages/ec-cube-ec-cube)[jasonroman/nba-api

PHP Library to request data from various endpoints on NBA websites

994.6k](/packages/jasonroman-nba-api)[mtarld/api-platform-ms-bundle

API Platform Microservice Bundle

7124.5k](/packages/mtarld-api-platform-ms-bundle)

PHPackages © 2026

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