tastyigniter/ti-ext-payregister
The ti-ext-payregister package (v4.1.2) maintains strong alignment with Laravel’s service provider pattern, event-driven workflows, and queue-based async processing, but introduces critical security constraints that may impact integration flexibility. The hardened Stripe webhook validation (mandatory signing secret) reinforces PCI compliance but requires upfront configuration rigor.
Key Strengths (Updated):
Updated Misalignment:
ti-ext-* module system; vanilla Laravel may need adapter layers for config/admin panels.composer.json).payment_logs table is still optional.STRIPE_WEBHOOK_SECRET in .env (now hard requirement).config/payregister.php → stripe.webhook_secret.StripeWebhookController must validate secrets before dispatching events.Feasibility Risks (Updated):
| Risk | Mitigation | New Risk (v4.1.2) |
|---|---|---|
| Webhook Signature Validation | Use Stripe\Webhook::constructEvent() in middleware. |
Breaking: Missing secrets now crash the app (no fallback). |
| Offsite Redirect UX | Ensure return_url routes handle ?session_id params. |
Unchanged. |
| Mollie Session Migration | Update queries to use payment_logs. |
Unchanged. |
| Queue Overload | Monitor queue:work; scale workers. |
Unchanged. |
| New: Secret Management | Rotate secrets via Stripe Dashboard; use Laravel Envoy for zero-downtime. | High: Secrets must be pre-configured. |
| Risk Category | Description | Mitigation Strategy | Updated Risk (v4.1.2) |
|---|---|---|---|
| Webhook Reliability | Failed validations now crash instead of logging. | Implement circuit breaker (e.g., spatie/laravel-circuitbreaker) for webhook routes. |
Critical: Requires middleware refactor. |
| PCI Compliance | Hardened secrets reduce scope, but misconfigurations (e.g., leaked keys) risk violations. | Use AWS Secrets Manager or Hashicorp Vault for dynamic secrets. | Unchanged. |
| Gateway-Specific Bugs | Stripe API changes may break validation. | Subscribe to Stripe’s API changelog; test against sandbox mode. | Unchanged. |
| Performance | Async processing may introduce latency. | Optimize queue workers; consider synchronous fallback for critical events. | Unchanged. |
| Customization Constraints | Extending gateways may require deep knowledge. | Document extension points (e.g., PayRegister::extend()). |
Unchanged. |
| New: Secret Rotation | Stripe recommends rotating secrets every 6 months. | Automate rotation with Laravel Horizon + Envoy scripts. | Medium: Operational overhead. |
Security & Compliance:
.env edits? Version-controlled?)Infrastructure:
/stripe-webhook) behind a WAF? (e.g., Cloudflare, AWS ALB)Provider Strategy:
Migration Impact:
Operational Impact:
The package remains optimized for Laravel, but v4.1.2 introduces security constraints that require adjustments to the stack:
StripeWebhookMiddleware).Compatibility Matrix (Updated):
| Laravel Feature | Package Support | Notes | Update (v4.1.2) |
|---|---|---|---|
| Service Container | ✅ Full | Gateways injected via app() or DI. |
Unchanged. |
| Queues | ✅ (Stripe/Mollie) | Requires queue:work for webhooks. |
Warning: More failures expected during transition. |
| Events | ⚠️ Breaking | Mandatory secret validation before dispatching events. | Critical: Custom listeners must update. |
| Middleware | ✅ New Requirement | Add StripeWebhookMiddleware to validate secrets. |
New: Must implement. |
| Blade Templates | ✅ Partial | Offsite mode requires custom return_url templates. |
Unchanged. |
| Database | ⚠️ Optional | Payment logs table needed for Mollie; other gateways use sessions. | Unchanged. |
Secret Configuration:
STRIPE_WEBHOOK_SECRET from Stripe Dashboard to .env:
STRIPE_WEBHOOK_SECRET=whsec_...
config/payregister.php:
'stripe' => [
'webhook_secret' => env('STRIPE_WEBHOOK_SECRET'),
'mode' => 'offsite', // or 'inline'
],
@servers(['web'])
task rotate-stripe-secret
cd /var/www
git pull
php artisan config:clear
# Trigger secret rotation via Stripe Dashboard
endtask
Middleware Implementation:
app/Http/Middleware/StripeWebhookMiddleware.php:
namespace App\Http\Middleware;
use Closure;
use Stripe\
How can I help you explore Laravel packages today?