PHP code example of maksa988 / laravel-unitpay

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


Maksa988\UnitPay\UnitPayServiceProvider::class,

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

$amount = 100; // Payment`s amount

$email = "[email protected]"; // Your customer`s email

$description = "Test payment";

//

$url = UnitPay::getPayUrl($amount, $order_id, $email, $description, $currency);

$redirect = UnitPay::redirectToPayUrl($amount, $order_id, $email, $description, $currency);
 bash
php artisan vendor:publish --provider="Maksa988\UnitPay\UnitPayServiceProvider"
 php
UnitPay::handle(Request $request)
 php
'searchOrder' => null  // UnitPayController@searchOrder(Request $request)
 php
'paidOrder' => null  // UnitPayController@paidOrder(Request $request, $order)
 php
 Route::get('/unitpay/result', 'UnitPayController@handlePayment');