illuma-law/healthcheck-stripe
最新稳定版本:v0.1.4
Composer 安装命令:
composer require illuma-law/healthcheck-stripe
包简介
Focused stripe health check for Spatie's Laravel Health package.
README 文档
README
A focused stripe health check for Spatie's Laravel Health package.
This package provides a simple, direct health check to verify that your Stripe API credentials are valid and that the Stripe API is reachable.
Features
- Connectivity Check: Verifies that your Laravel application can successfully connect to Stripe's API.
- Latency Monitoring: Measures the response time of the Stripe API. If it exceeds a threshold (1500ms), the check will degrade to a Warning state.
- Credential Validation: Ensures that your
CASHIER_SECRETorSTRIPE_SECRETis correctly configured and accepted by Stripe.
Installation
Require this package with composer:
composer require illuma-law/healthcheck-stripe
Usage & Integration
Register the check inside your application's health service provider (e.g. AppServiceProvider or a dedicated HealthServiceProvider), alongside your other Spatie Laravel Health checks:
Basic Registration
use IllumaLaw\HealthCheckStripe\StripeConnectivityCheck; use Spatie\Health\Facades\Health; Health::checks([ StripeConnectivityCheck::new(), ]);
Expected Result States
The check interacts with the Spatie Health dashboard and JSON endpoints using these states:
- Ok: Stripe API credentials are valid and the service is responsive.
- Warning: Stripe responded successfully, but the response time was higher than 1500ms.
- Failed: Stripe was unreachable, the secret key is missing, or the API returned an authentication error.
Testing
Run the test suite:
composer test
License
The MIT License (MIT). Please see License File for more information.
统计信息
- 总下载量: 29
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 8
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2026-04-20