Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/yubarajshrestha/nchl
Connect IPS payment gateway package.
https://github.com/yubarajshrestha/nchl
connect-ips gateway-api laravel nchl
Last synced: 7 days 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 (almost 5 years ago)
- Default Branch: master
- Last Pushed: 2023-07-10T18:57:52.000Z (over 1 year ago)
- Last Synced: 2024-12-12T06:32:54.367Z (11 days ago)
- Topics: connect-ips, gateway-api, laravel, nchl
- Language: PHP
- Homepage: https://yubarajshrestha.github.io/nchl/
- Size: 351 KB
- Stars: 8
- Watchers: 3
- Forks: 7
- Open Issues: 6
-
Metadata Files:
- Readme: readme.md
- License: LICENSE
Awesome Lists containing this project
README
## NCHL
Connect IPS payment gateway package.[![Latest Stable Version](https://poser.pugx.org/yubarajshrestha/nchl/v/stable)](https://packagist.org/packages/yubarajshrestha/nchl)
[![Total Downloads](https://poser.pugx.org/yubarajshrestha/nchl/downloads)](https://packagist.org/packages/yubarajshrestha/nchl)[![License](https://poser.pugx.org/yubarajshrestha/nchl/license)](https://packagist.org/packages/yubarajshrestha/nchl)
![Build](https://travis-ci.com/yubarajshrestha/nchl.svg?branch=master)
[![StyleCI](https://github.styleci.io/repos/230768636/shield?branch=master)](https://github.styleci.io/repos/230768636)
[![All Contributors](https://img.shields.io/badge/all_contributors-2-orange.svg?style=flat-square)](#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 ViewMERCHANT 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