ammezie / paystack-laravel
Laravel 5 Package for Paystack
Installs: 30
Dependents: 0
Suggesters: 0
Security: 0
Stars: 3
Watchers: 2
Forks: 1
Open Issues: 0
Type:laravel
Requires
- mabiola/paystack-php-lib: ^1.0
Requires (Dev)
- fzaninotto/faker: ^1.6
- mockery/mockery: ^0.9.6
- phpunit/phpunit: 4.*
- satooshi/php-coveralls: ^1.0
This package is not auto-updated.
Last update: 2024-12-07 20:55:26 UTC
README
This is a Laravel 5 wrapper for MalikAbiola Paystack Lib.
Requirements
- PHP 5.6+
- Composer
Installation
Add the following to your composer.json
file
"mabiola/paystack-php-lib" : "~1.0"
"ammezie/paystack-laravel" : "1.0.*"
and run composer install
or composer update
.
Then add Ammezie\Paystack\PaystackServiceProvider
to the providers
array in your config/app.php
:
Ammezie\Paystack\PaystackServiceProvider::class
Also, register the Facade like so:
'aliases' => [
...
'Paystack' => Ammezie\Paystack\Facades\Paystack::class,
...
]
Configuration
You can publish the configuration file using this command:
php artisan vendor:publish --provider="Ammezie\Paystack\PaystackServiceProvider"
A configuration file named paystack.php
will be placed in your config directory.
Then set Paystack mode and the corresponding API Keys.
Usage
You can use the facade:
Paystack::startOneTimeTransaction('10000', 'me@example.com');
For more information on using this package, see https://github.com/MalikAbiola/paystack-php-lib repository.