PHPackages                             dnsoft/mservice-payment - 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. dnsoft/mservice-payment

ActiveLibrary[Payment Processing](/categories/payments)

dnsoft/mservice-payment
=======================

MoMo Package to speed up the integration process with merchants.

v1.0.1(2y ago)010MITJavaScriptPHP &gt;=7.2

Since Jul 4Pushed 2y agoCompare

[ Source](https://github.com/nguyen-van-dong/php-momo)[ Packagist](https://packagist.org/packages/dnsoft/mservice-payment)[ RSS](/packages/dnsoft-mservice-payment/feed)WikiDiscussions master Synced 1mo ago

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

MoMo - Payment Platform
=======================

[](#momo---payment-platform)

Library package to integrate MoMo E-Wallet as payment method

- Online Payment: Desktop, Mobile website
- Offline payment: POS, Static QR, Dynamic QR
- Mobile Payment: App to App, In MoMo Application

### Prerequisites

[](#prerequisites)

- PHP &gt;= 7.2
- Composer

For development purposes, we use phpunit/phpunit for testing.

Please check the composer.json file for detailed information on libraries for development as well as suggested packages

### Installing

[](#installing)

Make sure you have the correct PHP version and Composer installed. Then you can add the package from the command line:

```
composer require mservice/payment

```

Or you can add directly to the `composer.json` file and then run the command `composer update`:

```
require {
    "mservice/payment":"*"
}

```

Please remember to run `composer dump-autoload -o` to make sure the autolaod works properly.

Documention
-----------

[](#documention)

Usage
-----

[](#usage)

### Setting Up MoMo Environment

[](#setting-up-momo-environment)

MoMo provides 2 environments for integration: development(`dev`) and production(`prod`). The model for environment is located at `MService\Payment\Shared\SharedModels\Environment`

Example configuration is provided in `.env.example` and sample code on how to set up your environment can be found in `SampleEnvironment.php` file. Please create your own `.env` file and then copy contents from `.env.example` to that file (or make any necessary changes). Please note that `selectEnvironment()` is just a sample code and NOT part of the actual library.

By default, log is turned off. But you can use `MoMoLogger` by setting the `$loggingOff` property to `false` during environment setup.

### Integration

[](#integration)

The library provides functions to conduct transactions through the All-In-One (AIO) Payment Gateway (`Mservice\Payment\PayGate`) and all other Payment (`Mservice\Payment\Pay`) options (App-In-App, POS, Dynamic QR Code)

For each payment options, you can choose to either use the provided code in `Processors` folder to immediately use MoMo services or extend from the models located in `Models` folder. To have a better sense of how the processors work, we recommend uncommented and run the code in `PayGate.php` and `Pay.php`

For `Pay.php`, please ensure that the URI you are calling to is correct for the processes you are trying to run accoring to [MoMo's documentation](https://developers.momo.vn/#/).

Running The Tests
-----------------

[](#running-the-tests)

Install phpunit/phpunit library to the downloaded project:

From the terminal, with Composer:

```
composer require-dev "phpunit/phpunit":"^8"

```

Or you can directly add to `composer.json`, and then update the composer:

```
"require-dev": {
    "phpunit/phpunit": "^8"
 },

```

In the PhpStorm Preferences window, go to `Languages & Framework / PHP / Test Frameworks` choose `use Composer autoload` to load your local PhpUnit library.
Do remember to run the `composer dump-autoload -o` command first to ensure proper run of Composer's autoload. Run the tests with phpunit command. For example, you can run the CaptureMoMoTest.php by using the command:

```
./vendor/bin/phpunit tests/MService/Payment/AllInOne/Processors/CaptureMoMoTest.php

```

Or `./vendor/bin/phpunit tests` to run all available tests

Acknowledgments
---------------

[](#acknowledgments)

### Security Aalgorithms

[](#security-aalgorithms)

- [HMAC 256](https://en.wikipedia.org/wiki/HMAC)
- [RSA - Rivest–Shamir–Adleman](https://en.wikipedia.org/wiki/RSA_(cryptosystem))
- [AES - Advanced Encryption Standard](https://en.wikipedia.org/wiki/Advanced_Encryption_Standard)

### More

[](#more)

- [IPN - Instant Payment Notification](https://developer.paypal.com/docs/classic/products/instant-payment-notification/)
- [JSON - JavaScript Object Notation](https://www.json.org/)

Languages
---------

[](#languages)

- PHP

Versioning
----------

[](#versioning)

```
Version 0.1

```

Authors
-------

[](#authors)

- **Linh Nguyễn** - linh.nguyen7@mservice . com . vn

License
-------

[](#license)

(c) MoMo

Support
-------

[](#support)

If you have any issues when integrate MoMo API, please find out in [`F.A.Q`](https://developers.momo.vn/#/docs/aio/?id=faq) or [`Exception handling`](https://developers.momo.vn/#/docs/error_code) section in our [documention](https://developers.momo.vn)

=======

###  Health Score

20

—

LowBetter than 14% of packages

Maintenance20

Infrequent updates — may be unmaintained

Popularity5

Limited adoption so far

Community10

Small or concentrated contributor base

Maturity40

Maturing project, gaining track record

 Bus Factor1

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

1047d ago

### Community

Maintainers

![](https://www.gravatar.com/avatar/1554f58ee86bc89d66b752920f5f5487a73d4801793c56896785540fe149884a?d=identicon)[Dong Nguyen](/maintainers/Dong%20Nguyen)

---

Top Contributors

[![lnguyen99](https://avatars.githubusercontent.com/u/46892498?v=4)](https://github.com/lnguyen99 "lnguyen99 (25 commits)")[![hainguyenp207](https://avatars.githubusercontent.com/u/18342245?v=4)](https://github.com/hainguyenp207 "hainguyenp207 (2 commits)")[![nguyen-van-dong](https://avatars.githubusercontent.com/u/67553313?v=4)](https://github.com/nguyen-van-dong "nguyen-van-dong (2 commits)")[![vanhungpcmomo](https://avatars.githubusercontent.com/u/218188427?v=4)](https://github.com/vanhungpcmomo "vanhungpcmomo (2 commits)")

---

Tags

packagepaymentmomomservice

###  Code Quality

TestsPHPUnit

### Embed Badge

![Health badge](/badges/dnsoft-mservice-payment/health.svg)

```
[![Health](https://phpackages.com/badges/dnsoft-mservice-payment/health.svg)](https://phpackages.com/packages/dnsoft-mservice-payment)
```

###  Alternatives

[cybersource/rest-client-php

Client SDK for CyberSource REST APIs

39881.3k6](/packages/cybersource-rest-client-php)[phpviet/omnipay-momo

Thư viện hổ trợ tích hợp cổng thanh toán MoMo.

318.3k2](/packages/phpviet-omnipay-momo)[paymentsuite/paymentsuite

PaymentSuite is an easy implementation for lot of Payment Methods for Symfony projects

2615.5k2](/packages/paymentsuite-paymentsuite)

PHPackages © 2026

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