PHPackages                             ferus/fairpay-php-sdk - 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. ferus/fairpay-php-sdk

ActiveLibrary[Payment Processing](/categories/payments)

ferus/fairpay-php-sdk
=====================

PHP DSK to work with FairPay

11242PHP

Since Oct 30Pushed 11y ago1 watchersCompare

[ Source](https://github.com/nick-keller/fairpay-php-sdk)[ Packagist](https://packagist.org/packages/ferus/fairpay-php-sdk)[ RSS](/packages/ferus-fairpay-php-sdk/feed)WikiDiscussions master Synced today

READMEChangelogDependenciesVersions (1)Used By (0)

PHP SDK for FairPay
===================

[](#php-sdk-for-fairpay)

Instalation
-----------

[](#instalation)

### Avec Composer

[](#avec-composer)

Ajoutez cette ligne à votre composer.json

```
{
    "require": {
        "ferus/fairpay-php-sdk": "dev-master"
    }
}
```

Puis lancez la commande suivante :

```
php composer.phar update

```

### A la main

[](#a-la-main)

Copiez le contenue du dossier **src** dans votre projet.

Utilisation
-----------

[](#utilisation)

```
require_once __DIR__ . '/vendor/autoload.php'; // pour une instalation avec composer
require_once __DIR__ . '/Ferus/FairPayApi/FairPay.php'; // pour une instalation manuelle

use Ferus\FairPayApi\FairPay;

$fairpay = new FairPay();
$fairpay = new FairPay('api_s3cr3t');

$fairpay->setApiKey('api_s3cr3t');
$fairpay->setEndpoint('http://localhost/perso/api');

$fairpay->api('/students');
$fairpay->api('/students/{query}', 'get', array('query' => $query));

// Racourcis
$fairpay->getStudents();
$fairpay->getStudent($query);
$fairpay->searchStudents($query);
$fairpay->getBalance();
$fairpay->cash($client_id, $amount, $cause);
$fairpay->deposit($client_id, $amount);
```

### Gestion des erreurs

[](#gestion-des-erreurs)

```
use \Ferus\FairPayApi\Exception\CurlExecException;
use \Ferus\FairPayApi\Exception\ApiErrorException;

try{
    $fairpay->cash($client_id, $amount, $cause);
}
catch(CurlExecException $e){
    $e->message; // curl error message
}
catch(ApiErrorException $e){
    $e->message; // api error message
    $e->code; // http status code
    $e->returned_value; // full api responce
}
```

###  Health Score

23

—

LowBetter than 27% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity13

Limited adoption so far

Community9

Small or concentrated contributor base

Maturity41

Maturing project, gaining track record

 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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/ab6afc3945af8a7ea848aad2050646d07c8a5884e209ec439b0b7b33ebbdd5fb?d=identicon)[nick-keller](/maintainers/nick-keller)

---

Top Contributors

[![nick-keller](https://avatars.githubusercontent.com/u/2682443?v=4)](https://github.com/nick-keller "nick-keller (10 commits)")

### Embed Badge

![Health badge](/badges/ferus-fairpay-php-sdk/health.svg)

```
[![Health](https://phpackages.com/badges/ferus-fairpay-php-sdk/health.svg)](https://phpackages.com/packages/ferus-fairpay-php-sdk)
```

###  Alternatives

[omnipay/paypal

PayPal gateway for Omnipay payment processing library

3156.8M53](/packages/omnipay-paypal)[eduardokum/laravel-boleto

Biblioteca com boletos para o laravel

626351.9k2](/packages/eduardokum-laravel-boleto)[tbbc/money-bundle

This is a Symfony bundle that integrates moneyphp/money library (Fowler pattern): https://github.com/moneyphp/money.

1961.9M](/packages/tbbc-money-bundle)[2checkout/2checkout-php

2Checkout PHP Library

83740.3k2](/packages/2checkout-2checkout-php)[smhg/sepa-qr-data

Generate QR code data for SEPA payments

61717.2k5](/packages/smhg-sepa-qr-data)[omnipay/dummy

Dummy driver for the Omnipay payment processing library

271.2M33](/packages/omnipay-dummy)

PHPackages © 2026

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