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
Amazongiftcode

Amazongiftcode Laravel Package

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.

View on GitHub
Deep Wiki
Context7

Laravel package for Amazon Gift Codes On Demand (AGCOD). Integration for Amazon Incentive API

Frequently asked questions about Amazongiftcode
What is kamerk22/amazongiftcode used for in a Laravel application?
It is a thin infrastructure adapter for Amazon Gift Codes On Demand (AGCOD), the Amazon Incentives API, letting you generate redeemable Amazon gift codes and check or redeem them from PHP. You interact through facade-style entry points (AWS and AmazonGiftCode) and get typed response objects such as CreateResponse and CreateBalanceResponse. It is best placed in your integration layer behind an application-owned interface like a GiftCardIssuer rather than called straight from controllers or jobs.
How do I install and configure kamerk22/amazongiftcode?
Install it with Composer, publish the package config, and add your Amazon Incentives credentials to your environment. The package is config-driven, so credentials and endpoint settings live in the published config file rather than in code. After that you can resolve the AWS or AmazonGiftCode entry point and call the methods directly or through your own wrapper service.
Which Laravel and PHP versions does this Amazon gift code package support?
The current v2.0.0 release dropped Laravel 11 from its CI matrix and dev dependencies, so only newer Laravel versions are actually exercised by tests. Because the illuminate/support constraint still permits Laravel 11, it remains installable, but that path is untested with no CI signal attached to it. In practice, "it installs" no longer implies "it works," so verify your framework version before adopting the package.
How do I create an Amazon gift code with a custom value and length?
Call the creation method on the package's entry point with the amount and the code parameters you need, and the package returns a CreateResponse object containing Amazon's result. The package supports both custom values and custom code lengths, so you control both the denomination and the shape of the generated code. Treat the call as a real money-moving write: log the request, persist the response, and avoid firing it blindly from a queued job that could run twice.
How do I check the available balance of a gift code?
Use the balance lookup method, which returns a CreateBalanceResponse object populated from Amazon's availableFunds data. In v2.0.0 a crash was fixed where responses missing cardInfo or availableFunds keys previously threw an undefined-key error - exactly what Amazon returns on error bodies. After the fix, make sure your code inspects the response for Amazon's error code and message instead of assuming a populated balance.
Can I mock the Amazon Incentives API in my test suite?
Yes. Version 2.0.0 makes ClientInterface injectable while defaulting to the existing cURL client, so existing calls keep working and you can bind a fake in your container for tests. The package itself ships PHPUnit and Orchestra Testbench coverage of signing, parsing, and the public API. One thing to confirm before relying on it: whether ClientInterface is package-local or a PSR-18 bridge, since a local interface means writing your own adapter to swap in Guzzle or HTTP middleware.
What do I need before I can start calling the Amazon AGCOD API?
Amazon Incentives onboarding is the real gate: agreement acceptance, sandbox credentials, and account provisioning usually take far longer than the code integration itself. Start that process first, because the package install and configuration are low-friction once credentials exist. Keep sandbox and production credentials in separate config sets and never ship the production values to non-production environments.
Is gift code creation idempotent, and can I safely retry a failed request?
Gift code creation is a non-idempotent write, so a naive retry wrapper is actively dangerous - you can issue a second code for the same order. The default cURL client ships without a retry policy, structured timeout configuration, or request logging hooks, and substitutability is opt-in rather than the default. There is no documented idempotency key or request-dedup support, so build your own safeguards and reconcile against Amazon's response before retrying.
What changed in v2.0.0, and is it a breaking change?
The release notes describe additive or cleanup work: an optional injectable ClientInterface that defaults to the existing cURL client, a DTO fix that converts an undefined-key crash into correct handling of unsupported responses, and a move to PHPUnit 10 with GitHub Actions replacing Scrutinizer. Laravel 11 was dropped from CI and dev dependencies. No public API break is clearly stated despite the major version bump, so diff the public surface against v1 yourself rather than trusting the changelog.
Is this package safe to depend on given it has a single maintainer?
It is a single-maintainer package sitting in a revenue-adjacent path, which is a real vendor and bus-factor risk. The practical mitigations are pinning to an exact version, keeping a fork-ready posture, and hiding it behind your own interface so you can swap in a hand-rolled AGCOD client or a Guzzle or Saloon implementation without touching call sites. Treat the package as a replaceable adapter, not a long-term platform commitment.
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.
frankyso/ipaymu
3mdikram/worldmoneywords
snowsoft/config
itmosoft/laravel-subscriptions
larva/laravel-ai-qwen
diephp/sequences
users-au/socialite-provider
twidpay/twid-logger
mrnewport/laravel-plaid
mrnewport/laravel-repo
mrnewport/laravel-docsign
mrnewport/laravel-stow
mrnewport/laravel-flow
mrnewport/laravel-priceable
mrnewport/laravel-nestedterms
fredmeng/laravel-apidoc-generator
itstructure/laravel-multilingual-tools
pdustdar/elasticsearch
markupai/php-sdk
rlacerda83/lumem-microservice-shipment