Momo Suite
  • Introduction
  • Getting Started
  • Basic Concepts
  • Providers (Hubtel)
    • Korba
    • PayStack
    • ITC
  • Dashboard (Overview)
    • Transaction Detail Page
      • Status Check for Pending Transactions
      • Manual Status Update (Admin Only)
      • Transaction Timeline
      • Technical Details
  • User Management
  • Transaction Status Update Notifications
Powered by GitBook
On this page
  • Requirements
  • Installation

Getting Started

Requirements

Before installing Momo Suite, make sure your environment meets the following requirements:

  • PHP >= 8.0

  • Laravel >= 8.0.x

  • MySQL or PostgreSQL

  • Composer

  • JSON PHP Extension

  • cURL PHP Extension

  • OpenSSL PHP Extension

  • PDO PHP Extension

Installation

  1. Install the package via Composer:

composer require rais/momo-suite
  1. Publish the package assets:

php artisan vendor:publish --provider="Rais\MomoSuite\MomoSuiteServiceProvider"

or

php artisan momo-suite:install --all

This will publish:

  • Configuration file (config/momo-suite.php)

  • Migration files

  • Dashboard views

  • Assets (CSS, JS)

  1. Run the migrations:

php artisan migrate
php artisan momo-suite:create-admin ## this ask u to add your details
php artisan momo-suite:create-admin --default  ## create a default admin

📝 NOTE (Customization)

php artisan momo-suite:install --views     # Customize views
php artisan momo-suite:install --routes    # Customize routes
php artisan momo-suite:install --migrations # Customize migrations

Add --force to overwrite existing files
php artisan momo-suite:install --all --force

Configuration

  1. Add your provider credentials to your .env file:

# Hubtel Configuration
HUBTEL_CLIENT_ID=your-client-id
HUBTEL_CLIENT_SECRET=your-client-secret
HUBTEL_MERCHANT_ACCOUNT_NUMBER=your-merchant-account
HUBTEL_CALLBACK_URL=your-callback-url

# Korba Configuration
KORBA_API_KEY=your-api-key
KORBA_CLIENT_ID=your-client-id
KORBA_CLIENT_SECRET=your-client-secret

# Paystack Configuration
PAYSTACK_SECRET_KEY=your-secret-key
PAYSTACK_PUBLIC_KEY=your-public-key

# ... other provider configurations
  1. Configure the package in config/momo-suite.php:

return [
    'default_provider' => 'hubtel',
    
    'providers' => [
        'hubtel' => [
            'client_id' => env('HUBTEL_CLIENT_ID'),
            'client_secret' => env('HUBTEL_CLIENT_SECRET'),
            'merchant_account_number' => env('HUBTEL_MERCHANT_ACCOUNT_NUMBER'),
            'callback_url' => env('HUBTEL_CALLBACK_URL'),
        ],
        // ... other provider configurations
    ],
    
];

Quick Start Guide

1. Basic Usage with Facade:
use Rais\MomoSuite\Facades\Momo;

// Receive Money (Collection)
$result = Momo::setProvider('hubtel')
    ->receive([
        'phone' => '0551234987',
        'amount' => 1.00,
        'network' => 'MTN',
        'reference' => 'Test Payment',
    ]);

// Send Money (Disbursement)
$result = Momo::setProvider('hubtel')
    ->send([
        'phone' => '0241234987',
        'amount' => 1.00,
        'network' => 'MTN',
        'reference' => 'Test Disbursement',
    ]);

// avaiable networks
MTN | TELECEL | AIRTELTIGO
  1. Access the Dashboard:

    • Visit: your-domain.com/momo/dashboard

    • Monitor transactions

    • View analytics

    • Manage users

  2. Handle Webhooks:

    • Configure your webhook URL in your provider's dashboard

    • Webhooks will be automatically processed

    • Transaction statuses will be updated in real-time

  3. View Transaction Details:

use Rais\MomoSuite\Models\Transaction;

$transaction = Transaction::find($id);
echo $transaction->status;
echo $transaction->amount;
echo $transaction->network;

PreviousIntroductionNextBasic Concepts

Last updated 29 days ago