PHPackages                             mcire/paytech - 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. mcire/paytech

ActiveLibrary

mcire/paytech
=============

Integration of PayTech payment gateway for Laravel

v1.0.0(1y ago)07MITPHPPHP &gt;=8.0

Since Dec 29Pushed 1y ago1 watchersCompare

[ Source](https://github.com/Babyd12/mcire-paytech)[ Packagist](https://packagist.org/packages/mcire/paytech)[ RSS](/packages/mcire-paytech/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependencies (1)Versions (3)Used By (0)

PayTech Package for Laravel
===========================

[](#paytech-package-for-laravel)

This package provides an easy integration of the PayTech payment gateway into your Laravel applications.

[![Laravel Logo](https://raw.githubusercontent.com/laravel/art/master/logo-lockup/5%20SVG/2%20CMYK/1%20Full%20Color/laravel-logolockup-cmyk-red.svg)](https://laravel.com)

[![Laravel Logo](https://camo.githubusercontent.com/f20ad2930f34a3f545388265777f16c3d640f28359d09c741f0a60084e3bf400/68747470733a2f2f706179746563682e736e2f6173736574732f737263732f696d672f6c6f676f5f706179746563682e706e67)](https://paytech.sn/)

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

[](#installation)

🧿 Prerequisite
--------------

[](#-prerequisite)

You have already created a controller for payments, an associated route and a view containing the product purchase form.

```
composer require guzzlehttp/guzzle
```

```
use App\Http\Controllers\PaymentController;

Route::post('/checkout', [PaymentController::class, 'payment'])->name('payment.submit');
Route::get('ipn', [PaymentController::class, 'ipn'])->name('paytech-ipn');
Route::get('payment/success', [PaymentController::class, 'paymentSuccessView'])->name('payment.success.view');
Route::get('payment/cancel', [PaymentController::class, 'cancel'])->name('paytech.cancel');
```

⬇ Install now
-------------

[](#-install-now)

```
composer require mcire/paytech
```

The package discovery is enabled by default in Laravel 5.5+. If you're using an earlier version, manually add the service provider and facade in `config/app.php`:

```
'providers' => [
    // ...
    Mcire\PayTech\PayTechServiceProvider::class,
],

'aliases' => [
    // ...
    'PayTech' => Mcire\PayTech\Facades\PayTech::class,
],
```

Configuration
-------------

[](#configuration)

Publish the configuration file:

```
php artisan vendor:publish --tag=config
```

Add the following variables to your `.env` file:

```
PAYTECH_API_KEY=your_api_key
PAYTECH_API_SECRET=your_api_secret
PAYTECH_ENV=test # or 'prod' for production
PAYTECH_IPN_URL=https://your-domain.com/ipn
PAYTECH_SUCCESS_URL=https://your-domain.com/success
PAYTECH_CANCEL_URL=https://your-domain.com/cancel
```

Tips for configuring PayTech's IPN locally
------------------------------------------

[](#tips-for-configuring-paytechs-ipn-locally)

PayTech requires the callback route (IPN) to be accessible via HTTPS. This can pose a challenge during local development.

If you don't need to handle IPN calls :
---------------------------------------

[](#if-you-dont-need-to-handle-ipn-calls-)

simply configure the IPN URL as follows

```
  PAYTECH_IPN_URL=https://127.0.0.1:8000/ipn
```

If you need to handle IPN calls locally:
----------------------------------------

[](#if-you-need-to-handle-ipn-calls-locally)

- Use an HTTPS proxy like Ngrok. 🔗 Links
    -------

    [](#-links)

[![Ngork](https://camo.githubusercontent.com/7b8e5afa404a99390a2eec1e4130425e4c1885ab730825362757a989f86f23ba/68747470733a2f2f6e67726f6b2e636f6d2f646f63732f696d672f6e67726f6b2d626c61636b2e737667)](https://ngrok.com/docs/getting-started/)

Usage
-----

[](#usage)

### Initiating a Payment (Put it inside your payment controller)

[](#initiating-a-payment-put-it-inside-your-payment-controller)

```
use Mcire\PayTech\Facades\PayTech;

try {
    $response = PayTech::requestPayment([
        'item_name' => 'Product name',
        'item_price' => 1000, // Price in cents
        'currency' => 'XOF',
        'ref_command' => Str::random(12), // Unique reference
        'command_name' => 'Order description',
    ]);

    // Redirect to PayTech payment page
    return redirect($response['redirect_url']);
} catch (\Exception $e) {
    // Error handling
    abort(500, $e->getMessage());
}
```

```
php artisan serve
```

### Available Parameters

[](#available-parameters)

ParameterTypeDescriptionRequireditem\_namestringProduct nameYesitem\_priceintegerPrice in centsYescurrencystringCurrency (XOF, EUR, etc.)Yesref\_commandstringUnique order referenceYescommand\_namestringOrder descriptionYes### Handling Returns

[](#handling-returns)

The package automatically handles three types of returns:

1. **IPN (Instant Payment Notification)**

    - URL configured in `PAYTECH_IPN_URL`
    - Server-to-server notification from PayTech
    - Used to update order status
2. **Success Page**

    - URL configured in `PAYTECH_SUCCESS_URL`
    - Redirection after successful payment
3. **Cancel Page**

    - URL configured in `PAYTECH_CANCEL_URL`
    - Redirection after payment cancellation

Environments
------------

[](#environments)

The package supports two environments:

- test: For testing (default)
- prod: For production

Configure the environment via the `PAYTECH_ENV` variable in your `.env` file.

Security
--------

[](#security)

- All requests are made over HTTPS
- API keys are securely stored in the `.env` file
- Communications are authenticated via API\_KEY and API\_SECRET headers

Common Error Codes
------------------

[](#common-error-codes)

CodeDescriptionSolution400Invalid parametersCheck the sent parameters401Authentication failedVerify your API keys500Server errorContact PayTech supportSupport
-------

[](#support)

For any questions or issues:

- Open an issue on GitHub
- Contact me at

License
-------

[](#license)

This package is open-sourced software licensed under the MIT license. See the LICENSE file for more details. This package provides an easy integration of the PayTech payment gateway into your Laravel applications.

###  Health Score

25

—

LowBetter than 37% of packages

Maintenance40

Moderate activity, may be stable

Popularity4

Limited adoption so far

Community7

Small or concentrated contributor base

Maturity44

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.

###  Release Activity

Cadence

Every ~0 days

Total

2

Last Release

506d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/5470a9e0656a73c60db35b0462ac5a0332f7c6c5673d4fbab96c11600a73862e?d=identicon)[Babyd12](/maintainers/Babyd12)

---

Top Contributors

[![Babyd12](https://avatars.githubusercontent.com/u/64022663?v=4)](https://github.com/Babyd12 "Babyd12 (9 commits)")

### Embed Badge

![Health badge](/badges/mcire-paytech/health.svg)

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

###  Alternatives

[neuron-core/neuron-ai

The PHP Agentic Framework.

1.8k245.3k21](/packages/neuron-core-neuron-ai)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3731.2M42](/packages/tencentcloud-tencentcloud-sdk-php)[aedart/athenaeum

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

245.2k](/packages/aedart-athenaeum)

PHPackages © 2026

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