PHPackages                             papihack/paytech-php-client - 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. papihack/paytech-php-client

ActiveLibrary[API Development](/categories/api)

papihack/paytech-php-client
===========================

A PHP Client or SDK for PayTech Online Payment Gateway.

v1.0.7(5y ago)15838MITPHPPHP ^7.3CI passing

Since Jul 16Pushed 2mo ago2 watchersCompare

[ Source](https://github.com/PapiHack/paytech-php-client)[ Packagist](https://packagist.org/packages/papihack/paytech-php-client)[ RSS](/packages/papihack-paytech-php-client/feed)WikiDiscussions master Synced 1w ago

READMEChangelog (2)Dependencies (3)Versions (10)Used By (0)

PayTech - PHP API Client
========================

[](#paytech---php-api-client)

[![Coverage Status](https://camo.githubusercontent.com/32855e94577df9d0a30995653b17d33a5fbfdf644518f96ea0374313397d19b7/68747470733a2f2f696d672e736869656c64732e696f2f62616467652f636f7665726167652d3130302532352d627269676874677265656e)](https://coveralls.io/github/PapiHack/paytech-php-client?branch=master)[![Issues](https://camo.githubusercontent.com/09ca06d39f54bfae8cbb35aad5c7cac504a927c18d331b26f7242b6076679083/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f506170694861636b2f706179746563682d7068702d636c69656e74)](https://camo.githubusercontent.com/09ca06d39f54bfae8cbb35aad5c7cac504a927c18d331b26f7242b6076679083/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732f506170694861636b2f706179746563682d7068702d636c69656e74)[![PR](https://camo.githubusercontent.com/58d09110900d4de0115de51ae8c8fe25631f995c0939f377759251f36c8bf591/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732d70722f506170694861636b2f706179746563682d7068702d636c69656e74)](https://camo.githubusercontent.com/58d09110900d4de0115de51ae8c8fe25631f995c0939f377759251f36c8bf591/68747470733a2f2f696d672e736869656c64732e696f2f6769746875622f6973737565732d70722f506170694861636b2f706179746563682d7068702d636c69656e74)[![Latest Stable Version](https://camo.githubusercontent.com/c0d94dbec97d5c6b1b6f455795695b75bfd2ba3d4ece2c0c6b3abd23076e0138/68747470733a2f2f706f7365722e707567782e6f72672f706170696861636b2f706179746563682d7068702d636c69656e742f76)](//packagist.org/packages/papihack/paytech-php-client)[![Total Downloads](https://camo.githubusercontent.com/7b2a2328cf16f1e25b1cf3f2d1be63aa556da4d852e6042425df275ad4f84e0d/68747470733a2f2f706f7365722e707567782e6f72672f706170696861636b2f706179746563682d7068702d636c69656e742f646f776e6c6f616473)](//packagist.org/packages/papihack/paytech-php-client)[![Latest Unstable Version](https://camo.githubusercontent.com/45910ff5f0e77d2ef4a903367cda2cad4a376de460c2077b7e8e60ea416876c8/68747470733a2f2f706f7365722e707567782e6f72672f706170696861636b2f706179746563682d7068702d636c69656e742f762f756e737461626c65)](//packagist.org/packages/papihack/paytech-php-client)[![License](https://camo.githubusercontent.com/f2cd2f3d799a1f7fffc2174efaf06b2db0878bf17a7b8b2da210027caef0179d/68747470733a2f2f706f7365722e707567782e6f72672f706170696861636b2f706179746563682d7068702d636c69656e742f6c6963656e7365)](//packagist.org/packages/papihack/paytech-php-client)[![Open Source Love png1](https://camo.githubusercontent.com/64efc0e0925311a4459cca485ac029eb921b79790dc07e0e9c4032b5b9c83b9b/68747470733a2f2f6261646765732e66726170736f66742e636f6d2f6f732f76312f6f70656e2d736f757263652e706e673f763d313033)](https://github.com/ellerbrock/open-source-badges/)

This is a simple `SDK Client` or `API Client` for `PayTech Online Payment Gateway`.

Check out [PayTech SN Website](https://paytech.sn).

How to use it
-------------

[](#how-to-use-it)

First of all, install the package or library via composer

- `composer require papihack/paytech-php-client`

After that, setup the API config with your parameters like this :

```
    \PayTech\Config::setApiKey('your_api_key');
    \PayTech\Config::setApiSecret('your_api_secret');

    /*
     * you can set one of this two environment TEST or PROD
     * you can just set the env mode via \PayTech\Enums\Env::TEST or \PayTech\Enums\Env::PROD
     * Like the following example
     * !!! By default env is PROD !!!
     * You can also directly set test or prod as a string if you want
     * Like \PayTech\Config::setEnv('test') or \PayTech\Config::setEnv('prod')
    */

    \PayTech\Config::setEnv(\PayTech\Enums\Env::PROD);

    /*
     * The PayTech\Enums\Currency class defined authorized currencies
     * You can change XOF (in the following example) by USD, CAD or another currency
     * All allowed currencies are in \PayTech\Enums\Currency class
     * !!! Notice that XOF is the default currency !!!
    */

    \PayTech\Config::setCurrency(\PayTech\Enums\Currency::XOF);

    /* !!! Note that if you decide to set the ipn_url, it must be in https !!! */

    \PayTech\Config::setIpnUrl('your_ipn_url');
    \PayTech\Config::setSuccessUrl('your_success_url');
    \PayTech\Config::setCanceUrl('your_cancel_url');

    /*
     * if you want the mobile success or cancel page, you can set
     * the following parameter
    */

    \PayTech\Config::setIsMobile(true);
```

Then you can proceed with :

```
    $article_price = 15000;
    $article = new \PayTech\Invoice\InvoiceItem('article_name', $article_price, 'command_name', 'ref_command');

    /* You can also add custom data or fields like this */

    \PayTech\CustomField::set('your_field_name', 'your_field_value');

    /* Make the payment request demand to the API */

    \PayTech\PayTech::send($article);

    /* Get the API Response */

    $response = [
        'success'      => \PayTech\ApiResponse::getSuccess(),
        'errors'       => \PayTech\ApiResponse::getErrors(),
        'token'        => \PayTech\ApiResponse::getToken(),
        'redirect_url' => \PayTech\ApiResponse::getRedirectUrl(),
    ];
```

After that, if you have a success response, you can redirect your user to the `$response['redirect_url']` so that he can make the payment.
You can process the response as you wish by directly manipulating `\PayTech\ApiResponse`.

TODO
----

[](#todo)

- tests: cover all use cases ✅
- get the support team at [paytech.sn](https://paytech.sn) to clarify certain points

Contributing
------------

[](#contributing)

Feel free to make a PR or report an issue 😃

Regarding the tests, I use the elegant PHP Testing Framework [Pest](https://pestphp.com/) 😎

Oh, one more thing, please do not forget to put a description when you make your PR 🙂

Contributors
------------

[](#contributors)

- [M.B.C.M](https://itdev.herokuapp.com)[![My Twitter Link](https://camo.githubusercontent.com/ac4a3bd92f4f8b8ece10094e5921daa33604809da90627ab81622143afc5bfe4/68747470733a2f2f696d672e736869656c64732e696f2f747769747465722f666f6c6c6f772f7468655f69745f6465763f7374796c653d736f6369616c)](https://twitter.com/the_it_dev)

###  Health Score

39

—

LowBetter than 86% of packages

Maintenance56

Moderate activity, may be stable

Popularity21

Limited adoption so far

Community14

Small or concentrated contributor base

Maturity56

Maturing project, gaining track record

 Bus Factor1

Top contributor holds 95.9% 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

8

Last Release

2084d ago

PHP version history (2 changes)1.0.0PHP ^7.2

v1.0.2PHP ^7.3

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/26209571?v=4)[Meissa (Papi) Mbaye](/maintainers/PapiHack)[@PapiHack](https://github.com/PapiHack)

---

Top Contributors

[![PapiHack](https://avatars.githubusercontent.com/u/26209571?v=4)](https://github.com/PapiHack "PapiHack (70 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (2 commits)")[![Kepsondiaz](https://avatars.githubusercontent.com/u/67605105?v=4)](https://github.com/Kepsondiaz "Kepsondiaz (1 commits)")

---

Tags

apisdklibraryphp-sdkclient apiphp clientOrange Moneypaiementpaiement en ligneSénégalPlateforme de paiement en ligne AfriquePaiement SénégalPasserelle de paiement en ligneclient phppaytechpaytech.snpaytech php sdk

###  Code Quality

TestsPest

### Embed Badge

![Health badge](/badges/papihack-paytech-php-client/health.svg)

```
[![Health](https://phpackages.com/badges/papihack-paytech-php-client/health.svg)](https://phpackages.com/packages/papihack-paytech-php-client)
```

###  Alternatives

[deepseek-php/deepseek-php-client

deepseek PHP client is a robust and community-driven PHP client library for seamless integration with the Deepseek API, offering efficient access to advanced AI and data processing capabilities.

47073.9k5](/packages/deepseek-php-deepseek-php-client)[fabian-beiner/todoist-php-api-library

A PHP client library that provides a native interface to the official Todoist REST API.

4810.8k](/packages/fabian-beiner-todoist-php-api-library)[qwen-php/qwen-php-client

robust and community-driven PHP SDK library for seamless integration with the qwen AI API, offering efficient access to advanced AI and data processing capabilities

213.2k1](/packages/qwen-php-qwen-php-client)

PHPackages © 2026

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