PHP code example of maksa988 / laravel-freekassa

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

    

maksa988 / laravel-freekassa example snippets


Maksa988\FreeKassa\FreeKassaServiceProvider::class,

'FreeKassa' => Maksa988\FreeKassa\Facades\FreeKassa::class,

$amount = 100; // Payment`s amount

$url = FreeKassa::getPayUrl($amount, $order_id);

$redirect = FreeKassa::redirectToPayUrl($amount, $order_id);

$rows = [
    'time' => Carbon::now(),
    'info' => 'Local payment'
];

$url = FreeKassa::getPayUrl($amount, $order_id, $email, $phone, $rows);

$redirect = FreeKassa::redirectToPayUrl($amount, $order_id, $email, $phone, $rows);
 bash
php artisan vendor:publish --provider="Maksa988\FreeKassa\FreeKassaServiceProvider"
 php
FreeKassa::handle(Request $request)
 php
'searchOrder' => null  // FreeKassaController@searchOrder(Request $request)
 php
'paidOrder' => null  // FreeKassaController@paidOrder(Request $request, $order)
 php
 Route::get('/freekassa/result', 'FreeKassaController@handlePayment');