PHP code example of yubarajshrestha / nchl

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

    

yubarajshrestha / nchl example snippets


YubarajShrestha\NCHL\NchlServiceProvider::class,

'NCHL' => YubarajShrestha\NCHL\Facades\NchlFacade::class,

// In Controller
$nchl = NCHL::__init([
    "txn_id" => '3',
    "txn_date" => '1-10-2020',
    "txn_amount" => '500',
    "reference_id" => 'REF-001',
    "remarks" => 'RMKS-001',
    "particulars" => 'PART-001',
]);

// In Controller
$nchl = NCHL::__init([
    "txn_id" => '3',
    "txn_date" => '1-10-2020',
    "txn_amount" => '500',
    "reference_id" => 'REF-001',
    "remarks" => 'RMKS-001',
    "particulars" => 'PART-001',
]);

/** Validating Payment **/
$response = $nchl->paymentValidate();

/** Retrieving payment details **/
$response = $nchl->paymentDetails();

shell
php artisan vendor:publish --provider="YubarajShrestha\NCHL\NchlServiceProvider"