Download the PHP package rhaima/larakonnect without Composer
On this page you can find all versions of the php package rhaima/larakonnect. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download rhaima/larakonnect
More information about rhaima/larakonnect
Files in rhaima/larakonnect
Package larakonnect
Short Description Laravel package for Konnect.network payment gateway integration - Accept online payments in Tunisia (bank cards, e-DINAR, wallet)
License MIT
Homepage https://github.com/Rhaima96/larakonnect
Informations about the package larakonnect
LaraKonnect
A Laravel package for integrating Konnect.network payment gateway. Accept online payments in Tunisia via bank cards, e-DINAR, and Konnect wallet.
Features
- ๐ Easy integration with Laravel 10, 11, and 12
- ๐ณ Support for bank cards, e-DINAR, and Konnect wallet
- ๐ Secure payment processing with PCI-DSS compliance
- ๐ฆ Eloquent model with polymorphic relations
- ๐ฏ Event-driven architecture for payment lifecycle
- ๐ Artisan commands for installation and debugging
- ๐งช Sandbox mode for testing
Installation
Run the installation command:
This will:
- Publish the configuration file
- Publish and run migrations (optional)
- Add environment variables to your
.envfile
Configuration
Add your Konnect credentials to .env:
Get your credentials from:
- Sandbox: https://dashboard.sandbox.konnect.network
- Production: https://dashboard.konnect.network
Exclude Webhook from CSRF
Add the webhook route to your CSRF exceptions in app/Http/Middleware/VerifyCsrfToken.php:
Usage
Basic Usage with Facade
Advanced Usage
Using the Model
Using the Trait
Add the trait to any model that can have payments:
Then use it:
Handling Events
Listen to payment events in your EventServiceProvider:
Example listener:
Available Methods
Facade Methods
| Method | Description |
|---|---|
createPaymentLink($amount, $orderId, $description?, $customer?) |
Quick payment link creation |
initPayment($amountMillimes, $orderId, $options?) |
Full payment initialization |
getPayment($paymentRef) |
Get payment details |
isCompleted($paymentRef) |
Check if payment is completed |
getStatus($paymentRef) |
Get payment status enum |
toMillimes($amountTND) |
Convert TND to millimes |
toTND($millimes) |
Convert millimes to TND |
Model Methods
| Method | Description |
|---|---|
createAndInitiate(...) |
Create record and initiate payment |
markAsCompleted() |
Mark payment as completed |
markAsFailed() |
Mark payment as failed |
refreshFromKonnect() |
Sync status from Konnect API |
isCompleted() |
Check if completed |
isPending() |
Check if pending |
Artisan Commands
Testing
Use sandbox mode and test cards:
| Card Type | Number | CVV |
|---|---|---|
| Visa | 4000000000000002 | Any 3 digits |
| Mastercard | 5100000000000008 | Any 3 digits |
Customization
Views
Publish and customize the views:
Views will be published to resources/views/vendor/larakonnect/.
Configuration
Publish the configuration:
Security
If you discover any security vulnerabilities, please email [email protected].
Credits
- Rhaima
- All Contributors
License
The MIT License (MIT). Please see License File for more information.
All versions of larakonnect with dependencies
illuminate/support Version ^10.0|^11.0|^12.0
illuminate/http Version ^10.0|^11.0|^12.0
illuminate/routing Version ^10.0|^11.0|^12.0
guzzlehttp/guzzle Version ^7.0