Weave Code
Weaver
Helps Laravel developers discover, compare, and choose open-source packages. See popularity, security, maintainers, and scores at a glance to make better decisions.
Feedback
Share your thoughts, report bugs, or suggest improvements.
Subject
Message

Gateway Laravel Package

parsisolution/gateway

Parsisolution Gateway is a Laravel package offering a unified interface for multiple payment gateways. It simplifies configuration, payment initiation, and callback verification, letting PHP applications integrate online payments through a consistent, reusable API.

View on GitHub
Deep Wiki
Context7

Iranian Payment Gateways

Frequently asked questions about Gateway
What is parsisolution/gateway and which Iranian payment gateways does it support?
Parsisolution Gateway is a Laravel package that provides a unified, driver-based interface over multiple Iranian payment service providers. Instead of writing gateway-specific code for each PSP, you call a common contract (pay, verify, settle or cancel) and swap the underlying driver through configuration. The abstraction is designed around Iranian PSPs such as Zarinpal, Behpardakht (Mellat), Parsian, Sadad, IDPay, Pay.ir and Zibal, but you should confirm the exact driver list in the repository README before committing, since drivers can be added or dropped between releases.
How do I install parsisolution/gateway in a Laravel application?
Install it with Composer using composer require parsisolution/gateway. The package ships a Laravel service provider and facade that are registered through package auto-discovery, so no manual provider editing is normally required. After installation, publish the configuration file with the vendor:publish command so you can set merchant credentials and callback settings. The mechanical setup is quick; most of your time will go into mapping your order model to the package's payment record and wiring the return-URL controller.
How do I configure merchant IDs and callback URLs for each gateway?
Publish the package config file and fill in the merchant ID, terminal ID or API key for each gateway you intend to use. You also need to define the callback route the PSP will redirect the user back to, and make sure that route is reachable from Iran, since many Iranian gateways require the return endpoint to be accessible domestically. Check whether the callback URL contract supports your routing needs, such as subdomains, locale prefixes or signed URLs, because restrictive callback patterns are a common integration friction point.
Which Laravel and PHP versions does parsisolution/gateway support?
This is not something you should assume from the package description alone. Check the composer.json constraints and the CI matrix in the repository to see whether the package targets Laravel 8 only or also supports 10, 11 and 12, and whether PHP 8.2 and 8.3 are tested. If the constraints look stale or the CI matrix is missing, plan a short spike that installs the package on your target Laravel and PHP versions and runs a full pay-and-verify flow in test mode before you adopt it.
Can I test payments with a sandbox before going live?
Most Iranian PSPs provide sandbox or test merchant accounts, and you should validate your integration end to end against those before touching production credentials. It is unclear from the available metadata whether the package ships recorded HTTP fixtures or sandbox helpers, so verify that in the repository. In your own test suite, you can fake the underlying Laravel HTTP client and assert that successful verifies mark orders paid while failed or tampered responses do not.
Is the verify operation idempotent, and how are duplicate callbacks handled?
Idempotency is one of the most important things to confirm with the maintainer, because PSPs can and do deliver the same callback more than once. Ask directly whether calling verify twice is safe, or whether the second call fails or double-credits an order. Regardless of the answer, defend in your application layer by storing each Authority or token with a unique database constraint and wrapping the verify-and-mark-paid step in a transaction so a replayed callback cannot create a second payment.
Does the package verify callback data server-side against the gateway API?
You should not mark an order as paid based on the callback payload alone, since amount, authority and status values in a redirect can be forged. Confirm in the source that the package performs a server-to-server verify call to the gateway's own verification endpoint and that your code checks the returned amount against the expected order total. If the package trusts the callback payload, add the verification call yourself before flipping any payment state, because this is the single most security-sensitive path in the integration.
How does the package handle amounts in Rial versus Toman?
Iranian gateways generally expect amounts in Rial as integers, while many applications display Toman, so the multiplication by ten has to happen somewhere explicit. Find out whether the package accepts raw gateway units or performs a conversion internally, and keep your own storage in minor units to avoid rounding errors. Add a test that asserts the exact amount sent to the gateway so a silent currency mismatch cannot slip into production.
Does parsisolution/gateway support refunds and partial reversals?
Most Iranian PSPs only allow refunds through their merchant panel rather than a public API, so a package-level refund method is often not available for every driver. Check the contract to see whether refund or reversal is exposed as a first-class operation and which drivers actually implement it. In practice you should plan for settlement reconciliation against the PSP dashboard, keeping your own ledger of payments so manual refunds can be matched back to orders.
Is parsisolution/gateway production-ready, and what are the alternatives?
The package sits directly in the money path and handles merchant credentials, yet it has modest popularity and likely a single maintainer with thin test coverage, so treat it as a dependency that needs review rather than a drop-in. Before going live, check the last commit per driver, whether tagged releases and a security policy exist, and whether anyone else co-maintains the project. Comparable abstractions include shetabit/payment and laravel/payment, which follow the same driver pattern and may have broader adoption. Also note that this package is Iran-domestic only, so it cannot serve as a shared abstraction across international card acquiring and Iranian checkout paths.
Weaver

How can I help you explore Laravel packages today?

Conversation history is not saved when not logged in.
Prompt
Add packages to context
No packages found.
abbasudo/artisan-route
mirvan/ippanel
ignibyte/aic-framework
glavweb/data-schema-bundle
glavweb/datagrid-bundle
tacticmedia/scim-server
uni-method/frame
neika-ai/sdk
adachsoft/php-code-style
pharaonic/laravel-notification-dependencies
beautinow/translug
dev-brainiac/bot-cloaked
octoberrain/html
octoberrain/extension
octoberrain/exception
octoberrain/contracts
adachsoft/api-version-bundle
cgv/localized-resource
noith/settings
kda/laravel-package