PHPackages                             mobilly/mpay - 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. mobilly/mpay

ActiveLibrary[Payment Processing](/categories/payments)

mobilly/mpay
============

Mobilly MPAY connection library.

1.3.2(4d ago)05.1k↓77%1[1 PRs](https://github.com/saleniex/mpay/pulls)MITPHPPHP &gt;=8.3

Since Mar 2Pushed 2mo ago1 watchersCompare

[ Source](https://github.com/saleniex/mpay)[ Packagist](https://packagist.org/packages/mobilly/mpay)[ Docs](http://mobilly.lv/)[ RSS](/packages/mobilly-mpay/feed)WikiDiscussions master Synced 2d ago

READMEChangelog (5)Dependencies (6)Versions (20)Used By (0)

MPay
====

[](#mpay)

Mobilly MPay service integration library.

Download via packagist.org
==========================

[](#download-via-packagistorg)

```
$ composer require mobilly/mpay

```

On how to use Composer please see following [link](https://getcomposer.org/download/).

Usage example
=============

[](#usage-example)

```
namespace MpayTest;

use Mobilly\Mpay\Connector;
use Mobilly\Mpay\Request;
use Mobilly\Mpay\SecurityContext;
use Mobilly\Mpay\SuccessResponse;

require_once 'vendor/autoload.php';

$mpayUser = 'mpayuser';
$privateKey = './private.pem';
$privateKeySecret = 'SuperSecretPrivateKeySecret';
$publicKey = './mpay-public.pem';
$endpoint = 'https://mpay-test.mobilly.lv'; // In production: "https://mpay.mobilly.lv"

$context = new SecurityContext($mpayUser, $privateKey, $privateKeySecret, $publicKey);

$request = new Request($context);
$request
    ->setAmount(250)
    ->setSummary('Test transaction')
    ->setServiceId(100)
    ->setResultUrl('https://mydomain.com/result')
    ->setReturnUrl('https://mydomain.com/return')
    ->setContacts('John', 'Doe', 'john@doe.com')
    ->setLanguage('en');

$connector = new Connector($context, $endpoint . '/transaction');
$response = $connector->send($request);

if ( ! $response instanceof SuccessResponse) {
    die("Error.");
}

$transactionId = $response->getTransactionId();

header("Location: " . $endpoint . "?transid=" . $transactionId);
exit();
```

Private/public key creation
===========================

[](#privatepublic-key-creation)

```
$ openssl genrsa -out private.pem -aes256 4096
$ openssl rsa -pubout -in private.pem -out public.pem

```

###  Health Score

57

—

FairBetter than 98% of packages

Maintenance91

Actively maintained with recent releases

Popularity23

Limited adoption so far

Community11

Small or concentrated contributor base

Maturity87

Battle-tested with a long release history

 Bus Factor1

Top contributor holds 60% 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 ~213 days

Recently: every ~466 days

Total

17

Last Release

4d ago

PHP version history (2 changes)1.2.0PHP &gt;=8.2

1.3.0PHP &gt;=8.3

### Community

Maintainers

![](https://avatars.githubusercontent.com/u/12482378?v=4)[saleniex](/maintainers/saleniex)[@saleniex](https://github.com/saleniex)

---

Top Contributors

[![saleniex](https://avatars.githubusercontent.com/u/12482378?v=4)](https://github.com/saleniex "saleniex (6 commits)")[![dependabot[bot]](https://avatars.githubusercontent.com/in/29110?v=4)](https://github.com/dependabot[bot] "dependabot[bot] (3 commits)")[![JanisE](https://avatars.githubusercontent.com/u/1469104?v=4)](https://github.com/JanisE "JanisE (1 commits)")

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/mobilly-mpay/health.svg)

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

###  Alternatives

[aws/aws-sdk-php

AWS SDK for PHP - Use Amazon Web Services in your PHP project

6.3k543.5M2.6k](/packages/aws-aws-sdk-php)[neuron-core/neuron-ai

The PHP Agentic Framework.

2.0k656.1k38](/packages/neuron-core-neuron-ai)[tencentcloud/tencentcloud-sdk-php

TencentCloudApi php sdk

3741.3M46](/packages/tencentcloud-tencentcloud-sdk-php)[chargebee/chargebee-php

ChargeBee API client implementation for PHP

758.5M9](/packages/chargebee-chargebee-php)[tempest/framework

The PHP framework that gets out of your way.

2.2k34.4k15](/packages/tempest-framework)[imdhemy/google-play-billing

Google Play Billing

491.5M5](/packages/imdhemy-google-play-billing)

PHPackages © 2026

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