Download the PHP package mediumart/momo without Composer
On this page you can find all versions of the php package mediumart/momo. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download mediumart/momo
More information about mediumart/momo
Files in mediumart/momo
Informations about the package momo
Mediumart momo
An MTN Mobile Money php client.
Requirements
PHP >=8.0
Installation
You can install via Composer. Run the following command:
Sandbox
The client env configuration default to live. If you want to practice in the sandbox environment before going live, you probably want to enable it before resolving any client instance.
Alternatively, you can also configure a specific service instance to run in the sandbox by providing a 'sandbox' argument upon getting the instance.
Connect to your Momo developer Dashboard, subscribe to a product : collection, disbursement, or remittance. Go to your profile and grab the corresponding subscription key (should be primary key or secondary key).
Then create a new sandbox user for your subscription key.
This will get you a fresh Mediumart\ModileMoney\User instance, a value object with 3 properties (all lowercase):
Use them to get a new access token for the corresponding service (collection, disbursement, or remittance).
The same Mediumart\ModileMoney\User class can be used to store similar values in your live environment.
Usage
Mtn Mobile Money API supported services are: collection, disbursement, and remittance.
Resolve services clients instances using the MobileMoney facade.
Then this is the list of methods you 'll have access to :
shared Api (collection, disbursement, and remittance)
bcAuthorizecreateAccessTokencreateOauth2TokenvalidateAccountHolderStatusgetAccountBalancegetBasicUserinfogetUserInfoWithConsentrequestToPayDeliveryNotification
transferApi (disbursement, remittance)
transfergetTransferStatus
collection
requestToPayrequestToPayTransactionStatusrequestToWithdrawV1requestToWithdrawV2requestToWithdrawV1TransactionStatuscancelInvoicecreateInvoicegetInvoiceStatuscreatePaymentsgetPaymentStatuspreApprovalgetPreApprovalStatus
disbursement
depositV1depositV2getDepositStatusrefundV1refundV2getRefundStatus
remittance
cashTransfergetCashTransferStatus
For now, to know which parameters are required for each method, please look at the code . A complete API docs may be released soon.
License
Mediumart momo is an open-sourced software licensed under the MIT license.