Looking to hire Laravel developers? Try LaraJobs

laravel-paysera maintained by beenet

Description
Paysera module for Laravel 9
Last update
2022/06/07 11:44 (dev-main)
Downloads
32

Comments
comments powered by Disqus

Laravel 9 Paysera

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.