bnlambert / momo-php-sdk
MTN momo transactions in Cameroon
Installs: 5
Dependents: 0
Suggesters: 0
Security: 0
Stars: 2
Watchers: 1
Forks: 0
Open Issues: 0
pkg:composer/bnlambert/momo-php-sdk
Requires
- php: >=7.1
- guzzlehttp/guzzle: ~6.0
This package is auto-updated.
Last update: 2021-03-11 22:22:40 UTC
README
Handles MTN momo transactions in Cameroon
Installation
composer require bnlambert/momo-php-sdk:dev-master
Implementation
Receive payment online
To receive payment online, call the checkOut method. This method requires two parameter i.e. the client's number and the amount the client needs to pay.
$mtn->checkOut(string $phone, int $amount);
Example
<?php
require 'vendor/autoload.php';
use BNLambert\Momo\Mtn;
$params = [
'merchant_email' => 'merchant@domain.com'
];
$mtn = new Mtn($params);
$res = $mtn->checkOut('67000000', 500);
var_dump($res);
?>
License
MIT