uocnv/momo-payment
最新稳定版本:1.0.2
Composer 安装命令:
composer require uocnv/momo-payment
包简介
A pakage connect with momo
关键字:
README 文档
README
This is a package that helps connect to Momo service with All in one payment method.
Installation
You can install the package via composer:
composer require uocnv/momo-payment
Usage
-
Publish config:
php artisan vendor:publish --provider="Uocnv\MomoPayment\MomoPaymentServiceProvider" --tag="config"
-
You can start with:
$momoPayment = new MomoPayment(config('momo-payment.environment'));
-
Create a Capture request and receive response with redirect payment url:
$response = $momoPayment->createRequest(array $data); $paymentUrl = $response->getPayUrl();
More information in: Config Api
-
Processing payment results:
You can check signature from response
$response = $momoPayment->checkResult($request->all()); $errorCode = $response->getErrorCode(); $localMessage = $response->getLocalMessage(); $transId = $response->getTransId(); $responseTime = $response->getResponseTime(); $orderId = $response->getOrderId(); $orderInfo = $response->getOrderInfo(); $amount = $response->getAmount();
More information in: Processing payment results
-
Check transaction status:
$response = $momoPayment->checkStatus($orderId, $requestId); $errorCode = $response->getErrorCode(); $localMessage = $response->getLocalMessage(); $transId = $response->getTransId(); $orderId = $response->getOrderId(); $amount = $response->getAmount();
More information in: Check transaction status
Security
If you discover any security related issues, please email uocnv.soict.hust@gmail.com instead of using the issue tracker.
Credits
License
The MIT License (MIT). Please see License File for more information.
Laravel Package Boilerplate
This package was generated using the Laravel Package Boilerplate.
统计信息
- 总下载量: 6
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2025-03-20