appiersign/peoples-pay
最新稳定版本:v1.0.0
Composer 安装命令:
composer require appiersign/peoples-pay
包简介
People Pay Payment API
README 文档
README
Introduction
Peoples Pay API allows seamless integration with various Mobile Money wallets in Ghana.
Getting Started
To get start, require the package with composer.
composer require appiersign/peoples-pay
You will need a $merchantId, $baseUrl, and $apiKey.
Usage
Get perform any action, you will need an instance of the PeoplesPay class. See below for example:
$peoplesPay = new PeoplesPay($baseUrl, $apiKey, $merchantId);
Get Account Holder Name
Fetching account holder's name is simple. All you have to do is to call the getMobileMoneyAccountName() see below for example:
$response = $peoplesPay->getMobileMoneyAccountName($phoneNumber, $network);
Sample response:
['success' => true, 'code' => '00', 'message' => 'success', 'data' => 'Account Holder']
Make Payment
To make payment or collect money from mobile money wallet
- create an instance of the PeoplesPay class
$peoplesPay = new PeoplesPay($baseUrl, $apiKey, $merchantId);
- call the
collectMobileMoney()on the instance
$response = $peoplesPay->collectMobileMoney($phoneNumber, $network', $amount, $transactionReference, $callbackUrl, $description));
A sample response looks like this:
['code' => '01', 'success' => true, 'message' => 'Transaction Received for Processing', 'transactionId' => 'xxxxxxxxxxxxxxx', 'date' => '2022-06-10T11:10:11.547Z']
Checking Payment Status
To check the status of a transaction, you will need the $transactionId that was returned with the response above. You can then call the checkStatus() on the $peoplesPay instance like this:
$response = $peoplesPay->checkStatus($transactionId);
See sample response below:
['success' => true, 'code' => '00', 'message' => 'Transaction Successful', 'status' => 'paid', 'transactionId' => $transactionId, 'issuerId' => 'xxxxxxxxxx]
Disbursement
Coming soon!!!
统计信息
- 总下载量: 984
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 1
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2022-06-10