HSLG Media

OfficialStripeWebhookVerifier.php

OfficialStripeWebhookVerifier.php

Source file: backend/payment-modules/stripe/OfficialStripeWebhookVerifier.php

Module: backend-payment-modules

Size: 19 lines

SHA-256: fdd4c8d851f96f578505dd25251e0c44673e135d5dac82164782bc89323f7e0f

Responsibility

Holds payment adapter seams; Stripe remains fail-closed until reviewed live configuration.

Declared entry points

  • OfficialStripeWebhookVerifier — source line 10.
  • verify — source line 12.

Imports and dependencies

No direct import declarations detected in this file.

Behaviour and audit locations

  • Line 3: namespace Hslg\Backend\PaymentModules\Stripe;
  • Line 10: final class OfficialStripeWebhookVerifier
  • Line 14: if (!class_exists(\Stripe\Webhook::class) || $raw==='' || $signature==='' || $secret==='') {
  • Line 15: throw new \RuntimeException('Configured official Stripe signature verification is required.');
  • Line 17: return \Stripe\Webhook::constructEvent($raw,$signature,$secret,300);

Relationship to the system

This page is the file-level source reference, not the architecture rationale. Read the module explanation, the corresponding architecture decision and user guide before changing behaviour. Names and line locations above are extracted from this exact source version; they are reference points, not proof that an external service or a phone feature works.

Change verification

Review the entry points and errors in this file, then run the module’s associated tests, source dependency gate, history gate and documentation coverage check. If the file changes an API response, user interaction, data model, deployment or third-party dependency, revise those human explanations and disaster recovery/licensing when relevant. Do not infer actual native or external API operation from source presence.