paytabscom/laravel_paytabs
Laravel PayTabs provides a straightforward integration for the PayTabs payment gateway in Laravel applications. It handles payment requests, redirects, and callback responses through configurable credentials, letting you add online card payments quickly.
Architecture fit. Unchanged and still good: the package is a thin Laravel wrapper over PayTabs' hosted payment page flow — config file for profile ID / server key / region endpoint, a facade-or-service binding, routes plus controller for redirect and return, optional transaction model and migrations, and a callback endpoint. V1.10.0 adds Morocco and Qatar to the region endpoint map, which is exactly the kind of change this architecture absorbs cheaply: an additive config/constant entry, no new coupling, no change to the request/response shape we depend on. The core architectural property still holds — card data never touches our servers (hosted redirect, SAQ A scope), the right default for a MENA-focused gateway.
Integration feasibility. Technically feasible, still not adoptable as-is. The dominant fact remains the archived repository: no security response process, no compatibility roadmap for newer Laravel/PHP, no commitment to fix things if PayTabs revises its API contract. V1.10.0 is a data point that the vendor still occasionally touches the code, but a terse point release adding two endpoints is not a maintenance commitment — it is a config addition, most likely driven by a single merchant request. 24 stars, 0 dependents still means no community validation and no third party absorbing the upgrade risk for us. "Fork and own" remains realistic given the small code volume, and this release slightly lowers the cost of that fork because the region map we would inherit is now broader.
Technical risk.
Key questions for the vendor/team.
Stack fit. Good on the surface and unchanged: pure Laravel conventions, no exotic dependencies, no queue or cache requirements. It assumes a relational database only if we enable its transaction model, which we should replace with our own payments table so the schema matches our ledger and audit requirements. The added MA/QA endpoints fit the same pattern — configuration, not new machinery.
Recommended path — reference, not dependency. Still the recommendation, and the new release does not change it. Treat the package as a reference implementation and build a thin first-party client against PayTabs' REST API (~200–400 lines: build the payment request payload, POST, redirect, handle return, verify and process callback). V1.10.0 makes this slightly cheaper: it documents the endpoint values for MA and QA, which we can lift into our own region config without inheriting the dependency. If timeline pressure forces reuse, fork, vendor into the repo, pin the version, and strip the package manager dependency — never composer require an archived payments library.
Decoupling regardless of path. Put PayTabs behind an internal PaymentGateway contract with initiate, handleCallback, refund, and status. This matters more now, not less: if Morocco and Qatar are on the roadmap, the contract should carry region/currency as first-class parameters rather than relying on a global config value. That is the difference between adding a market in days and a quarter-long migration later — and between a one-week gateway swap and an expensive one if a second acquirer is needed for local rails.
Migration and sequencing.
payments and payment_events tables (idempotency key, gateway reference, amount, currency, status, region, raw payload) before writing integration code. Include region and currency from day one — retrofitting multi-currency into a payments ledger is painful.pending beyond N minutes — per region.Compatibility checks before committing: Laravel version, PHP version, Guzzle/HTTP client version, region endpoint values for MA/QA against current PayTabs documentation, and whether the package's published config/migrations collide with our conventions.
Maintenance. The real cost is still ownership, not adoption. An archived package means every future Laravel upgrade, PHP upgrade, TLS change, or PayTabs API revision becomes our ticket. Budget roughly 2–5 engineer-days per year for a forked thin client, plus unplanned work when PayTabs changes behavior. V1.10.0 demonstrates the other side of that ledger: when the vendor does ship, it ships with a one-line note and no changelog detail, so we absorb the verification work regardless. Each additional region increases the number of endpoint/key permutations under our operational control.
Support. Still the weakest dimension. A point release is not evidence of a maintained changelog, security response process, or SLA. Our support path must remain the PayTabs commercial/merchant relationship and their API documentation, not the repository. Before adding Morocco or Qatar, confirm a named technical contact for each market — regional acquiring and local payment method issues are rarely resolved from public docs alone. Without one, incident resolution depends on documentation and guesswork.
Scaling. Low concern technically. The hosted-page redirect model means our infrastructure handles only a payment-intent POST and a callback, both trivially horizontally scalable; adding regions does not change that. Callback endpoints remain internet-facing and unauthenticated by design: rate limit them, cap payload size, and acknowledge fast (enqueue, return 200 immediately) so retry storms during peaks cannot cascade. Multi-region adds a routing dimension — callbacks must be attributed to the correct region and credentials, so keep region in the callback path or resolvable from the payload.
Failure modes to design for explicitly.
Ramp-up. Low for a competent Laravel engineer to read and understand the package; moderate for the domain. MENA payment specifics — region endpoints, Mada and KNET behavior, and now Moroccan and Qatari local methods, currency handling, 3DS2 step-up, Arabic/French hosted-page configuration, and settlement/refund semantics — are where the real learning curve sits, and none of it is in this repository. V1.10.0 does not reduce that curve; it enlarges the surface it applies to.
Bottom line. V1.10.0 is a small, additive, low-risk change that extends regional coverage to Morocco and Qatar and is worth incorporating into our reference blueprint — but it does not change the structural verdict. The package remains archived, unvalidated (0 dependents, 24 stars), and on the revenue-critical path; a point release is not a maintenance commitment. Recommend using it as a starting blueprint for a small, owned integration layer behind an internal gateway contract that treats region and currency as first-class parameters, with signed-callback verification, reconciliation, and region certification as launch blockers rather than follow-ups. Decision needed from the business: confirm which of MA/QA is actually in launch scope, and confirm PayTabs' maintenance and support commitment per market before we invest in a fork.
How can I help you explore Laravel packages today?