Paystack Laravel
, (*1)
This is a Laravel 5 wrapper for MalikAbiola Paystack Lib., (*2)
Requirements
Installation
Add the following to your composer.json
file, (*3)
"mabiola/paystack-php-lib" : "~1.0"
"ammezie/paystack-laravel" : "1.0.*"
and run composer install
or composer update
., (*4)
Then add Ammezie\Paystack\PaystackServiceProvider
to the providers
array in your config/app.php
:, (*5)
Ammezie\Paystack\PaystackServiceProvider::class
Also, register the Facade like so:, (*6)
'aliases' => [
...
'Paystack' => Ammezie\Paystack\Facades\Paystack::class,
...
]
Configuration
You can publish the configuration file using this command:, (*7)
php artisan vendor:publish --provider="Ammezie\Paystack\PaystackServiceProvider"
A configuration file named paystack.php
will be placed in your config directory., (*8)
Then set Paystack mode and the corresponding API Keys., (*9)
Usage
You can use the facade:, (*10)
Paystack::startOneTimeTransaction('10000', 'me@example.com');
For more information on using this package, see https://github.com/MalikAbiola/paystack-php-lib repository., (*11)