beenet / laravel-paysera
There is no license information available for the latest version (v1.11) of this package.
Paysera module for Laravel 9
v1.11
2022-06-07 09:44 UTC
Requires
- hashids/hashids: ^4.1.0
README
Package that helps to use Paysera API in laravel application.
Installation
First require package with composer:
$ composer require beenet/laravel-paysera
Then add service provider to config/app.php:
'providers' => [
...
Beenet\Paysera\PayseraServiceProvider::class,
],
Facede to aliases:
'aliases' => [
...
'Paysera' => Beenet\Paysera\PayseraFacade::class,
],
And last is to publish config, migrations and view:
$ php artisan vendor:publish --provider="Beenet\Paysera\PayseraServiceProvider"
$ php artisan migrate
Usage
Get payment methods
Paysera::getPaymentMethods($locale, $groups);
Both parameters for this method is optional. $locale
have to be string of locale key.
By default $locale
will be set by application locale (App::getLocale()
). $groups
variable sets what payment method to get and have to be array. For example if we want
only e-banking methods, we can set ['e-banking']
. Result of this method will be
array with payment methods and information about them.