function providerValue
providerValue<T>(
provider: string | null,
values: { stripe: T; square: T; sumup: T; },
): T | null

Pick the value for the active payment provider from a per-provider set, or null when no known provider is active. The one place the stripe/square/sumup dispatch lives, so every per-provider flag is read the same way.

Type Parameters

Parameters

provider: string | null
values: { stripe: T; square: T; sumup: T; }

Return Type

T | null

Usage

import { providerValue } from "docs/config.ts";