PHP code example of fillincode / robokassa

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

    

fillincode / robokassa example snippets


php artisan vendor:publish --provider="Fillincode\Robokassa\RobokassaServiceProvider"

[
    'login' => env('ROBOKASSA_LOGIN', 'test_login'),
    'pass_1' => env('ROBOKASSA_PASS_1', 'test_pass1'),
    'pass_2' => env('ROBOKASSA_PASS_2', 'test_pass2'),
    'test_pass_1' => env('ROBOKASSA_TEST_PASS_1', 'test_pass1'),
    'test_pass_2' => env('ROBOKASSA_TEST_PASS_2', 'test_pass2'),
    'is_test' => env('ROBOKASSA_TEST', true),
    
    'log_driver' => 'stack',
    
    'log_during_testing' => false,
];

$robokassa = new Robokassa($invoice->id, 'Покупка', $sum);
$link = $robokassa->getLink();

$robokassa = new Robokassa($request->get('InvId'), '', $request->get('OutSum'), $request->get('OutSumCurrency'));
$status = $robokassa->checkResultCRC($request->get('SignatureValue'));

$robokassa = new Robokassa($request->get('InvId'), '', $request->get('OutSum'), $request->get('OutSumCurrency'));
$status = $robokassa->checkSuccessCRC($crc);