PHP code example of razachisibrahimah / sevotransact
1. Go to this page and download the library: Download razachisibrahimah/sevotransact library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
razachisibrahimah / sevotransact example snippets
$momo = new MomoCollection;
$amount = 0.2;
$phone = '233...';
$channel = ''; // MTN|VODAFONE|AIRTEL
$response = $momo->pay($amount, $phone, $channel);
$status = $response['status']; // 200
$message = $response['message']; // success
$transactionId = $response['data']['client-reference'];
$code = $response['data']['code']; // 100
$msisdn = $response['data']['msisdn'];