PHP code example of daaner / laravel-unitpay

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

    

daaner / laravel-unitpay example snippets


'providers' => [

    Daaner\UnitPay\UnitPayServiceProvider::class,

]

    'UnitPay' => Daaner\UnitPay\Facades\UnitPay::class,
 bash
php artisan vendor:publish --provider="Daaner\UnitPay\UnitPayServiceProvider"
 bash
php artisan vendor:publish --provider="Daaner\UnitPay\UnitPayServiceProvider" --tag=config
 bash
php artisan vendor:publish --provider="Daaner\UnitPay\UnitPayServiceProvider" --tag=views
 php
UnitPay::payOrderFromGate(Request $request)
 php
 'searchOrderFilter' => null  // ExampleController:searchOrderFilter($request)
 php
 'paidOrderFilter' => null  // ExampleController::paidOrderFilter($request,$order)
 php
 Route::get('/unitpay/result', 'ExampleController@payOrderFromGate');