PHP code example of yetione / gateway-request-laravel

1. Go to this page and download the library: Download yetione/gateway-request-laravel 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/ */

    

yetione / gateway-request-laravel example snippets


 
// config/app.php
use Yetione\GatewayRequest\Logging\LaravelLoggingServiceProvider;
use Yetione\GatewayRequest\Providers\GatewayServiceProvider;


return [
    'providers'=>[
        LaravelLoggingServiceProvider::class,
        GatewayServiceProvider::class
    ],
];


// bootstrap/app.php
use Yetione\GatewayRequest\Logging\LumenLoggingServiceProvider;
use Yetione\GatewayRequest\Providers\GatewayServiceProvider;

$app->register(LumenLoggingServiceProvider::class);
$app->register(GatewayServiceProvider::class);



// config/auth.php
use Yetione\GatewayRequest\Enums\GatewayAuth;
[
    'defaults' => [
        'guard' => GatewayAuth::AUTH,           
        'passwords' => 'users',
    ],
    'guards'=> [
        GatewayAuth::AUTH=>[
            'driver'=> GatewayAuth::AUTH_GUARD,
            'provider'=> GatewayAuth::AUTH_PROVIDER
        ]
    ],
    'provider'=>[
          GatewayAuth::AUTH_PROVIDER=>[
            'driver'=> GatewayAuth::AUTH_PROVIDER,
          ]  
    ]
];
dotenv
JWT_SECRET=XUu7XghJ3NFmoZ4nz7fKRRmaGogE4xZbCTT2xbyqESLeGeAQ3klIziNvaj6OuT0d
JWT_PRIVATE_KEY=file:///app/storage/keys/private_key.pem
JWT_PUBLIC_KEY=file:///app/storage/keys/ecdsa-p521-public.pem
JWT_ALGO=ES512