jangras / kwikpaisa
A PHP package for integrating KwikPaisa payment gateway.
Requires
- php: ^8.2
- guzzlehttp/guzzle: ^7.0
- illuminate/support: ^11.0
README
markdown
KwikPaisa PHP SDK Integration Guide
Overview
This guide provides instructions for integrating the KwikPaisa PHP SDK into your Laravel application. You can choose between downloading the SDK package or installing it via Composer. Additionally, the guide covers setting up the configuration files and using the SDK in your Laravel controllers.
Installation
Option 1: Download the Package File
1. Download the Package:
Download the latest version of the kwikpaisa-php-packages.zip
file from the KwikPaisa website or repository.
2. Extract the Package:
Unzip the kwikpaisa-php-packages.zip
file to extract the SDK and its dependencies.
3. Include the SDK in Your Project:
Copy the extracted kwikpaisa
folder into your project’s directory. For example, place it in the packages
folder.
4. Autoload the SDK:
Update your composer.json
file to include the following autoload configuration:
"autoload": { "psr-4": { "Jangras\\Kwikpaisa\\": "path/to/kwikpaisa/src/" } }
Replace "path/to/kwikpaisa/src/"
with the actual path where you copied the kwikpaisa
folder.
5. Update Composer Autoload:
Run the following command to regenerate the Composer autoload files:
composer dump-autoload
6. Clear Laravel's Configuration and Cache:
Run these Artisan commands to ensure Laravel picks up the new changes:
php artisan config:clear php artisan cache:clear
7. Initialize and Use the SDK:
Initialize the SDK in your code as described in the SDK documentation and start using it.
Option 2: Install via Composer
1. Require the SDK:
Execute the following Composer command to install the KwikPaisa SDK:
composer require jangras/kwikpaisa
2. Composer Installation:
Composer will automatically download and install the SDK and its dependencies.
3. Autoloading:
Composer will handle autoloading of SDK classes, so no additional autoload configuration is necessary.
4. Clear Laravel's Configuration and Cache:
Run these Artisan commands to ensure Laravel picks up the new changes:
php artisan config:clear php artisan cache:clear
5. Initialize and Use the SDK:
After installation, initialize the SDK in your code as described in the SDK documentation and start using it.
Additional Resources
To get sample code and usage instructions for the KwikPaisa NEO Bank - PG SDK, refer to the official documentation: