PHP code example of vhar / laravel-robokassa

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

    

vhar / laravel-robokassa example snippets


    'merchants' => [
        ...
        'merchant2' => [
            'login' => 'merchant2_login',
            'password1' => 'merchant2_password_1',
            'password2' => 'merchant2_password_2',
            'test_password1' => 'merchant2_test_password_1',
            'test_password2' => 'merchant2_test_password_2',
            'is_test' => false,
            'hashType' => 'md5',
        ],
    ],




use Vhar\LaravelRobokassa\Facades\Robokassa;

$link = Robokassa::merchant('merchant2')
    ->sendPaymentRequestCurl([
        'OutSum' => 123.45,
        'Description' => 'Описание',
        'InvoiceID' => 7,
    ]);
bash
$ php artisan vendor:publish --provider="Vhar\LaravelRobokassa\Providers\RobokassaServiceProvider"