HSLG Media

OfficialStripePaymentGateway.php

OfficialStripePaymentGateway.php

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

Module: backend-payment-modules

Size: 48 lines

SHA-256: 19cbdf47c671e9b9ccfd68fc91503a744df03f62b6896f520bec6a763fe26c88

Responsibility

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

Declared entry points

  • OfficialStripePaymentGateway — source line 16.
  • __construct — source line 18.
  • beginPayment — source line 24.

Imports and dependencies

No direct import declarations detected in this file.

Behaviour and audit locations

  • Line 3: namespace Hslg\Backend\PaymentModules\Stripe;
  • Line 6: * Adapter for the official stripe/stripe-php Composer SDK. Intentionally NOT
  • Line 9: * Direct charges on the *resolved venue's own Stripe account* are one possible
  • Line 12: * Instantiate with an official \Stripe\StripeClient bound to ONE authorised
  • Line 16: final class OfficialStripePaymentGateway implements StripePaymentGateway
  • Line 24: public function beginPayment(string $orderId,string $venueId,int $amountMinor,string $currency,string $durableIdempotencyKey): array
  • Line 26: if (!class_exists(\Stripe\StripeClient::class) || !($this->client instanceof \Stripe\StripeClient)) {
  • Line 27: throw new \RuntimeException('Official Stripe SDK is not installed and configured.');

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.