Package Data | |
---|---|
Maintainer Username: | mpaannddreew |
Maintainer Contact: | andrewmvp007@gmail.com (Mpande Andrew) |
Package Create Date: | 2017-09-11 |
Package Last Update: | 2017-09-12 |
Home Page: | |
Language: | PHP |
License: | Unknown |
Last Refreshed: | 2024-11-09 15:06:38 |
Package Statistics | |
---|---|
Total Downloads: | 21 |
Monthly Downloads: | 0 |
Daily Downloads: | 0 |
Total Stars: | 0 |
Total Watchers: | 2 |
Total Forks: | 0 |
Total Open Issues: | 0 |
This is a simple/basic implementation of JPesa payments in laravel 5
Note: You must have a valid JPesa account to use this library
For more information visit JPesa
composer require fannypack/jpesa
Register service provider
FannyPack\JPesa\JPesaServiceProvider::class,
Register Facade Register service provider
'JPesa' => FannyPack\JPesa\JPesa::class,
After the service provider is registered run this command
php artisan vendor:publish
This command will create a copy of the library's config file and migrations into your code base
jpesa.php
Run migrations
php artisan migrate
The library loads configurations from the .env file in your application's root folder. These are the contents of jpesa.php
return [
'username' => env('JPESA_USERNAME', ''),
'password' => env('JPESA_PASSWORD', ''),
];
Using it with your models, add
namespace App;
use FannyPack\JPesa\Billable;
use Illuminate\Database\Eloquent\Model;
class Account extends Model
{
use Billable;
}
Requesting payment from a registered mobile money number
$response = JPesa::deposit($from_phone_number, $amount);
Information about a jpesa transaction
$response = JPesa::info($transactionId);
For any bugs found, please email me at andrewmvp007@gmail.com or register an issue at issues