Download the PHP package digikraaft/laravel-paystack-webhooks without Composer

On this page you can find all versions of the php package digikraaft/laravel-paystack-webhooks. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.

FAQ

After the download, you have to make one include require_once('vendor/autoload.php');. After that you have to import the classes with use statements.

Example:
If you use only one package a project is not needed. But if you use more then one package, without a project it is not possible to import the classes with use statements.

In general, it is recommended to use always a project to download your libraries. In an application normally there is more than one library needed.
Some PHP packages are not free to download and because of that hosted in private repositories. In this case some credentials are needed to access such packages. Please use the auth.json textarea to insert credentials, if a package is coming from a private repository. You can look here for more information.

  • Some hosting areas are not accessible by a terminal or SSH. Then it is not possible to use Composer.
  • To use Composer is sometimes complicated. Especially for beginners.
  • Composer needs much resources. Sometimes they are not available on a simple webspace.
  • If you are using private repositories you don't need to share your credentials. You can set up everything on our site and then you provide a simple download link to your team member.
  • Simplify your Composer build process. Use our own command line tool to download the vendor folder as binary. This makes your build process faster and you don't need to expose your credentials for private repositories.
Please rate this library. Is it a good library?

Informations about the package laravel-paystack-webhooks

Handle Paystack Webhooks in a Laravel application

tests Build Status Scrutinizer Code Quality Code Intelligence Status License: MIT

Paystack can notify your application about various events via webhooks. This package can help you handle those webhooks. It will automatically verify all incoming requests and ensure they are coming from Paystack. By default, a route that points to this package's webhook controller is configured through the service provider.

Please note that this package will NOT handle what should be done after the request has been validated. You should still write the code for that.

Find out more details about Paystack's Event here

Installation

You can install the package via composer:

Configuration File

The Laravel Paystack Webhooks package comes with a configuration file, here is the content of the file:

You can publish this config file with the following commands:

API Keys

You should configure your Paystack keys in your .env file. You can get your Paystack API keys from the Paystack dashboard.

Handling Paystack Webhooks

Paystack can notify your application about various events via webhooks. This package can help you handle those webhooks. It will automatically verify all incoming requests and ensure they are coming from Paystack. By default, a route that points to this package's webhook controller is configured through the service provider.

Please note that this package will NOT handle what should be done after the request has been validated. You should still write the code for that. All you need do is to extend the controller in order to handle any webhook event you like. For example, if you wish to handle the charge.success event, you should add a handleChargeSuccess method to the controller:

To ensure your application can handle Paystack webhooks, be sure to configure the webhook URL in the Paystack dashboard. By default, this package's webhook controller listens to the /paystack/webhook.

Next, define a route to your controller within your routes/web.php file.

Webhooks & CSRF Protection

Since Paystack webhooks need to bypass Laravel's CSRF protection, be sure to list the URI as an exception in your VerifyCsrfToken middleware or list the route outside of the web middleware group:

This package emits a Digikraaft\PaystackWebhooks\Events\WebhookReceived event when a webhook is received, and a Digikraaft\PaystackWebhooks\Events\WebhookHandled event when a webhook was handled by you. Both events contain the full payload of the Paystack webhook.

You can find details about Paystack events here

Verifying Webhook Signatures

For convenience, this package automatically includes a middleware which validates that the incoming Paystack webhook request is valid.

Testing

Use the command below to run your tests:

More Good Stuff

Check here for more awesome free stuff!

Changelog

Please see CHANGELOG for more information on what has changed recently.

Contributing

Please see CONTRIBUTING for details.

Security

If you discover any security related issues, please email [email protected] instead of using the issue tracker.

Credits

License

The MIT License (MIT). Please see License File for more information.


All versions of laravel-paystack-webhooks with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0|^8.1|^8.2
guzzlehttp/guzzle Version ^7.3
laravel/framework Version ^9.0|^10.0
Composer command for our command line client (download client) This client runs in each environment. You don't need a specific PHP version etc. The first 20 API calls are free. Standard composer command

The package digikraaft/laravel-paystack-webhooks contains the following files

Loading the files please wait ....