Download the PHP package omalizadeh/laravel-multi-payment without Composer
On this page you can find all versions of the php package omalizadeh/laravel-multi-payment. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download omalizadeh/laravel-multi-payment
More information about omalizadeh/laravel-multi-payment
Files in omalizadeh/laravel-multi-payment
Package laravel-multi-payment
Short Description A driver-based laravel package for online payments via multiple gateways
License MIT
Homepage https://github.com/omalizadeh/laravel-multi-payment
Informations about the package laravel-multi-payment
Laravel Online Payment Gateway Package
This is a laravel gateway payment package with multi driver support. Each driver can have multiple configurations. Supports laravel v8.0+ and requires php v8.1+
Star! if you liked this package.
Supported Gateways
- Mellat Bank (Behpardakht)
- Saman Bank (Sep)
- Parsian Bank (Top)
- Pasargad Bank (Pep)
- Eghtesad Novin Bank (Pardakht Novin)
- Zarinpal
- IDPay
- Pay.ir
- Zibal
- PayStar
Installation & Configuration
Install using composer
Publish main config file
Publish gateway config file based on tags. like:
- zarinpal-config
- mellat-config
- saman-config
- pasargad-config
- novin-config
For example:
Also you can publish view file for gateway redirection and customize it
In main config file multipayment.php
, you can specify default driver. For example, zarinpal.second
value states that zarinpal
gateway with configuration under second
key section on zarinpal config file will be used. There is also an option for auto amount conversion from Iranian Tomans to Iranian Rials currency (IRR) and vice versa.
In each gateway config file, you can specify multiple credentials, therefore you may have multiple gateways for your app from same provider.
Usage
Gateway payment has two major phases. first is purchase (start process by calling gateway api for a transaction_id/token) and opening gateway payment web page with received data. second is verification (checking payment was successful).
Purchase
Inovice
objects hold payment data. first you create an invoice, set amount and other information, then you pass invoice to PaymentGateway
Facade to start payment process. you can use setProvider
method on facade to change gateway before payment.
Verification
After payment gateway redirection to your app, you must create an invoice and set it's transaction_id and amount. then use PaymentGateway
to verify invoice successful payment.
Other Features
Unverified Payments
There is also a method (supported by zarinpal only for now) to get a list of successful unverified payments. use unverifiedPayments
method in PaymentGateway
facade for this feature.
Refund
Using refund
method, you can refund a successful payment back to customer.
All versions of laravel-multi-payment with dependencies
ext-json Version *
guzzlehttp/guzzle Version ^7.5
illuminate/contracts Version ^8.0 || ^9.0 || ^10.0
illuminate/http Version ^8.0 || ^9.0 || ^10.0
illuminate/support Version ^8.0 || ^9.0 || ^10.0
ramsey/uuid Version ^4.7