Artisan commands
php artisan purchases:install --providers # publish config + migrations, append provider .env keys
php artisan purchases:providers # list providers and whether each can take traffic
php artisan purchases:verify # genuinely contact every provider
php artisan purchases:verify stripe # … or just one
php artisan purchases:replay --provider=apple --since=2026-01-01| Command | What it does |
|---|---|
purchases:install {--providers} | Publish config and migrations and offer to migrate; --providers picks providers interactively and appends the .env keys not defined yet — never a second, blank copy of one you filled in. Google’s block includes the push-authentication keys. |
purchases:providers | List registered providers and whether each can take traffic — missing config until it is fully set up (see below). |
purchases:verify {provider?} | Genuinely contact each provider, or one, to confirm the credentials work; Google always fetches a fresh token. |
purchases:replay {id?} --provider= --since= | Replay stored audit notifications through Purchases::replay(); refused ones are reported as skipped. |
purchases:providers says yes only when a provider can take traffic: Apple needs bundle_id (and app_apple_id in production); Google needs package_name, the service account’s client_email and push authentication — a push token, the OIDC audience and service-account pair, or push.authenticate off; Stripe needs both secret and webhook_secret. Anything less reads missing config.
purchases:verify makes a cheap authenticated call per provider — Apple requests a test notification, Google exchanges its service-account credentials for a fresh access token (never a cached one, so a broken key fails at once), Stripe fetches the account balance — and exits non-zero when any check fails, so it works as a deploy gate. The package also contributes its settings to php artisan about, reporting credentials only as SET or MISSING, and a broken duration or provider list as INVALID.
Show your open-source love
This package is free and MIT-licensed. If it saves you time, a one-off donation or a Patreon membership keeps it maintained, tested and documented.
More ways to support, including cryptoBy donating, you agree to our donation terms.
Want this built into your product?
We integrate our packages into custom Laravel and AI builds. Tell us what you're working on and we'll reply within 48 hours.