mostafax / knet
knet payment service
Installs: 11
Dependents: 0
Suggesters: 0
Security: 0
Stars: 0
Watchers: 1
Forks: 0
Open Issues: 0
Type:laravel-package
README
knet service for payment
Acknowledgements
- knet payment link
Installation
to install Package by composer
composer require mostafax/knet
to publish my package
php artisan vendor:publish
add this keys to your env file
PAYMENT_PRODUCTION_URL=https://kpay.com.kw/kpg/PaymentHTTP.htm?param=paymentInit PAYMENT_TEST_URL=https://kpaytest.com.kw/kpg/PaymentHTTP.htm?param=paymentInit PAYMENT_TRANSPORT_ID=***** PAYMENT_TRANSPORT_PASSWORD=**** PAYMENT_ACTION_CODE=1 PAYMENT_RESOURCE_KEY=************** PAYMENT_LANGUAGE=USA PAYMENT_CURRENCY=414 PAYMENT_ERROR_URL=http://YOURDOMAIN.test/knet/error PAYMENT_SUCCESS_URL=http://YOURDOMAIN.test/knet/success
to init new link
use Mostafax\Knet\Knet;
$data = [ 'amount' => 20, 'order_id' => 200, 'track_id' => rand(0, 9999), 'udf1' => null, 'udf2' => null, 'udf3' => null, 'udf4' => null, 'udf5' => null ];
$Knet = new Knet(); $Knet->init($data);
Call Back Reference
Payment Successful
Post /knet/success
Payment Error
Post /knet/error
Authors
Environment Variables
To run this project, you will need to add the following environment variables to your .env file
PAYMENT_PRODUCTION_URL
knet link for produuction
PAYMENT_TEST_URL
knet link for Test
PAYMENT_TRANSPORT_ID
PAYMENT_TRANSPORT_PASSWORD
PAYMENT_ACTION_CODE
PAYMENT_RESOURCE_KEY
PAYMENT_LANGUAGE
ARA or USA
PAYMENT_CURRENCY
PAYMENT_ERROR_URL
PAYMENT_SUCCESS_URL
you may want to disable CSRF protection
In app/Http/Middleware/VerifyCsrfToken.php:
protected $except = [ 'knet/*' ];
Tech Stack
Client: Blade
Server: PHP, Laravel
Support
For support, email mostafa.m.elbiar@gmail.com.