Download the PHP package datavisionint/laravel-mlipa without Composer
On this page you can find all versions of the php package datavisionint/laravel-mlipa. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download datavisionint/laravel-mlipa
More information about datavisionint/laravel-mlipa
Files in datavisionint/laravel-mlipa
Package laravel-mlipa
Short Description Laravel package for M-Lipa payment Gateway
License MIT
Homepage https://github.com/datavisionint/laravel-mlipa
Informations about the package laravel-mlipa
Installation
You can install the package via composer:
By default logs are allowed, so the logs tables will be required. To publish logs tables, run:
If you are not using logs, and wish to customise other configurations, publish the configuration using:
This is the contents of the published config file:
Authentication
The package uses Oauth2, go to M-Lipa Dashboard, then generate client secret and client key. Then update the variables in your .env file accordingly.
Usage
Initiate Push USSD collection
Initiate billing collection
Initiate payout
Reconcile Collection
Reconcile Payout
Custom verification flow
By default verification will turn true. In order to customise in you service provider's boot method implement a callback that returns true. Otherwise, whether nothing is returned or falsy values, the verification will fail. If you have disabled payout models, then $isTransactionValid will be true by default, if the model is defined, then the reference will be checked against the payout, if it exists, then $isTransactionValid will be true, if doesn't $isTransactionValid will be false.
Webhook Events
You can subscribe to webhook events, and use callbacks by subscribing to events. You can subscribe to events in your EventServiceProvider
Event | Property | Type | Description |
---|---|---|---|
BillingFailed | $data | DatavisionInt\Mlipa\MlipaWebhookEventData | An object containing webhook data as in the documentation |
$collection | DatavisionInt\Mlipa\Models\MlipaCollection|null|{The model you define in config} | The collection model instance, will be null if set to null in config, or the model that you define in the config | |
BillingSuccess | $data | DatavisionInt\Mlipa\MlipaWebhookEventData | An object containing webhook data as in the documentation |
$collection | DatavisionInt\Mlipa\Models\MlipaCollection|null|{The model you define in config} | The collection model instance, will be null if set to null in config, or the model that you define in the config | |
PushUssdFailed | $data | DatavisionInt\Mlipa\MlipaWebhookEventData | An object containing webhook data as in the documentation |
$collection | DatavisionInt\Mlipa\Models\MlipaCollection|null|{The model you define in config} | The collection model instance, will be null if set to null in config, or the model that you define in the config | |
PushUssdSuccess | $data | DatavisionInt\Mlipa\MlipaWebhookEventData | An object containing webhook data as in the documentation |
$collection | DatavisionInt\Mlipa\Models\MlipaCollection|null|{The model you define in config} | The collection model instance, will be null if set to null in config, or the model that you define in the config | |
PayoutSuccess | $data | DatavisionInt\Mlipa\MlipaWebhookEventData | An object containing webhook data as in the documentation |
$payout | DatavisionInt\Mlipa\Models\MlipaPayout|null|{The model you define in config} | The payout model instance, will be null if set to null in config, or the model that you define in the config | |
PayoutFailed | $data | DatavisionInt\Mlipa\MlipaWebhookEventData | An object containing webhook data as in the documentation |
$payout | DatavisionInt\Mlipa\Models\MlipaPayout|null|{The model you define in config} | The payout model instance, will be null if set to null in config, or the model that you define in the config |
All versions of laravel-mlipa with dependencies
spatie/laravel-package-tools Version ^1.14.0
illuminate/contracts Version ^10.0|^11