PHP code example of khamdullaevuz / laravel-payme

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

    

khamdullaevuz / laravel-payme example snippets



return [
    'min_amount' => env('PAYME_MIN_AMOUNT', 1_000_00),
    'max_amount' => env('PAYME_MAX_AMOUNT', 100_000_000_00),
    'identity' => env('PAYME_IDENTITY', 'id'),
    'login' => env('PAYME_LOGIN', 'TestUser'),
    'key' => env('PAYME_KEY', 'TestKey'),
    'merchant_id' => env('PAYME_MERCHANT_ID', '123456789'),
    'allowed_ips' => [
        '185.178.51.131', '185.178.51.132', '195.158.31.134', '195.158.31.10', '195.158.28.124', '195.158.5.82', '127.0.0.1'
    ]
];

'providers' => [
    // Other Service Providers
    Khamdullaevuz\Payme\PaymeServiceProvider::class,
],

'aliases' => [
    // Other Aliases
    'Payme' => Khamdullaevuz\Payme\Facades\Payme::class,
],

use Khamdullaevuz\Payme\Facades\Payme;
use Khamdullaevuz\Payme\Http\Middleware\PaymeCheck;
use Illuminate\Http\Request;

// Other Routes

Route::any('/payme', function (Request $request) {
    return Payme::handle($request);
})->middleware(PaymeCheck::class);
bash
php artisan vendor:publish --tag=payme-config
bash
php artisan migrate