Download the PHP package gcorpllc/paypey without Composer
On this page you can find all versions of the php package gcorpllc/paypey. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Download gcorpllc/paypey
More information about gcorpllc/paypey
Files in gcorpllc/paypey
Package paypey
Short Description The Paypey package is a simple and powerful solution for connecting to various payment gateways in Laravel projects.
License MIT
Informations about the package paypey
Paypey - Laravel Payment Gateway Aggregator
Paypey is a production-ready, driver-based payment gateway aggregator for Laravel applications. It provides a unified, fluent API for integrating major Iranian payment gateways (Zarinpal, Mellat, Saman, Parsian, IdPay, NextPay) as well as sandbox and international gateways.
Readme Languages
- English Documentation
- راهنمای فارسی (Persian Documentation)
Features
- Fluent API: Expressive methods for payment creation and verification (
Paypey::via('zarinpal')->amount(10000)->request()). - Driver Pattern (Strategy): Easily switch between payment drivers or extend with custom drivers via
Paypey::extend(). - Supported Gateways:
- Sandbox / Fake (Zero network calls required for local testing)
- Zarinpal (Normal & ZarinGate)
- Mellat (BAM)
- Saman (SEP)
- Parsian (PEC)
- IdPay
- NextPay
- Stripe & PayPal (Secondary international drivers)
- Automatic Currency Conversion: Seamless handling between Toman and Rial.
- Auto-Verification: Automatic gateway detection on
Paypey::verify()from HTTP request parameters or transaction history. - Transaction History: Built-in migration and
TransactionEloquent model with helper scopes (successful(),failed(),pending()). - Laravel Events: Dispatches
TransactionCreated,TransactionSuccessful, andTransactionFailed. - Testing Engine: Built-in mocking via
Paypey::fake().
Requirements
- PHP
>= 8.2 - Laravel
>= 10.0or>= 11.0
Installation
-
Install the package via Composer:
-
Publish the configuration file and database migrations:
- Run migrations to create
paypey_transactionstable:
Configuration
The published config/paypey.php allows you to set default driver, global currency unit, and gateway credentials:
Usage Examples
1. Requesting Payment
2. Verifying Payment
In your callback controller action:
Automatic Currency Conversion
When paypey.currency is set to 'toman', Paypey automatically multiplies amounts by 10 before constructing request payloads for drivers expecting Rials (e.g., Mellat, Saman, Parsian, IdPay, NextPay). Receipt object values reflect original transaction amounts cleanly.
Mocking & Testing
Use Paypey::fake() in your unit/feature tests without contacting live HTTP endpoints:
Adding Custom Drivers
Register custom payment gateways using Paypey::extend():
License
The Paypey package is open-sourced software licensed under the MIT license.