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

Laravelmpesa Laravel Package

gathuku/laravelmpesa

Integrate Safaricom M-Pesa into Laravel apps with a simple package for Daraja API payments, including STK Push, C2B, B2C, transaction status, and callback handling. Streamline mobile money workflows with clean, configurable PHP code.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

  • Architecture fit: Likely a Laravel service-provider/config/facade wrapper around M-Pesa/Daraja APIs. It can fit a Laravel monolith that needs STK Push, C2B, or B2C flows, but should be isolated behind an internal PaymentGateway interface. Do not let billing/domain models depend directly on package classes. v1.2.2 does not change this: it remains an adapter, not a domain dependency.
  • Integration feasibility: MIT licensing and Composer installation make an initial spike feasible. The v1.2.2 release ("support PHP 8", contributed by @jwambugu) removes the most immediate blocker — modern PHP syntax/runtime compatibility — and is the first signal of upstream activity since 2021. However, 50 stars and 0 dependents still indicate limited ecosystem validation, and a single community contribution is not evidence of sustained maintenance. Treat it as a prototype-grade accelerator with a viable fork base, not a production-grade dependency without vendor review.
  • Technical risk: High, marginally reduced. PHP 8 support lowers the runtime-compatibility risk but does not address: no stated Laravel 9–11 support, abandoned-upstream risk (one PR does not establish a maintenance cadence), M-Pesa Daraja API drift, weak callback security, missing idempotency/retry handling, credential leakage in logs, and no observable test coverage. The release notes cite no tests, no breaking changes, and no security fixes — so the risk profile shifts from "may not run at all" to "runs, but unproven under production failure modes." Confirm whether PHP 8 support means 8.0 only or 8.0–8.3, since 8.1+ deprecations (e.g. dynamic properties, null-to-internal-parameter coercion) can still surface at runtime.
  • Key questions: Which PHP 8.x minors and which Laravel versions are actually supported and CI-tested in v1.2.2? Did the PHP 8 work introduce any behavioral or signature changes (return types, nullable params, exception classes) that break the 2021 API surface? Which M-Pesa products and Daraja API versions are covered? Does it validate callbacks, cache access tokens, handle retries/timeouts, and support idempotency? Is there test coverage against Daraja sandbox? Who owns the fork, and is upstream now active enough to track? Can we replace the package with a thin Guzzle client without changing our domain interface?

Integration Approach

  • Stack fit: Best suited to a Laravel application with queue workers, scheduler, and existing configuration/secret management. Use it as an adapter only: package calls sit behind an internal service, transactions persist in owned tables, and callbacks enter through app-controlled controllers/jobs. PHP 8 support makes the adapter pattern easier to hold at arm's length, since the package no longer dictates the host runtime.
  • Migration path: Start with a time-boxed sandbox spike on a branch targeting v1.2.2 specifically. Pin the v1.2.2 commit/tag, fork to the organization, record the PHP 8.x version the package was validated against, patch remaining dependency constraints, and add contract tests against Daraja sandbox. Because v1.2.2 is a compatibility release from a single contributor, treat it as a better starting point for a fork rather than a reason to depend on upstream releases. If the fork becomes costly, replace the package with a maintained SDK or direct HTTP client while preserving the internal interface.
  • Compatibility: Verify Composer constraints against the target PHP and Laravel versions before commitment — v1.2.2 addresses PHP 8 but says nothing about Laravel framework constraints, which remain the more likely blocker for modern apps. Check for framework bootstrapping conflicts, route collisions, config-cache behavior, and PHP 8.1–8.3/Laravel 9–11 support. Diff v1.2.1 → v1.2.2 before upgrading an existing spike to catch signature or typing changes. If Laravel constraints remain stale, vendor the code and patch rather than relying on upstream releases.
  • Sequencing: 1) Confirm M-Pesa products, credentials, and sandbox access; 2) diff v1.2.1→v1.2.2, then fork/pin v1.2.2 and resolve remaining framework compatibility; 3) define internal gateway interface and transaction schema; 4) implement one flow first, preferably STK Push; 5) add callback validation, idempotency, retries, and reconciliation; 6) run staging and failure-mode tests on the target PHP 8.x runtime; 7) pilot in production with limited traffic; 8) decide keep, fork, or replace based on operational evidence. Do not resequence around the release — PHP 8 support removes a step's friction, not the step.

Operational Impact

  • Maintenance: Still high relative to package size, though slightly improved. The v1.2.2 contribution shows the project is not strictly dead, which opens the option of tracking upstream rather than forking immediately. That said, one merged PR is not a maintenance commitment; assume internal ownership for dependency updates, security patches, Laravel upgrades, and M-Pesa API changes, and reassess only if releases become regular. Assign a clear maintainer and budget for periodic compatibility work.
  • Support: Community support is likely thin given low adoption and no dependents. The contributor (@jwambugu) is a potential escalation contact for PHP 8-specific issues but not a support channel. Rely on source review, Safaricom Daraja documentation, and an internal runbook; escalation paths should include both internal engineering and M-Pesa/Safaricom support.
  • Scaling: Unchanged by this release. The package may perform synchronous HTTP calls; production scaling depends on queues, timeouts, retry/backoff, rate limiting, and worker capacity. M-Pesa rate limits and callback volume, not the package itself, will drive scaling design. Re-benchmark under PHP 8.x, since runtime upgrades can shift latency and memory characteristics in long-running queue workers.
  • Failure modes: Expect credential/token expiry, network timeouts, duplicate or malformed callbacks, M-Pesa downtime, rate limiting, stale config cache, unhandled exceptions, and reconciliation gaps. Add two PHP-8-specific watch items: deprecation notices promoted to exceptions in test/dev environments, and type-coercion or signature mismatches introduced by the compatibility patch. Require dead-letter queues, idempotency keys, alerting, and a scheduled reconciliation job.
  • Ramp-up: A Laravel developer can understand the package quickly, and v1.2.2 means the first hour is no longer spent fighting the runtime. M-Pesa domain knowledge and package internals still add ramp-up time. Plan for a one-to-two-week spike (unchanged — the saved time goes into the v1.2.1→v1.2.2 diff and PHP 8.x validation) plus runbook creation, sandbox test coverage, and callback security review before production use.
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.
skyraptor/chatter
edlugz/sasapay
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