https://github.com/yubarajshrestha/nchl
Connect IPS payment gateway package.
https://github.com/yubarajshrestha/nchl
connect-ips gateway-api laravel nchl
Last synced: 11 months ago
JSON representation
Connect IPS payment gateway package.
- Host: GitHub
- URL: https://github.com/yubarajshrestha/nchl
- Owner: yubarajshrestha
- License: mit
- Created: 2019-12-29T15:27:27.000Z (over 6 years ago)
- Default Branch: master
- Last Pushed: 2023-07-10T18:57:52.000Z (about 3 years ago)
- Last Synced: 2025-08-13T18:18:36.473Z (11 months ago)
- Topics: connect-ips, gateway-api, laravel, nchl
- Language: PHP
- Homepage: https://yubarajshrestha.github.io/nchl/
- Size: 351 KB
- Stars: 8
- Watchers: 2
- Forks: 7
- Open Issues: 6
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
## NCHL
Connect IPS payment gateway package.
[](https://packagist.org/packages/yubarajshrestha/nchl)
[](https://packagist.org/packages/yubarajshrestha/nchl)
[](https://packagist.org/packages/yubarajshrestha/nchl)

[](https://github.styleci.io/repos/230768636)
[](#contributors-)
### Installation
Require this package with composer.
```shell
composer require yubarajshrestha/nchl
```
Laravel 5.5 uses Package Auto-Discovery, so doesn't require you to manually add the ServiceProvider.
### Laravel 5.5+:
If you don't use auto-discovery, add the ServiceProvider to the providers array in config/app.php
```php
YubarajShrestha\NCHL\NchlServiceProvider::class,
```
If you want to use the facade to log messages, add this to your facades in app.php:
```php
'NCHL' => YubarajShrestha\NCHL\Facades\NchlFacade::class,
```
### Copy the package config to your local config with the publish command:
```shell
php artisan vendor:publish --provider="YubarajShrestha\NCHL\NchlServiceProvider"
```
### Copy the environment variables and setup as per required in .env:
```shell
NCHL_MERCHANT_ID=
NCHL_APP_ID=
NCHL_APP_NAME=
NCHL_APP_PASSWORD=
NCHL_GATEWAY=
NCHL_VALIDATION_URL=
NCHL_TRANSACTION_DETAIL_URL=
```
### Basic Usage
A `NCHL` is Service Class and can be instanciated like this:
```php
// 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',
]);
```
And then in view you will create a form to start payment, which redirects you to `Connect IPS`.
```html
// In View
MERCHANT ID
APP ID
APP NAME
TXN ID
TXN DATE
TXN CRNCY
TXN AMT
REFERENCE ID
REMARKS
PARTICULARS
TOKEN
```
After success or failure payment it will redirect you to the redirect url that you've provided to `Connect IPS`.
### Validating Payment and retrieving Payment Details
Re-instantiate the NCHL serivce class same like before.
```php
// 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();
```
Well that's it. Enjoy
### Contributors
### License