Initialize webhook processing in StripePaymentDriver

Added initialization for webhook processing and error handling.

Signed-off-by: TechNoNerd87 <113461509+TechNoNerd87@users.noreply.github.com>
This commit is contained in:
TechNoNerd87 2025-11-23 14:49:48 -06:00 committed by GitHub
parent 64ce5abde6
commit 4288b9db1b
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 9 additions and 1 deletions

View File

@ -704,7 +704,15 @@ class StripePaymentDriver extends BaseDriver implements SupportsHeadlessInterfac
public function processWebhookRequest(PaymentWebhookRequest $request)
{
// Validate webhook signature if webhook_secret is configured
// Initialize to load webhook_secret and other config
try {
$this->init();
} catch (\Exception $e) {
nlog("Stripe webhook init failed: " . $e->getMessage());
// Continue without webhook secret verification if init fails
}
// Validate webhook signature if webhook_secret is configured
if ($this->webhook_secret) {
$sig_header = $_SERVER["HTTP_STRIPE_SIGNATURE"] ?? $request->header('Stripe-Signature');