lloricode/laravel-paymaya-sdk
Laravel PayMaya SDK provides a Laravel-friendly wrapper around PayMaya’s PHP SDK, making it easier to configure credentials and integrate PayMaya checkout, payment links, and related payment APIs into your Laravel application.
Architecture fit. The package follows the conventional Laravel package contract: a service provider registered via auto-discovery, a publishable config file (config/paymaya.php), and a facade exposing the PayMaya client. That is the right shape for a Laravel codebase — it means the gateway is reachable through the container and mockable in tests without the team hand-rolling a Guzzle wrapper. The trade-off is that it is a thin, opinionated adapter: it wraps PayMaya's REST surface (checkout creation, payment retrieval, webhook/invoice endpoints depending on API version) and does not introduce domain abstractions of its own. There is no gateway-agnostic interface, no idempotency layer, no retry/backoff policy beyond whatever Guzzle defaults are inherited. For a single-PSP integration in a Laravel monolith this is acceptable; for a multi-gateway or multi-region architecture it is an impedance mismatch that will need an internal abstraction in front of it.
Integration feasibility. Low friction to install (composer require, publish config, set credentials), higher friction to integrate correctly. The real work is not the SDK but the surrounding payment flow: redirect-based checkout, return-URL handling, server-side webhook ingestion, signature/authenticity verification, idempotency on retries, and reconciliation. A TPM should assume the SDK covers the happy-path API calls and that the team owns the correctness of the state machine around it. PayMaya's sandbox credentials make a proof-of-concept cheap — realistically a spike of a few days to validate checkout and webhook round-trip.
Technical risk. This is the dominant concern and it is structural, not fixable by good engineering on our side. Zero stars and zero dependents means effectively no community validation, no third-party bug reports, no ecosystem of fixes — every issue is ours to diagnose. The project is single-maintainer; bus factor is one. PayMaya has rebranded to Maya and iterated on its API surface, so there is a real possibility the SDK targets a superseded API version, in which case we are maintaining a fork on day one. There is no evidence of a security review, and payment code touching card-adjacent data, webhook secrets, and API keys warrants one. License and release cadence must be confirmed before adoption.
Key questions. What PayMaya/Maya API version does it target, and does it still match current production docs? Does it implement webhook signature verification, or does it leave that to us? Are checkout, payment status, refunds, and invoices all covered, or only checkout? What is the Laravel/PHP support matrix, and is it pinned to versions we run? Is there CI, test coverage, or a changelog? What is the license, and are we permitted to fork and vendor it? Has anyone in the organisation shipped it to production before?
Stack fit. Best suited to a Laravel application already targeting the Philippine market with PayMaya/Maya as primary or sole PSP. It is a poor fit if we need multi-gateway routing, if we are on a non-Laravel service, or if the payment surface extends into subscriptions, stored credentials, or payout flows that the SDK likely does not model. Confirm our Laravel and PHP versions fall inside the package's declared constraints before committing; a version mismatch turns a one-line install into a fork.
Migration path. Treat the SDK as an implementation detail behind an internal PaymentGateway interface from the first commit. Concretely: define our own checkout-initiate and webhook-handle ports, and let the PayMaya SDK be one adapter. This costs perhaps a day upfront and buys us the option to swap to direct HTTP calls, a maintained fork, or a second PSP without touching order or ledger code. It also gives us a seam for contract tests against the sandbox.
Compatibility. Pin the package to an exact version in composer.json rather than floating, and commit composer.lock. Because the package is unlikely to have a broad compatibility matrix, upgrade it deliberately and re-run the sandbox integration suite each time. Vendor the fork (or use a VCS repository entry) if we need patches the maintainer will not ship.
Sequencing. (1) Sandbox spike: credentials, checkout creation, redirect-return, webhook receipt — validate the full round trip before writing production code. (2) Fork-and-vendor decision based on whether the spike exposes gaps or staleness. (3) Build the internal adapter plus webhook verification and idempotency. (4) Harden: retries, timeouts, reconciliation against PayMaya's records. (5) Production cutover behind a feature flag with a small transaction cohort, then widen.
Maintenance. Assume we own this. Plan for a fork-and-vendor posture: pin, mirror to internal Git, and budget a small recurring allowance to rebase against upstream or absorb API changes. Ownership should sit with the team that owns checkout, not a platform team — the failure modes are commercial, not infrastructural.
Support. There is no vendor SLA. Escalation for SDK-level defects is a GitHub issue on a single-maintainer repo; escalation for gateway-level issues goes to PayMaya/Maya support directly. Runbooks should route API failures to the PSP's status page and support channel, and code-level failures to the internal owning team. Document the fork's divergence from upstream from day one.
Scaling. Throughput is bounded by PayMaya's API rate limits and our HTTP client configuration, not by the SDK. Ensure connection pooling, sane timeouts, and circuit-breaking around the gateway call so a PSP slowdown does not exhaust PHP-FPM workers. Webhook ingestion should be queued and idempotent — assume duplicate delivery. The SDK itself is stateless per request, so horizontal scaling is straightforward.
Failure modes. Expect: webhook loss or duplication (needs reconciliation job against PayMaya's payment list), stale API version after a PSP-side change (needs version monitoring and a sandbox canary), credential expiry or rotation breaking production silently (needs alerting on auth failures), timeout-with-success ambiguity leading to double-charge attempts (needs idempotency keys and order-state guards), and upstream abandonment (needs the fork strategy above). None of these are exotic — they are the standard PSP failure set — but the SDK does not mitigate any of them for us.
Ramp-up. Low for a Laravel-proficient engineer: the package is small, conventional, and readable, so comprehension is a day. The real ramp is PayMaya/Maya domain knowledge — payment states, settlement timing, refund semantics, webhook contracts — which the SDK does not abstract and which should be documented internally as part of the integration, not left in one engineer's head.
How can I help you explore Laravel packages today?