Download the PHP package yasserbenaioua/chargily-epay-laravel without Composer

On this page you can find all versions of the php package yasserbenaioua/chargily-epay-laravel. 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 chargily-epay-laravel

A laravel package for chargily epay gateway

Latest Version on Packagist GitHub Tests Action Status GitHub Code Style Action Status Total Downloads

Installation

You can install the package via composer:

You must publish the config file with:

This is the contents of the config file that will be published at config/chargily.php :

Next, you must publish the migration with:

After the migration has been published, you can create the chargily_webhook_calls table by running the migrations:

Finally, take care of the routing: At the chargily config file you must configure at what URL Chargily webhook should be sent. In the routes file of your app you must pass that route to the Route::githubWebhooks route macro:

Behind the scenes this macro will register a POST route to a controller provided by this package. We recommend to put it in the api.php routes file, so no session is created when a webhook comes in, and no CSRF token is needed.

Should you, for any reason, have to register the route in your web.php routes file, then you must add that route to the except array of the VerifyCsrfToken middleware:

Usage

Firstly, you may create a payment like this:

then use getRedirectUrl() method to get the checkout link:

Chargily will sign all requests hitting the webhook url of your app. This package will automatically verify if the signature is valid.

Unless something goes terribly wrong, this package will always respond with a 200 to webhook requests. All webhook requests with a valid signature will be logged in the chargily_webhook_calls table. The table has a payload column where the entire payload of the incoming webhook is saved.

If the signature is not valid, the request will not be logged in the chargily_webhook_calls table but a Spatie\WebhookClient\Exceptions\InvalidWebhookSignature exception will be thrown. If something goes wrong during the webhook request the thrown exception will be saved in the exception column. In that case the controller will send a 500 instead of 200.

To handle webhook requests you can define a job that does the work. Here's an example of such a job:

After having created your job you must register it at the jobs array in the chargily.php config file.

Deleting processed webhooks

The YasserBenaioua\Chargily\Models\ChargilyWebhookCall is MassPrunable. To delete all processed webhooks every day you can schedule this command.

Testing

Changelog

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

Credits

License

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


All versions of chargily-epay-laravel with dependencies

PHP Build Version
Package Version
Requires php Version ^8.0
guzzlehttp/guzzle Version ^7.5
illuminate/contracts Version ^8.77|^9.0
spatie/laravel-package-tools Version ^1.9.0
spatie/laravel-webhook-client Version ^3.1.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 yasserbenaioua/chargily-epay-laravel contains the following files

Loading the files please wait ....