PHP code example of morningtrain / laravel-economic
1. Go to this page and download the library: Download morningtrain/laravel-economic library. Choose the download type require. 2. Extract the ZIP file and open the index.php. 3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
morningtrain / laravel-economic example snippets
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,
];
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;
}