mpay24/mpay24-php
A PHP SDK for integrating the mPAY24 payment gateway, offering convenient access to payment processing, transaction management, and related API operations for Laravel/PHP applications.
Architecture fit. mpay24/mpay24-php is a vendor SDK, not a Laravel package. It will sit at the domain-adjacent edge of the application (an outbound adapter), which is the right place for it, but it provides no service provider, config publishing, facade, or Laravel-native error mapping. Treated naively it becomes a hard dependency leaking payment DTOs into controllers. Treated correctly — wrapped behind a PaymentGateway interface with a thin adapter and a dedicated Laravel service provider — it fits a hexagonal/payments-anti-corruption-layer architecture well. The SDK does one job (speak to the mPAY24 gateway) and that bounded scope is a genuine architectural advantage.
Integration feasibility. Composer installable, PSR-4 autoloading, MIT-licensed, official vendor ownership. That's a straightforward afternoon of wiring for an experienced PHP engineer. The friction is everything the SDK does not do: no configuration model, no dependency injection hooks, no queue integration, no logging/telemetry, no framework-level retry or idempotency helpers. All of that must be built. Budget a wrapper package (~200–400 LOC plus tests), not a composer require.
Technical risk. This is a payments dependency and should be governed accordingly:
Key questions.
| # | Question | Why it matters |
|---|---|---|
| 1 | Which mPAY24 API version does the SDK target, and is it current? | Version drift = forced fork or upgrade project |
| 2 | Does it support 3DS2/SCA and PSD2 exemptions natively? | Blocks EU card acceptance if absent |
| 3 | Declared PHP version constraints and CI matrix? | Determines upgrade and runtime compatibility |
| 4 | Error/exception model — typed exceptions or opaque codes? | Drives the adapter's error-mapping effort |
| 5 | Idempotency and retry semantics on charge/refund/capture? | Directly determines double-charge exposure |
| 6 | Tokenization / stored-credential support? | Affects PCI scope and repeat-payment UX |
| 7 | Webhook/callback signing and replay protection? | Security and reconciliation integrity |
| 8 | Vendor's own SLA, deprecation policy, and security disclosure channel? | The real support contract, not GitHub stars |
| 9 | Is a maintained alternative (Paysafe SDK, hosted checkout, or drop-in iframe) a lower-risk path? | Scope-reduction option |
Stack fit. Works with any modern Laravel (9/10/11) or framework-agnostic PHP application, provided the runtime satisfies the SDK's PHP constraint — that is the gating check, run it first. Because the package is framework-neutral, integration is a deliberate wrapping exercise rather than a one-line install, and the wrapping is where the value is captured.
Migration path. If a payment provider is already in place, do not rip it out. Introduce the mPAY24 adapter behind the same internal PaymentGateway contract the incumbent uses, then route traffic by feature flag or by tenant/currency. This makes the migration a routing decision rather than a rewrite, and gives a clean rollback. If this is greenfield, adopt the abstraction from day one so the SDK is never referenced outside the adapter.
Compatibility. Three axes to validate before committing:
config/mpay24.php backed by env), and binding are yours; keep them in a small first-party package so they are testable and versioned separately from the vendor SDK.Sequencing. Recommend a five-step ramp, each step a real gate:
Mpay24Gateway implementing PaymentGateway; DTOs mapped at the boundary; SDK types never escape the adapter.Maintenance. Assume you own the wrapper, the upgrade path, and the framework glue indefinitely; upstream gives you the gateway client and little else. A 2022 last release means the realistic maintenance model is "vendor SDK pinned, first-party adapter actively maintained." Track PHP minor releases against the SDK's constraint and budget a spike each time your runtime moves — if the SDK lags, the fallback is a fork, which is a material cost to acknowledge up front.
Support. GitHub stars are not a support channel. The operative support relationship is the commercial one with mPAY24/Paysafe — confirm contractually what's covered (integration support, incident escalation, deprecation notice windows). Internally, designate one owner for the payments integration; it is a single-point-of-knowledge domain and should be treated as such in on-call rotation.
Scaling. The SDK is a thin HTTP client, so scale is governed by the vendor's throughput limits and your own concurrency model, not by the package. Two practical constraints: payment confirmation should run on a queue with a dedicated worker pool (don't hold web requests open on a PSP round-trip), and the adapter should be stateless and horizontally scalable. Watch vendor rate limits and per-merchant concurrency caps during peak — these are the real ceilings.
Failure modes. Enumerate and instrument each:
Ramp-up. For a team already fluent in Laravel and payment integrations, the learning curve is modest: the SDK's surface is narrow, and the real effort is in the surrounding discipline — idempotency, reconciliation, PCI-scope hygiene, and error mapping. Estimated 3–5 engineer-days for a competent engineer to reach a production-credible integration including the wrapper and tests, plus review time from whoever owns payments. The trap is treating this as a composer require task: the SDK is 10% of the work, and the 90% around it is where production incidents live.
How can I help you explore Laravel packages today?