optimoapps/jolo-api

A Laravel package for Jolo API money transfer

V1.3.1 2020-05-23 13:10 UTC

This package is auto-updated.

Last update: 2024-04-29 04:00:07 UTC


README

Laravel 5 Package for Jolo Api(unofficial)

run-tests License: MIT Latest Stable Version Total Downloads Check & fix styling

68747470733a2f2f7777772e6f7074696d6f617070732e636f6d2f696d616765732f6c61726176656c5f6a6f6c6f5f6170692e706e67

Installation

This package can be installed through Composer.

composer require optimoapps/jolo-api

In Laravel 5.5 and above the package will autoregister the service provider.

Publish the config file of this package with this command:

php artisan vendor:publish --provider="OptimoApps\JoloApi\JoloApiServiceProvider"

The following config file will be published in config/jolo-api.php

return [
    'key' => '',   //Provide your api key
    'mode' => 0   //Change 1 for live
];

Usage

use JoloApi;
JoloApi::checkBalance()->toArray();

Convert to Array

JoloApi::checkBalance()->toArray();

Or if Json Result just call toJson()

JoloApi::checkBalance()->toJson();
Available Class Methods

Agent Signup

use JoloApi;
$params =  [
    'service'=> 12342233444,   //Mobile no
    'name'=> 'name',  //name of an agent
    'address'=> 'XXXXXX',  //Address of an agent
    'email'=> 'info@optimoapps.com'  //email id of an corporate agent  
];
$result = JoloApi::agentSignUp($params)->toArray();

For Transfer Money

use JoloApi;
$params =  [
    'service'=> 12342233444,   //Mobile no
    'beneficiaryid'=> 'name',  //unique beneficiary id
    'orderid'=> 'XXXXXX',  //unique order generated by your script
    'amount'=> 300,
    'remarks' => 'any text' 
];
$result = JoloApi::transferMoney($params)->toArray()    

For more details ,Please check JoloSoft doc

Testing

Run the tests with:

vendor/bin/phpunit

Security

If you discover any security related issues, please email info@optimoapps.com instead of using the issue tracker.

License

The MIT License (MIT). Please see License File for more information.