1. Go to this page and download the library: Download makkapoya/pay-uz-tenancy 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/ */
makkapoya / pay-uz-tenancy example snippets
//handle requests from payment system
Route::any('/handle/{paysys}',function($paysys){
(new Makkapoya\PayUz\PayUz)->driver($paysys)->handle();
});
//redirect to payment system or payment form
Route::any('/pay/{paysys}/{key}/{amount}',function($paysys, $key, $amount){
$model = Makkapoya\PayUz\Services\PaymentService::convertKeyToModel($key);
$url = request('redirect_url','/'); // redirect url after payment completed
$pay_uz = new Makkapoya\PayUz\PayUz;
$pay_uz
->driver($paysys)
->redirect($model, $amount, 860, $url);
});