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

Mellat Laravel Package

armincms/mellat

Mellat is a Laravel package for integrating the Mellat Bank payment gateway, handling payment requests, verification, and transaction callbacks in PHP applications.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit

  • Laravel/PHP package with a conventional integration surface (Composer install, service provider, publishable config, likely a facade and/or injected gateway client). This fits a standard Laravel monolith or modular app without architectural change.
  • The 0.1.2 fix ("wrong redirection after payment") implies an off-site/hosted checkout flow: the app hands off to the gateway, the gateway returns the customer to a return/callback URL. That means the package owns or influences HTTP redirect behaviour, session state on return, and probably order-status reconciliation.
  • Fit is good for teams already on Laravel's HTTP kernel + session + queue stack; poor fit for headless/SPA-only or API-only architectures unless the package also exposes webhook handling.

Integration feasibility

  • Low mechanical cost: composer require, publish config, add credentials to env, register routes (return URL + webhook). Expect exception from CSRF for the webhook route.
  • Real cost is verification, not installation — the package sits on the money path, so sandbox contract testing with the gateway's test cards is mandatory before production.

Technical risk

  • Pre-1.0 versioning. At 0.1.x there is no SemVer stability guarantee; minor bumps can break. Composer's caret on 0.1.2 constrains you to 0.1.x patches, which is the correct defensive default.
  • The defect itself is high-severity for the business, low-severity technically: a wrong post-payment redirect produces orphaned orders, duplicate-payment attempts by confused users, and reconciliation gaps — even though no money was mis-captured.
  • Unknown coverage. There is no evidence in the data provided of a test suite, CI, or the gateway(s) supported; a redirect bug shipping in a payment package is a mild signal that return-path scenarios were under-tested.
  • Unverified: webhook signature verification, idempotency handling, refund/partial-capture support, PCI scope, and license.

Key questions

  1. Which gateway(s) and API version does this target, and is the redirect URL configurable per environment?
  2. Does the fix change redirect behaviour (different target) or just correct a bug — i.e., must existing integrations update config or return-URL registrations?
  3. Are webhooks implemented and signature-verified? Is the webhook, not the redirect, the source of truth for order state?
  4. Are idempotency keys used on charge creation to prevent double capture on retry?
  5. Supported Laravel and PHP version matrix, test coverage, CI status, and maintainer/response history.
  6. What is the license, and is there a credible path to vendor support or is this bus-factor-one?

Integration Approach

Stack fit

  • Assumes Laravel with session driver (Redis/DB) and a queue worker; PHP version per the package's composer.json constraint. Verify against the app's current Laravel major before committing — Laravel majors ship annually and package constraints often lag.
  • If the app is API-first with a separate frontend, confirm whether the redirect target can be an absolute frontend URL; otherwise this package may force server-rendered return pages.

Migration path

  • Greenfield adoption (no incumbent to migrate from), so treat this as a pilot: pin 0.1.2 exactly or use ~0.1.2, and wrap all package calls behind a thin internal PaymentGateway interface. The wrapper is the insurance policy against pre-1.0 churn and against swapping vendors later.
  • Do not let package models, config keys, or redirect logic leak into domain code.

Compatibility

  • Confirm: Laravel/PHP constraints, whether the 0.1.2 fix alters the redirect destination (could invalidate any registered return URLs in the gateway dashboard or whitelisted domains), and whether config keys changed between 0.1.1 and 0.1.2.
  • Check for published migrations and whether they are additive.

Sequencing

  1. Read the 0.1.2 diff — specifically whether the redirect fix is behavioural.
  2. Sandbox spike: happy path, declined card, 3DS/SCA challenge, user-abandon-mid-redirect, browser back-button after payment, duplicate submit.
  3. Add a regression test for post-payment redirect to the app's own suite so a future package bump cannot silently reintroduce the defect.
  4. Staging with gateway test cards, then production behind a feature flag with a small cohort.
  5. Enable webhook-as-source-of-truth and a reconciliation job before scaling traffic.

Operational Impact

Maintenance

  • Expect periodic churn: pre-1.0 packages release breaking changes without a major-version signal. Budget a recurring review of release notes; pin versions and upgrade deliberately rather than automatically.
  • The 0.1.2 patch is a positive maintenance signal — someone is fixing money-path bugs promptly.

Support

  • Support posture is unknown from the data available. Assume community-only until proven otherwise: assign a named internal owner, and maintain a runbook covering credential rotation, redirect-URL changes, and webhook replay.
  • Keep the internal adapter so support for the vendor is not a hard dependency.

Scaling

  • The redirect leg is stateless and cheap; the load lands on webhook ingestion and order-status writes. Queue webhook processing, make handlers idempotent, and index on gateway transaction ID.
  • Watch session store: users returning from an external gateway after a long 3DS challenge can hit session expiry — verify the return handler does not depend on session data that may be gone.

Failure modes

  • Wrong/missing redirect → orphaned orders, user retries, duplicate-charge complaints, support volume. Mitigate with webhook-driven order state and a scheduled reconciliation sweep that flags paid-but-unfulfilled orders.
  • Webhook loss or signature failure → silent under-fulfilment; alert on payment-authorised-without-order-completed.
  • Gateway timeout → ambiguous charge state; require idempotency keys and a query-by-reference recovery path.
  • Package regression on upgrade → reintroduced redirect bug; covered by the app-level regression test above.
  • Detect all of the above with a single dashboard metric: mismatch count between gateway settlements and internal order status, alerted at >0.

Ramp-up

  • Small for any Laravel-fluent developer: roughly 1–2 days to a working sandbox integration, plus 2–3 days for failure-path testing and reconciliation wiring before production exposure.
  • Add gateway-domain knowledge time if the team has not previously operated a hosted-checkout flow (SCA, partial refunds, chargebacks).
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.
htinlynn/genius-helper
maco-studios/hephaestus
elmogy/larafast
xeviant/laravel-paystack
gorilladash/laravel-website-sdk
martialbe/flysystem-oss
chondal/3312client
jeroen-g/flickr
opscale-co/nova-genbi
itsjustvita/laravel-retention
tequilarapido/trackit
gregsphotography/site-builder-filament
cabaoctavio/laravel-query-log
gregsphotography/site-builder-components
io-digital/clickatell
snowsoft/laravel-admin
oxygen/auth
relicsoftware/barakah-payment-gateway
tobya/work-with-composer
equipc/laravel-email-validator