This is where your description should go. Limit it to a paragraph or two. Consider adding a small example.
You can install the package via composer:
composer require morning-train/laravel-e-conomic
You can publish the config file with:
php artisan vendor:publish --tag="e-conomic-config"
This is the contents of the published config file:
<?php
return [
'app_secret_token' => env('ECONOMIC_APP_SECRET_TOKEN'),
'agreement_grant_token' => env('ECONOMIC_AGREEMENT_GRANT_TOKEN'),
/*
* This class handles actions on request and response to Economic.
*/
'request_logger' => \Morningtrain\LaravelEconomic\RequestLogger\VoidRequestLogger::class,
];
A request logger is any class that implements \Morningtrain\LaravelEconomic\RequestLogger\RequestLogger
. Here's what that interface looks like.
use GuzzleHttp\Psr7\Response;
use Illuminate\Http\Client\Request;
use Psr\Http\Message\ResponseInterface;
interface RequestLogger
{
public function onRequest(Request $request);
public function onResponse(Response $response): ResponseInterface;
}
After creating your own RequestLogger
you must register it in the request_logger
in the e-conomic
config file.
composer test
Please see CHANGELOG for more information on what has changed recently.
Please see CONTRIBUTING for details.
Please review our security policy on how to report security vulnerabilities.
The MIT License (MIT). Please see License File for more information.