PHP code example of jlorente / laravel-payu

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

    

jlorente / laravel-payu example snippets


return [
    //other stuff
    'providers' => [
        //other stuff
        \Jlorente\Laravel\PayU\PayUServiceProvider::class,
    ];
];

return [
    //other stuff
    'aliases' => [
        //other stuff
        'PayU' => \Jlorente\Laravel\PayU\Facades\PayU::class,
    ];
];

return [
    'api_key' => 'YOUR_API_KEY',
    'api_login' => 'YOUR_API_LOGIN',
    'merchant_id' => 'YOUR_MERCHANT_ID',
    'language' => 'YOUR_LANGUAGE' // Currently 'en, 'es', 'pt (default 'es')
    'is_test' => 'YOUR_IS_TEST' // true or false
    //other configuration
];

PayU::tokens()::create($params);
PayU::payments()::doAuthorizationAndCapture($params);
PayU::reports()::getOrderDetail($parameters);
bash
$ php composer.phar 
bash
$ php artisan vendor:publish --provider='Jlorente\Laravel\PayU\PayUServiceProvider'