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

Smoney Laravel Package

spyrit/smoney

sMoney is a Laravel package for working with monetary values and currencies, providing helpers to format, convert, and calculate money so pricing and financial data stay consistent and precise across your application.

View on GitHub
Deep Wiki
Context7

Technical Evaluation

Architecture fit. spyrit/smoney is a thin, framework-agnostic PHP client library for the S-money payment API — not a Laravel package. It exposes no service provider, no publishable config, no facade, and no Laravel-native contracts. In a Laravel codebase it sits at the outermost edge of the architecture, below the domain layer, and would need an adapter to be usable idiomatically. That adapter is work we own, not work the package provides.

Integration feasibility. Low-to-moderate. The library is a direct HTTP wrapper around a third-party payment API, so the integration surface itself is small (auth, initiate transfer, check status, handle callbacks). The blockers are not complexity but confidence: zero stars, zero dependents, no visible release cadence, and a repository naming convention (...-API-Client-PHP-1) that suggests a one-off generated or vendor-supplied artifact rather than a maintained OSS project. This reads as a vendor SDK drop, not a community package.

Technical risk. High, concentrated in four areas:

  • Supply chain. Pulling a 0-dependency, 0-star, unmaintained package from Packagist into a payments path is an avoidable risk. If upstream is deleted or the tag is moved, our build breaks with no recourse.
  • Version drift. The client embeds assumptions about the S-money API version (endpoints, payload shape, auth scheme). If the vendor has shipped a v2, this client silently rots.
  • Runtime compatibility. PHP version constraints and the Guzzle/HTTP client major version are unknown from the metadata. Laravel 10/11 run PHP 8.1+; older SDKs frequently pin guzzlehttp/guzzle ^6 or PHP 7.x, which will conflict with a modern composer.json.
  • Payment correctness. Money movement requires idempotency, signature verification on callbacks, and deterministic error classification. A bare client library almost never implements these, and their absence is a financial-loss vector, not a bug.

Key questions for the vendor/business before any code is written.

  1. Which S-money API version and environment (sandbox vs. production) does this client target, and is it the version named in our merchant contract?
  2. What is the auth model — API key, OAuth2 client credentials, mTLS, request signing?
  3. Is the S-money contract contingent on using a vendor-supplied SDK, or are we free to implement the HTTP contract directly?
  4. What is the license, and can we legally fork and vendor the code?
  5. Who at S-money owns API support and breaking-change notification?
  6. Does the API expose idempotency keys, callback signatures, and a reconciliation/statement endpoint?

Integration Approach

Stack fit. Do not depend on spyrit/smoney from Packagist. Fork it into a private repository (or vendor the source under packages/ with a Composer path repository) and treat it as first-party code. Then wrap it:

  • config/smoney.php — credentials from environment/secrets manager, base URL per environment, timeouts.
  • S-moneyServiceProvider — binds a S-moneyClientInterface singleton, publishes config.
  • S-moneyClient — our adapter implementing the interface, wrapping the SDK's raw calls, translating responses into domain DTOs (TransferResult, TransactionStatus).
  • A queued job + webhook controller as the only two call sites into the adapter.

The interface boundary is the point: it lets us swap the SDK for a hand-rolled Guzzle client later without touching business logic, and it makes the client mockable in tests.

Migration path. There is nothing to migrate from — this is greenfield. The path is: fork → pin to a specific commit SHA (not a tag) → add a composer.json with explicit PHP and Guzzle constraints → add the service provider and config → write contract tests against the S-money sandbox. Budget roughly 1–2 sprints for a competent Laravel developer including sandbox validation, not the half-day the package's surface area implies.

Compatibility. Verify before committing: php constraint vs. our runtime (8.2/8.3), guzzlehttp/guzzle major version vs. what Laravel's HTTP client and other dependencies pin, and PSR-4/PSR-18 conformance. If the SDK pins Guzzle 6, expect a hard conflict and plan to rewrite the transport layer — at which point the SDK is providing almost no value and a direct Guzzle implementation is the better call.

Sequencing.

  1. Confirm the commercial contract and obtain sandbox credentials and API docs (blocking; do this first).
  2. Spike: fork, resolve dependency conflicts, execute one authenticated read-only call against sandbox. Timebox to 3 days. This is the go/no-go gate.
  3. If the spike passes, build the adapter, config, and interface.
  4. Implement idempotent transfer initiation and callback verification with integration tests against sandbox.
  5. Ship behind a feature flag with a manual reconciliation runbook before enabling live traffic.

If the spike fails on dependency conflicts or missing docs, the decision flips cleanly to a ~200-line direct HTTP client — which is likely the better outcome anyway.

Operational Impact

Maintenance. Effectively 100% ours. Zero stars and zero dependents means no upstream community to surface bugs, no security advisories, and no PRs. Assume the fork is frozen. Budget a standing allocation for: tracking S-money API changelog, dependency updates on the Guzzle/PHP axis, and quarterly review of the pinned commit. Assign a named owner — this is a payments path and should not be orphaned code.

Support. None from the package author. All support flows through the S-money merchant/partner channel, which should be a contractual requirement before go-live. We need an escalation contact and an agreed SLA for API incidents, because we cannot debug the provider from our side of the wire.

Scaling. The client is stateless HTTP, so application-side scaling is a non-issue — it scales with our workers. The real ceiling is provider-side: S-money will impose rate limits, per-transaction caps, and possibly concurrent-request limits. Design for a dedicated queue with backpressure and a dead-letter path rather than calling the API inline in a request cycle. Log every request/response pair (redacting credentials and PII) for reconciliation.

Failure modes to design for explicitly.

  • Timeout with unknown outcome. The request may have succeeded. Never retry blind on a transfer — require an idempotency key or a status-lookup-before-retry flow.
  • Duplicate initiation. Double-submits from UI retries or queue redelivery. Idempotency keys are mandatory, and if S-money doesn't support them, key on our own transaction ID and reconcile.
  • Callback spoofing or loss. Verify signatures/HMACs; never trust an unauthenticated webhook to mark a payment complete. Run a periodic reconciliation job against the statement/status API as the source of truth.
  • Silent schema drift. A renamed field in the provider's response that the SDK doesn't model will surface as a null, not an exception. Assert on response shape at the adapter boundary.
  • Package abandonment mid-incident. Mitigated by forking; we are never blocked on upstream.

Ramp-up. Two separate curves. The Laravel integration is trivial for any mid-level developer. The S-money API semantics — status codes, settlement timing, error taxonomy, currency and decimal handling — are the real cost, and they depend entirely on documentation quality we haven't verified. Plan for a knowledge-transfer session with the provider and a written internal runbook covering: how to check a stuck transaction, how to reconcile a day's volume, and how to disable the integration without a deploy.

Bottom line. The package is not the risk; the unmaintained dependency edge is. Fork it, wrap it behind our own interface, gate it on a three-day sandbox spike, and be prepared to replace it with a direct HTTP client — which, given the 0.09 score and the thin surface area, may simply be the faster and safer route.

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.
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
noith/settings
kda/laravel-package