This feature stored incoming webhooks during maintenance mode and replayed them when maintenance ended. The behavior adds unnecessary complexity without clear value. Standard approach is to let webhooks fail during maintenance and let senders retry. Removes: - Listener classes that handled maintenance mode events and webhook replay - Maintenance mode checks from all webhook controllers (Github, Gitea, Gitlab, Bitbucket, Stripe) - webhooks-during-maintenance filesystem disk configuration - Feature mention from CHANGELOG 🤖 Generated with [Claude Code](https://claude.com/claude-code) Co-Authored-By: Claude <noreply@anthropic.com>
29 lines
799 B
PHP
29 lines
799 B
PHP
<?php
|
|
|
|
namespace App\Http\Controllers\Webhook;
|
|
|
|
use App\Http\Controllers\Controller;
|
|
use App\Jobs\StripeProcessJob;
|
|
use Exception;
|
|
use Illuminate\Http\Request;
|
|
|
|
class Stripe extends Controller
|
|
{
|
|
public function events(Request $request)
|
|
{
|
|
try {
|
|
$webhookSecret = config('subscription.stripe_webhook_secret');
|
|
$signature = $request->header('Stripe-Signature');
|
|
$event = \Stripe\Webhook::constructEvent(
|
|
$request->getContent(),
|
|
$signature,
|
|
$webhookSecret
|
|
);
|
|
StripeProcessJob::dispatch($event);
|
|
|
|
return response('Webhook received. Cool cool cool cool cool.', 200);
|
|
} catch (Exception $e) {
|
|
return response($e->getMessage(), 400);
|
|
}
|
|
}
|
|
}
|