Gamend.Payments.ProviderConfig (gamend_core v1.0.1296)

Copy Markdown View Source

Runtime payment-provider configuration helpers.

PAYMENTS_ENVIRONMENT is the single switch that selects sandbox versus production provider credentials for this host.

Summary

Functions

The API version for creating a Checkout Session: the configured one, raised to 2025-03-31.basil when Managed Payments is on and the configured one is older. Only that call is raised, so every other request, and the payloads core parses from them, keep the configured version.

Whether checkouts go through Stripe Managed Payments (Stripe as merchant of record).

Types

environment()

@type environment() :: String.t()

Functions

environment()

@spec environment() :: environment()

environments()

@spec environments() :: [String.t()]

normalize_environment(value, fallback \\ "production")

production?()

@spec production?() :: boolean()

stripe_api_version()

@spec stripe_api_version() :: String.t()

stripe_api_version_source()

@spec stripe_api_version_source() :: {String.t(), String.t()} | nil

stripe_candidate_labels(kind)

@spec stripe_candidate_labels(:secret_key | :webhook_secret) :: [String.t()]

stripe_checkout_api_version()

@spec stripe_checkout_api_version() :: String.t()

The API version for creating a Checkout Session: the configured one, raised to 2025-03-31.basil when Managed Payments is on and the configured one is older. Only that call is raised, so every other request, and the payloads core parses from them, keep the configured version.

stripe_managed_payments?()

@spec stripe_managed_payments?() :: boolean()

Whether checkouts go through Stripe Managed Payments (Stripe as merchant of record).

stripe_secret_key()

@spec stripe_secret_key() :: String.t() | nil

stripe_secret_key_source()

@spec stripe_secret_key_source() :: {String.t(), String.t()} | nil

stripe_webhook_secret()

@spec stripe_webhook_secret() :: String.t() | nil

stripe_webhook_secret_source()

@spec stripe_webhook_secret_source() :: {String.t(), String.t()} | nil