Download the PHP package chistel/multi-payment without Composer
On this page you can find all versions of the php package chistel/multi-payment. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download chistel/multi-payment
More information about chistel/multi-payment
Files in chistel/multi-payment
Package multi-payment
Short Description A multiple payment gateway adapter for laravel
License MIT
Informations about the package multi-payment
Multi-payment for laravel
This is a very simple and light package that allows you to add multiple payment methods in your application without having to use lots of conditional statements and is library agnostic.
With this package, you can keep the uniformity of initiating and verifying payments.
Installation
This package can be installed through Composer.
In Laravel 5.5 and above the service provider will automatically get registered. In older versions of the framework just add the service provider in config/app.php
file:
Optionally you can publish the config file with:
This is the content of the file that will be published in config/multi-payment.php
Usage
First create a gateway class of your choice with extends which should implement the purchase and complete method. A couple of action classes for initiating and completing payments were also made available.
Based on the action classes, there are also events which can be used for listeners after success or failed payments. They return the gateway name, payer and the gateway response.
The sample below shows how the events get used via the EventProvider
And your listener should be similar to the sample below
check out a full usage in the Comprehensive demo repository
Tests
The test is currently not done
Security
If you discover any security related issues, please email [email protected] instead of using the issue tracker.