dnsoft/mservice-payment 问题修复 & 功能扩展

解决BUG、新增功能、兼容多环境部署,快速响应你的开发需求

邮箱:yvsm@zunyunkeji.com | QQ:316430983 | 微信:yvsm316

dnsoft/mservice-payment

Composer 安装命令:

composer require dnsoft/mservice-payment

包简介

MoMo Package to speed up the integration process with merchants.

README 文档

README

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

  • PHP >= 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

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

https://developers.momo.vn

Usage

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

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.

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

Security Aalgorithms

More

Languages

  • PHP

Versioning

Version 0.1

Authors

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

License

(c) MoMo

Support

If you have any issues when integrate MoMo API, please find out in F.A.Q or Exception handling section in our documention

=======

dnsoft/mservice-payment 适用场景与选型建议

dnsoft/mservice-payment 是一款 基于 JavaScript 开发的 Composer 扩展包,目前已累计 10 次下载、GitHub Stars 达 0, 最近一次更新时间为 2023 年 07 月 03 日, 在 PHP 生态内属于活跃度较高的组件。

它主要适用于以下技术方向: 「package」 「payment」 「momo」 「mservice」 等业务场景。在实际项目中,围绕这些方向常见需要落地的问题包括:接口对接、性能调优、并发安全、与既有框架(Laravel / ThinkPHP / Yii / Webman 等)的兼容适配,以及生产环境的日志埋点与稳定性保障。

我们在过去多个企业项目中使用过 dnsoft/mservice-payment 或与其功能相近的方案,如果你在选型或落地过程中遇到问题,例如 版本兼容、二次改造、私有化封装、与内部系统对接、生产 BUG 排查,欢迎联系我们协助评估。

围绕 dnsoft/mservice-payment 我们能提供哪些服务?
定制开发 / 二次开发

基于 dnsoft/mservice-payment 在你已有业务上做功能扩展、字段裁剪、UI 适配、与内部账号 / 权限 / 日志系统的深度对接。

BUG 修复 & 性能优化

线上偶发问题、内存泄漏、慢查询、并发异常等排查修复;针对高流量场景做缓存、队列、索引层面的调优。

项目外包 & 长期维护

承接完整的项目从需求 → 设计 → 开发 → 上线 → 长期运维;也可按月提供技术保姆服务。

yvsm@zunyunkeji.com QQ:316430983 微信:yvsm316 西安尊云信息科技 · 专注 PHP / Go / 分布式系统研发

统计信息

  • 总下载量: 10
  • 月度下载量: 0
  • 日度下载量: 0
  • 收藏数: 0
  • 点击次数: 13
  • 依赖项目数: 0
  • 推荐数: 0

GitHub 信息

  • Stars: 0
  • Watchers: 0
  • Forks: 23
  • 开发语言: JavaScript

其他信息

  • 授权协议: MIT
  • 更新时间: 2023-07-03