lubusIN / laravel-mojo by introwit

Laravel Mojo provides an expressive, fluent interface to Instamojo's payment and refund services.
2,390
14
3
Package Data
Maintainer Username: introwit
Maintainer Contact: harish@lubus.in (Harish Toshniwal)
Package Create Date: 2016-11-19
Package Last Update: 2019-08-27
Home Page:
Language: PHP
License: MIT
Last Refreshed: 2024-12-15 03:03:42
Package Statistics
Total Downloads: 2,390
Monthly Downloads: 4
Daily Downloads: 2
Total Stars: 14
Total Watchers: 3
Total Forks: 4
Total Open Issues: 7

Introduction

Laravel Mojo provides an expressive, fluent interface to Instamojo's online payments and refund services. It handles almost all of the boilerplate payment code you are dreading writing and are unable to watch next episode of Narcos because of the same. In addition to the basic payments and refunds management, Mojo stores all the tansactions & refunds details with him and gives them to you as you ask (No you don't even need to shout Ok google for that).

Here are a few short examples of what you can do:

$instamojoFormUrl = Mojo::giveMeFormUrl($user,$amount,$purpose);

return redirect($instamojoFormUrl);

That's it for making the payment, also it gets you the payment details after the payment with the same breeze:

$details = Mojo::giveMePaymentDetails();

My 3 most favourites out of all the helpers

$income = Mojo::myAndMojosIncome(); // Total amount including Instamojo's fees

$income = Mojo::myIncome(); // Total amount excluding Instamojo's fees

$income = Mojo::mojosIncome(); // Instamojo's total fees

Much more in the documentation

Documentation

You'll find the entire documentation & the spoiler for Narcos season 3 in the WIKI. Since thats why the wiki is made for! But, no one cares sigh...

Stuck somewhere using the laravel mojo, any feature requests, or a TV series recommendation? Feel free to create an issue on gitHub, I'll try to address it as soon as possible.

Prerequisites

  • If you are upgrading from v1 to v2 please checkout the changelog
  • PHP >=7.0
  • CURL extension should be enabled

Installation

Enable the CURL extension in order to use this package

You can install this package via composer using this command:

composer require lubusin/laravel-mojo

Next, you must add the service provider:

// config/app.php
'providers' => [
    ...
    Lubusin\Mojo\MojoServiceProvider::class,
];

You can run the migrations for both transactions and refunds details after registering the service provider with:

php artisan migrate

You can publish the config-file "laravelmojo.php" with:

php artisan vendor:publish --provider="Lubusin\Mojo\MojoServiceProvider"

A file "laravelmojo.php" would be published in the config directory. Make sure to fill in the correct config values in your .env file before proceeding.

After successful installation, continue with the documentation here

Contributing

Thank you for considering contributing to the Laravel Mojo. You can read the contribution guide lines here

Security

If you discover any security related issues, please email to harish@lubus.in instead of using the issue tracker.

Credits

About LUBUS

LUBUS is a web design agency based in Mumbai. More about us could be found here on our website.

License

Laravel Mojo is open-sourced software licensed under the MIT license

Changelog

Please see the Changelog for the details