kamerk22/amazongiftcode
Generate redeemable Amazon gift codes in Laravel with this lightweight package. Create codes of custom length and value, validate them, and redeem against Amazon's API with a simple, expressive facade-style API.
CreateResponse / CreateBalanceResponse throwing undefined-key errors on Amazon error bodies (missing cardInfo / availableFunds) directly affects how the product behaves when an order fails. Previously an upstream error could surface as an unhandled exception instead of a structured failure — that is a user-visible defect class in checkout/fulfilment, not a cosmetic bug.ClientInterface on AWS and AmazonGiftCode lets engineering substitute the HTTP layer. That unlocks deterministic integration tests and sandboxed/stubbed environments, which changes the QA plan for any feature touching gift card issuance or balance display.Adopt when:
ClientInterface is the deciding feature; the default cURL client preserves existing behaviour, so adoption is not forced.Look elsewhere or defer when:
illuminate/support constraint, but it is out of the CI matrix and past security support; you would be running an untested combination for a money-handling path. Prefer upgrading the framework first.For executives: This release converts a small, previously unverified dependency into a governed one. Three things changed that matter commercially. First, it is confirmed compatible with Laravel 13, so it will not obstruct our framework upgrade or force a rewrite mid-roadmap. Second, it now ships an automated test suite and CI across supported PHP and Laravel versions — the standard evidence we ask for before trusting a third-party component in a payment-adjacent flow. Third, a real defect was fixed: when Amazon returns an error response, the library previously risked an unhandled exception; it now degrades cleanly. That is the difference between a failed gift card order showing a recoverable message and a broken checkout page. Cost and scope are unchanged, and there is nothing here that requires us to change direction — this is a risk reduction, not a new commitment.
For engineering: The v2.0.0 bump is major in version number only; the changes are additive and corrective. AWS and AmazonGiftCode now take an optional ClientInterface, defaulting to the existing cURL client — no code changes required to keep current behaviour, but you should adopt the injection point in tests to remove live network calls from CI. The response-parsing fix removes undefined-key errors when cardInfo or availableFunds are absent, so audit any call sites that currently rely on catching exceptions rather than inspecting a structured error. Note two housekeeping removals: Scrutinizer is replaced by GitHub Actions, and sempro/phpunit-pretty-print is gone (incompatible with PHPUnit 10+). Laravel 11 has been dropped from CI and dev dependencies as past its security window — it still installs via the illuminate/support constraint, but you should treat Laravel 11 as unsupported and prioritise the upgrade. Recommended next step: pin to v2.0.0, add a stubbed-HTTP test around the gift card creation path, and confirm error-response handling maps to the product's failure states.
How can I help you explore Laravel packages today?