PHPackages                             yazzzon/mps-payment-library - 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. yazzzon/mps-payment-library

ActiveLibrary[Payment Processing](/categories/payments)

yazzzon/mps-payment-library
===========================

library helps to integrate with MPS Payment Gateway

00PHP

Since Jul 30Pushed 9mo agoCompare

[ Source](https://github.com/yazankaakeh/mps-payment-gateway)[ Packagist](https://packagist.org/packages/yazzzon/mps-payment-library)[ RSS](/packages/yazzzon-mps-payment-library/feed)WikiDiscussions main Synced 1mo ago

READMEChangelogDependenciesVersions (1)Used By (0)

💳 MPS Payment Gateway SDK for PHP
=================================

[](#-mps-payment-gateway-sdk-for-php)

A lightweight, secure, and easy-to-use PHP SDK for integrating with the **MPS Payment Gateway**.
This package allows you to authenticate using client credentials and create payments with full control and validation.

---

🚀 Features
----------

[](#-features)

- 🌐 Token-based authentication (Client Credentials)
- 🧾 Secure payment creation
- ✅ Strong data validation with typed request DTO
- ⚙️ Built with GuzzleHTTP
- 📦 PSR-4 autoloaded and Composer-ready

---

🧱 Installation
--------------

[](#-installation)

Install via [Composer](https://getcomposer.org):

```
composer require yazzzon/mps-payment-library
```

Then run:

```
composer update
```

---

⚙️ Environment Setup
--------------------

[](#️-environment-setup)

Create a .env file in your project root:

```
PAYMENT_BASE_URL=https://your-gateway.com
PAYMENT_CLIENT_ID=your-client-id
PAYMENT_CLIENT_SECRET=your-client-secret
```

---

🧠 Usage
-------

[](#-usage)

### 1. Authenticate

[](#1-authenticate)

```
use Yazan\MpsLibrary\MpsPayment;

$gateway = new MpsPayment(); // values loaded from .env

if ($gateway->authenticate()) {
    echo "Authenticated successfully!";
} else {
    echo "Authentication failed!";
}
```

### 2. Create a Payment

[](#2-create-a-payment)

```
use Yazan\MpsLibrary\DTO\PaymentRequest;

$request = new PaymentRequest(
    product: 'Pro Subscription',
    transactionFee: 2.5,
    recipientName: 'Zahraa Ali',
    recipientPhone: '07701234567',
    recipientEmail: 'zahraa@example.com',
    cardHolder: 'Zahraa Ali',
    cardNumber: '4111111111111111',
    cardExpiryDate: '12/26',
    cvc2: '123'
);

$response = $gateway->createPayment($request);
print_r($response);
```

🔐 All fields are validated before sending the request.

---

📜 License
---------

[](#-license)

This project is licensed under the [MIT License](LICENSE).

You are free to use, modify, and distribute this software with attribution.
See the full license text in the `LICENSE` file.

---

👤 Author
--------

[](#-author)

**Yazan Kaakeh**
📧
🔗 [GitHub: yazankaakeh](https://github.com/yazankaakeh)

---

🤝 Contributions
---------------

[](#-contributions)

Contributions, issues, and feature requests are welcome!
Please feel free to fork the repository and submit a pull request.

If you find a bug or have a suggestion, please open an issue on GitHub.

> Let's build better tools together 🚀

---

###  Health Score

15

—

LowBetter than 3% of packages

Maintenance41

Moderate activity, may be stable

Popularity0

Limited adoption so far

Community6

Small or concentrated contributor base

Maturity14

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.

### Community

Maintainers

![](https://www.gravatar.com/avatar/953a6d390ef861888fede1ab9a44384d03304f169f59eb9536b64e00e91c4e2e?d=identicon)[yazankaakeh](/maintainers/yazankaakeh)

---

Top Contributors

[![yazankaakeh](https://avatars.githubusercontent.com/u/60025478?v=4)](https://github.com/yazankaakeh "yazankaakeh (7 commits)")

### Embed Badge

![Health badge](/badges/yazzzon-mps-payment-library/health.svg)

```
[![Health](https://phpackages.com/badges/yazzzon-mps-payment-library/health.svg)](https://phpackages.com/packages/yazzzon-mps-payment-library)
```

###  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)
