Download the PHP package arafadev/payment-gateways without Composer
On this page you can find all versions of the php package arafadev/payment-gateways. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download arafadev/payment-gateways
More information about arafadev/payment-gateways
Files in arafadev/payment-gateways
Package payment-gateways
Short Description Multi-gateway payments manager for Laravel
License MIT
Informations about the package payment-gateways
payment-gateway 💳
Table of Contents
- Introduction
- Features
- Available Payment Gateways
- Installation
- Configuration
- Usage
- Creating a New Payment Gateway
- License
Introduction
payment-gateway is a PHP package that provides a unified way to integrate multiple payment gateways into your Laravel application. It simplifies the process of handling different payment providers by offering a standardized interface and response format.
No more dealing with different API structures and response formats for each payment gateway! With payment-gateway, you can switch between payment providers with minimal code changes. ⚡
Features
- Unified Interface - Interact with all payment gateways using the same methods
- Standardized Responses - All payment responses are normalized using the
PaymentResponse
class - Multiple Gateways - Support for popular payment gateways in the MENA region and globally
- Easy Configuration - Simple configuration through Laravel's config system
- Flexible Architecture - Easily extend with your own payment gateway implementations
- Error Handling - Consistent error handling across all payment gateways
- Test Mode Support - Switch between test and live environments with a single config change
Available Payment Gateways
The package currently supports the following payment gateways:
- Moyasar - Popular payment gateway in Saudi Arabia
- Tap - Kuwait-based payment gateway
- Paymob - Egyptian payment gateway
- MyFatoorah - Kuwait-based payment solution
- AlRajhiBank - Saudi bank payment gateway
- Geidea - Saudi-based payment processor
- Stripe - Global payment gateway
- PayPal - Global payment solution
- Fawry - Egyptian payment service
- Tabby - Buy now, pay later service
- Hyperpay - Payment gateway by HyperPay
- ClickPay - Middle East payment gateway
- Telr - UAE-based payment gateway
- Urway - Saudi payment gateway
- Tamara - Buy now, pay later service
Installation
You can install the package via composer:
Configuration
After installation, publish the configuration file:
This will create a config/payments.php
file where you can configure your payment gateways.
Configuration Example
Usage
Basic Usage with MoyasarService
Here's an example of how to use the package with Moyasar payment gateway:
You can send the following JSON data to Moyasar, either via Postman, cURL, or directly from your code:
Using the PaymentResponse
The PaymentResponse
class standardizes all payment gateway responses with the following properties:
This standardization allows you to handle responses from different payment gateways in a consistent way.
Creating a New Payment Gateway
To create your own payment gateway, you need to:
- Create a new class that implements the
PaymentGatewayInterface
- Extend the
BasePaymentService
class for common functionality - Implement the required methods
Here's an example of a custom payment gateway:
License
The payment-gateway package is open-sourced software licensed under the MIT license.
For more details, please refer to the LICENSE file included with this package.
All versions of payment-gateways with dependencies
illuminate/support Version ^8.0|^9.0|^10.0|^12.0
illuminate/routing Version ^8.0|^9.0|^10.0|^12.0
illuminate/config Version ^8.0|^9.0|^10.0|^12.0
illuminate/contracts Version ^8.0|^9.0|^10.0|^12.0