You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
MTN Mobile money driver for the Omnipay PHP payment processing library
Omnipay is a framework agnostic, multi-gateway payment
processing library for PHP 5.3+. This package implements MTN Mobile money support for Omnipay.
Note
This release is scurrently unstable but will soon be released on a stable branch when the fix is applied. If you seek to use this package urgently, please contact author @larrytech7
Installation
Omnipay is installed via Composer.
To install, go to your project root directory and simply run :
The following methods are provided by this package:
purchase
use Omnipay\Omnipay;
$gateway = Omnipay::create('Momoc');
$config = [
'providerCallbackHost' =>'https://mycallback',
'amount' => 100.00, //amount the client should pay
'api_user' => '', //your provided profile apiuser
'api_key' => '', //your provided profile api key
'subscription_key' => '', //your provided subscription key
];
$gateway->authorize($config);
$response = $gateway->purchase($config)->send();
$transactionInfo = $response->getMessage(); //an array containing transaction data
if($response->isSuccessful()){
//save transaction to database and notify the user
//.....
}else{
//get error from the message and notify the user
//......
}
For general usage instructions, please see the main Omnipay
repository.
Support
If you are having general issues with Omnipay, we suggest posting on
Stack Overflow. Be sure to add the
omnipay tag so it can be easily found.
If you want to keep up to date with release anouncements, discuss ideas for the project,
or ask more detailed questions, there is also a mailing list which
you can subscribe to.
If you believe you have found a bug, please report it using the GitHub issue tracker,
or better yet, fork the library and submit a pull request.
About
MTN Cameroon mobile money payment driver for omnipay