PHP code example of devadze / laravel-flitt-payment
1. Go to this page and download the library: Download devadze/laravel-flitt-payment 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/ */
devadze / laravel-flitt-payment example snippets
use Devadze\FlittPayment\Facades\FlittPayment;
$response = FlittPayment::setOrderDesc('ბალანსის შევსება')->setAmount(5)->redirect();
return redirect($response['checkout_url']);
namespace App\Listeners;
use Devadze\FlittPayment\Events\PaymentReceived;
use Illuminate\Support\Facades\Log;
class HandleFlittPayment
{
/**
* Create the event listener.
*/
public function __construct()
{
//
}
/**
* Handle the event.
*/
public function handle(PaymentReceived $event): void
{
// implement your login code
Log::info('Flitt payment callback received', $event->response); # you can remove it
}
}