@flopay/shared 1.2.6 → 1.2.8
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/dist/index.cjs +11 -2
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +15 -4
- package/dist/index.d.ts +15 -4
- package/dist/index.mjs +10 -2
- package/dist/index.mjs.map +1 -1
- package/package.json +4 -3
package/dist/index.d.cts
CHANGED
|
@@ -191,8 +191,12 @@ type CheckoutProductType = 'item' | 'subscription';
|
|
|
191
191
|
interface CheckoutSessionProduct {
|
|
192
192
|
uuid: string;
|
|
193
193
|
checkoutSessionId: string;
|
|
194
|
-
/**
|
|
195
|
-
|
|
194
|
+
/**
|
|
195
|
+
* Whether this product is a one-time item or a recurring subscription.
|
|
196
|
+
* Optional to mirror {@link CheckoutProduct.type}; when omitted, consumers
|
|
197
|
+
* treat the product as an `'item'` for display ordering.
|
|
198
|
+
*/
|
|
199
|
+
type?: CheckoutProductType;
|
|
196
200
|
/** Preferred catalog code for the product. */
|
|
197
201
|
code?: string;
|
|
198
202
|
/**
|
|
@@ -1003,7 +1007,7 @@ declare function getConfiguredBillingApiUrl(): string;
|
|
|
1003
1007
|
declare function getFloPayEnvironment(): FloPayEnvironment;
|
|
1004
1008
|
|
|
1005
1009
|
/** Current SDK version. */
|
|
1006
|
-
declare const SDK_VERSION = "1.2.
|
|
1010
|
+
declare const SDK_VERSION = "1.2.8";
|
|
1007
1011
|
/** Billing API URL for staging environment. */
|
|
1008
1012
|
declare const BILLING_API_URL_STAGING = "https://api.stage.flopay.com";
|
|
1009
1013
|
/** Billing API URL for production environment. */
|
|
@@ -1543,5 +1547,12 @@ declare function getCurrencyByCountry(countryCode: string): CurrencyInfo;
|
|
|
1543
1547
|
declare function isValidPublishableKey(key: string): boolean;
|
|
1544
1548
|
/** Returns `true` if the string looks like a Stripe secret key. */
|
|
1545
1549
|
declare function isValidSecretKey(key: string): boolean;
|
|
1550
|
+
/**
|
|
1551
|
+
* Returns `true` when the client secret belongs to a SetupIntent (`seti_…`).
|
|
1552
|
+
* Trial-only / $0 checkouts confirm and retrieve a SetupIntent instead of a
|
|
1553
|
+
* PaymentIntent, so callers must route those to `confirmCardSetup` /
|
|
1554
|
+
* `retrieveSetupIntent` rather than the PaymentIntent equivalents.
|
|
1555
|
+
*/
|
|
1556
|
+
declare function isSetupIntentClientSecret(clientSecret: string | null | undefined): boolean;
|
|
1546
1557
|
|
|
1547
|
-
export { type AVSFieldConfig, BILLING_API_URL, BILLING_API_URL_PRODUCTION, BILLING_API_URL_STAGING, BOLD_DARK_APPEARANCE, BOLD_LIGHT_APPEARANCE, BUTTONS_LAYOUT_BOLD_DARK, BUTTONS_LAYOUT_BOLD_LIGHT, BUTTONS_LAYOUT_DARK, BUTTONS_LAYOUT_DEFAULT, BUTTONS_LAYOUT_GLASS_DARK, BUTTONS_LAYOUT_GLASS_LIGHT, BUTTONS_LAYOUT_MINIMAL, BUTTONS_LAYOUT_MODERN_DARK, BUTTONS_LAYOUT_MODERN_LIGHT, BUTTONS_LAYOUT_ROUNDED, type BeforeButtonClickEvent, type BillingDetails, type BillingProvider, type BuildCheckoutDisplayDataOptions, type ButtonsLayoutStyles, type ButtonsLayoutTheme, CA_PROVINCES, COUNTRY_OPTIONS, CURRENCY_MAP, type CheckoutAccount, type CheckoutButtonMethod, type CheckoutDisplayData, type CheckoutGateway, type CheckoutGateways, type CheckoutItem, type CheckoutMode, type CheckoutModeKind, type CheckoutProcessError, type CheckoutProcessingPending, type CheckoutProduct, type CheckoutProductType, type CheckoutSession, type CheckoutSessionProduct, type CheckoutSessionResult, type CheckoutSubscription, type ConfirmCardPaymentParams, type ConfirmCardPaymentResult, type ConfirmPaymentParams, type CountryOption, type CreateCustomerParams, type CreatePaymentMethodResult, type CreateSessionParams, type CurrencyInfo, type Customer, DEFAULT_API_BASE_URL, DEFAULT_API_VERSION, DEFAULT_APPEARANCE, DEFAULT_CURRENCY, type DeclineEvent, type DisplayLineItem, ELEMENT_TYPES, type ElementChangeEvent, type ElementOptions, type ElementType, FLAT_APPEARANCE, type FloPayAppearance, type FloPayConfig, type FloPayEnvironment, FloPayError, type FloPayErrorType, type FloPayThemeVariables, GLASS_DARK_APPEARANCE, GLASS_LIGHT_APPEARANCE, type GatewayEnvironment, type InlineSessionDraft, type InlineSessionParams, type InlineSessionPatch, type LineItem, MODERN_DARK_APPEARANCE, MODERN_LIGHT_APPEARANCE, type MountedElement, NIGHT_APPEARANCE, type NormalizedCheckoutSession, type NormalizedGatewayEnvironment, type PaymentProviderAdapter, type PaymentResult, type PriceData, type ProcessPaymentParams, type RecurringInterval, SDK_VERSION, STRIPE_EXPRESS_METHODS, STRIPE_METHOD_AMOUNT_LIMITS, STRIPE_METHOD_COUNTRIES, STRIPE_METHOD_CURRENCIES, STRIPE_METHOD_MATRIX, SUPPORTED_CARD_BRANDS, type StateOption, type StripeMethodEntry, type StripeMethodThemeVariant, THEMES, type TagsData, type ThemeBundle, type ThemeBundleId, type ThemeId, type TokenizedBody, US_STATES, type UpdateCustomerParams, type WebhookEvent, apiError, authenticationError, buildCheckoutDisplayData, buildItemPayload, buildProductPayload, buildSubscriptionPayload, configureFlopay, filterStripeMethodsByAmount, filterStripeMethodsByCountry, filterStripeMethodsByCurrency, foldIntoProducts, getConfiguredBillingApiUrl, getCountryByCode, getCurrencyByCountry, getFloPayEnvironment, getPostalCodeLabel, getStateFromPostalCode, getStateLabel, getStateOptions, getStripeMethodDisplayName, hasVendoredStripeMethodLogo, isAVSEnabled, isAVSFieldVisible, isValidPublishableKey, isValidSecretKey, needsStripeMethodExplicitConfirm, networkError, normalizeGatewayEnvironment, partitionStripeMethods, rateLimitError, resolveAVSConfig, resolveBillingApiUrl, resolveButtonsLayoutTheme, resolveSessionCurrency, resolveStripeMethodBrandVariant, resolveTheme, stripeExpressMethodToOptionKey, validationError };
|
|
1558
|
+
export { type AVSFieldConfig, BILLING_API_URL, BILLING_API_URL_PRODUCTION, BILLING_API_URL_STAGING, BOLD_DARK_APPEARANCE, BOLD_LIGHT_APPEARANCE, BUTTONS_LAYOUT_BOLD_DARK, BUTTONS_LAYOUT_BOLD_LIGHT, BUTTONS_LAYOUT_DARK, BUTTONS_LAYOUT_DEFAULT, BUTTONS_LAYOUT_GLASS_DARK, BUTTONS_LAYOUT_GLASS_LIGHT, BUTTONS_LAYOUT_MINIMAL, BUTTONS_LAYOUT_MODERN_DARK, BUTTONS_LAYOUT_MODERN_LIGHT, BUTTONS_LAYOUT_ROUNDED, type BeforeButtonClickEvent, type BillingDetails, type BillingProvider, type BuildCheckoutDisplayDataOptions, type ButtonsLayoutStyles, type ButtonsLayoutTheme, CA_PROVINCES, COUNTRY_OPTIONS, CURRENCY_MAP, type CheckoutAccount, type CheckoutButtonMethod, type CheckoutDisplayData, type CheckoutGateway, type CheckoutGateways, type CheckoutItem, type CheckoutMode, type CheckoutModeKind, type CheckoutProcessError, type CheckoutProcessingPending, type CheckoutProduct, type CheckoutProductType, type CheckoutSession, type CheckoutSessionProduct, type CheckoutSessionResult, type CheckoutSubscription, type ConfirmCardPaymentParams, type ConfirmCardPaymentResult, type ConfirmPaymentParams, type CountryOption, type CreateCustomerParams, type CreatePaymentMethodResult, type CreateSessionParams, type CurrencyInfo, type Customer, DEFAULT_API_BASE_URL, DEFAULT_API_VERSION, DEFAULT_APPEARANCE, DEFAULT_CURRENCY, type DeclineEvent, type DisplayLineItem, ELEMENT_TYPES, type ElementChangeEvent, type ElementOptions, type ElementType, FLAT_APPEARANCE, type FloPayAppearance, type FloPayConfig, type FloPayEnvironment, FloPayError, type FloPayErrorType, type FloPayThemeVariables, GLASS_DARK_APPEARANCE, GLASS_LIGHT_APPEARANCE, type GatewayEnvironment, type InlineSessionDraft, type InlineSessionParams, type InlineSessionPatch, type LineItem, MODERN_DARK_APPEARANCE, MODERN_LIGHT_APPEARANCE, type MountedElement, NIGHT_APPEARANCE, type NormalizedCheckoutSession, type NormalizedGatewayEnvironment, type PaymentProviderAdapter, type PaymentResult, type PriceData, type ProcessPaymentParams, type RecurringInterval, SDK_VERSION, STRIPE_EXPRESS_METHODS, STRIPE_METHOD_AMOUNT_LIMITS, STRIPE_METHOD_COUNTRIES, STRIPE_METHOD_CURRENCIES, STRIPE_METHOD_MATRIX, SUPPORTED_CARD_BRANDS, type StateOption, type StripeMethodEntry, type StripeMethodThemeVariant, THEMES, type TagsData, type ThemeBundle, type ThemeBundleId, type ThemeId, type TokenizedBody, US_STATES, type UpdateCustomerParams, type WebhookEvent, apiError, authenticationError, buildCheckoutDisplayData, buildItemPayload, buildProductPayload, buildSubscriptionPayload, configureFlopay, filterStripeMethodsByAmount, filterStripeMethodsByCountry, filterStripeMethodsByCurrency, foldIntoProducts, getConfiguredBillingApiUrl, getCountryByCode, getCurrencyByCountry, getFloPayEnvironment, getPostalCodeLabel, getStateFromPostalCode, getStateLabel, getStateOptions, getStripeMethodDisplayName, hasVendoredStripeMethodLogo, isAVSEnabled, isAVSFieldVisible, isSetupIntentClientSecret, isValidPublishableKey, isValidSecretKey, needsStripeMethodExplicitConfirm, networkError, normalizeGatewayEnvironment, partitionStripeMethods, rateLimitError, resolveAVSConfig, resolveBillingApiUrl, resolveButtonsLayoutTheme, resolveSessionCurrency, resolveStripeMethodBrandVariant, resolveTheme, stripeExpressMethodToOptionKey, validationError };
|
package/dist/index.d.ts
CHANGED
|
@@ -191,8 +191,12 @@ type CheckoutProductType = 'item' | 'subscription';
|
|
|
191
191
|
interface CheckoutSessionProduct {
|
|
192
192
|
uuid: string;
|
|
193
193
|
checkoutSessionId: string;
|
|
194
|
-
/**
|
|
195
|
-
|
|
194
|
+
/**
|
|
195
|
+
* Whether this product is a one-time item or a recurring subscription.
|
|
196
|
+
* Optional to mirror {@link CheckoutProduct.type}; when omitted, consumers
|
|
197
|
+
* treat the product as an `'item'` for display ordering.
|
|
198
|
+
*/
|
|
199
|
+
type?: CheckoutProductType;
|
|
196
200
|
/** Preferred catalog code for the product. */
|
|
197
201
|
code?: string;
|
|
198
202
|
/**
|
|
@@ -1003,7 +1007,7 @@ declare function getConfiguredBillingApiUrl(): string;
|
|
|
1003
1007
|
declare function getFloPayEnvironment(): FloPayEnvironment;
|
|
1004
1008
|
|
|
1005
1009
|
/** Current SDK version. */
|
|
1006
|
-
declare const SDK_VERSION = "1.2.
|
|
1010
|
+
declare const SDK_VERSION = "1.2.8";
|
|
1007
1011
|
/** Billing API URL for staging environment. */
|
|
1008
1012
|
declare const BILLING_API_URL_STAGING = "https://api.stage.flopay.com";
|
|
1009
1013
|
/** Billing API URL for production environment. */
|
|
@@ -1543,5 +1547,12 @@ declare function getCurrencyByCountry(countryCode: string): CurrencyInfo;
|
|
|
1543
1547
|
declare function isValidPublishableKey(key: string): boolean;
|
|
1544
1548
|
/** Returns `true` if the string looks like a Stripe secret key. */
|
|
1545
1549
|
declare function isValidSecretKey(key: string): boolean;
|
|
1550
|
+
/**
|
|
1551
|
+
* Returns `true` when the client secret belongs to a SetupIntent (`seti_…`).
|
|
1552
|
+
* Trial-only / $0 checkouts confirm and retrieve a SetupIntent instead of a
|
|
1553
|
+
* PaymentIntent, so callers must route those to `confirmCardSetup` /
|
|
1554
|
+
* `retrieveSetupIntent` rather than the PaymentIntent equivalents.
|
|
1555
|
+
*/
|
|
1556
|
+
declare function isSetupIntentClientSecret(clientSecret: string | null | undefined): boolean;
|
|
1546
1557
|
|
|
1547
|
-
export { type AVSFieldConfig, BILLING_API_URL, BILLING_API_URL_PRODUCTION, BILLING_API_URL_STAGING, BOLD_DARK_APPEARANCE, BOLD_LIGHT_APPEARANCE, BUTTONS_LAYOUT_BOLD_DARK, BUTTONS_LAYOUT_BOLD_LIGHT, BUTTONS_LAYOUT_DARK, BUTTONS_LAYOUT_DEFAULT, BUTTONS_LAYOUT_GLASS_DARK, BUTTONS_LAYOUT_GLASS_LIGHT, BUTTONS_LAYOUT_MINIMAL, BUTTONS_LAYOUT_MODERN_DARK, BUTTONS_LAYOUT_MODERN_LIGHT, BUTTONS_LAYOUT_ROUNDED, type BeforeButtonClickEvent, type BillingDetails, type BillingProvider, type BuildCheckoutDisplayDataOptions, type ButtonsLayoutStyles, type ButtonsLayoutTheme, CA_PROVINCES, COUNTRY_OPTIONS, CURRENCY_MAP, type CheckoutAccount, type CheckoutButtonMethod, type CheckoutDisplayData, type CheckoutGateway, type CheckoutGateways, type CheckoutItem, type CheckoutMode, type CheckoutModeKind, type CheckoutProcessError, type CheckoutProcessingPending, type CheckoutProduct, type CheckoutProductType, type CheckoutSession, type CheckoutSessionProduct, type CheckoutSessionResult, type CheckoutSubscription, type ConfirmCardPaymentParams, type ConfirmCardPaymentResult, type ConfirmPaymentParams, type CountryOption, type CreateCustomerParams, type CreatePaymentMethodResult, type CreateSessionParams, type CurrencyInfo, type Customer, DEFAULT_API_BASE_URL, DEFAULT_API_VERSION, DEFAULT_APPEARANCE, DEFAULT_CURRENCY, type DeclineEvent, type DisplayLineItem, ELEMENT_TYPES, type ElementChangeEvent, type ElementOptions, type ElementType, FLAT_APPEARANCE, type FloPayAppearance, type FloPayConfig, type FloPayEnvironment, FloPayError, type FloPayErrorType, type FloPayThemeVariables, GLASS_DARK_APPEARANCE, GLASS_LIGHT_APPEARANCE, type GatewayEnvironment, type InlineSessionDraft, type InlineSessionParams, type InlineSessionPatch, type LineItem, MODERN_DARK_APPEARANCE, MODERN_LIGHT_APPEARANCE, type MountedElement, NIGHT_APPEARANCE, type NormalizedCheckoutSession, type NormalizedGatewayEnvironment, type PaymentProviderAdapter, type PaymentResult, type PriceData, type ProcessPaymentParams, type RecurringInterval, SDK_VERSION, STRIPE_EXPRESS_METHODS, STRIPE_METHOD_AMOUNT_LIMITS, STRIPE_METHOD_COUNTRIES, STRIPE_METHOD_CURRENCIES, STRIPE_METHOD_MATRIX, SUPPORTED_CARD_BRANDS, type StateOption, type StripeMethodEntry, type StripeMethodThemeVariant, THEMES, type TagsData, type ThemeBundle, type ThemeBundleId, type ThemeId, type TokenizedBody, US_STATES, type UpdateCustomerParams, type WebhookEvent, apiError, authenticationError, buildCheckoutDisplayData, buildItemPayload, buildProductPayload, buildSubscriptionPayload, configureFlopay, filterStripeMethodsByAmount, filterStripeMethodsByCountry, filterStripeMethodsByCurrency, foldIntoProducts, getConfiguredBillingApiUrl, getCountryByCode, getCurrencyByCountry, getFloPayEnvironment, getPostalCodeLabel, getStateFromPostalCode, getStateLabel, getStateOptions, getStripeMethodDisplayName, hasVendoredStripeMethodLogo, isAVSEnabled, isAVSFieldVisible, isValidPublishableKey, isValidSecretKey, needsStripeMethodExplicitConfirm, networkError, normalizeGatewayEnvironment, partitionStripeMethods, rateLimitError, resolveAVSConfig, resolveBillingApiUrl, resolveButtonsLayoutTheme, resolveSessionCurrency, resolveStripeMethodBrandVariant, resolveTheme, stripeExpressMethodToOptionKey, validationError };
|
|
1558
|
+
export { type AVSFieldConfig, BILLING_API_URL, BILLING_API_URL_PRODUCTION, BILLING_API_URL_STAGING, BOLD_DARK_APPEARANCE, BOLD_LIGHT_APPEARANCE, BUTTONS_LAYOUT_BOLD_DARK, BUTTONS_LAYOUT_BOLD_LIGHT, BUTTONS_LAYOUT_DARK, BUTTONS_LAYOUT_DEFAULT, BUTTONS_LAYOUT_GLASS_DARK, BUTTONS_LAYOUT_GLASS_LIGHT, BUTTONS_LAYOUT_MINIMAL, BUTTONS_LAYOUT_MODERN_DARK, BUTTONS_LAYOUT_MODERN_LIGHT, BUTTONS_LAYOUT_ROUNDED, type BeforeButtonClickEvent, type BillingDetails, type BillingProvider, type BuildCheckoutDisplayDataOptions, type ButtonsLayoutStyles, type ButtonsLayoutTheme, CA_PROVINCES, COUNTRY_OPTIONS, CURRENCY_MAP, type CheckoutAccount, type CheckoutButtonMethod, type CheckoutDisplayData, type CheckoutGateway, type CheckoutGateways, type CheckoutItem, type CheckoutMode, type CheckoutModeKind, type CheckoutProcessError, type CheckoutProcessingPending, type CheckoutProduct, type CheckoutProductType, type CheckoutSession, type CheckoutSessionProduct, type CheckoutSessionResult, type CheckoutSubscription, type ConfirmCardPaymentParams, type ConfirmCardPaymentResult, type ConfirmPaymentParams, type CountryOption, type CreateCustomerParams, type CreatePaymentMethodResult, type CreateSessionParams, type CurrencyInfo, type Customer, DEFAULT_API_BASE_URL, DEFAULT_API_VERSION, DEFAULT_APPEARANCE, DEFAULT_CURRENCY, type DeclineEvent, type DisplayLineItem, ELEMENT_TYPES, type ElementChangeEvent, type ElementOptions, type ElementType, FLAT_APPEARANCE, type FloPayAppearance, type FloPayConfig, type FloPayEnvironment, FloPayError, type FloPayErrorType, type FloPayThemeVariables, GLASS_DARK_APPEARANCE, GLASS_LIGHT_APPEARANCE, type GatewayEnvironment, type InlineSessionDraft, type InlineSessionParams, type InlineSessionPatch, type LineItem, MODERN_DARK_APPEARANCE, MODERN_LIGHT_APPEARANCE, type MountedElement, NIGHT_APPEARANCE, type NormalizedCheckoutSession, type NormalizedGatewayEnvironment, type PaymentProviderAdapter, type PaymentResult, type PriceData, type ProcessPaymentParams, type RecurringInterval, SDK_VERSION, STRIPE_EXPRESS_METHODS, STRIPE_METHOD_AMOUNT_LIMITS, STRIPE_METHOD_COUNTRIES, STRIPE_METHOD_CURRENCIES, STRIPE_METHOD_MATRIX, SUPPORTED_CARD_BRANDS, type StateOption, type StripeMethodEntry, type StripeMethodThemeVariant, THEMES, type TagsData, type ThemeBundle, type ThemeBundleId, type ThemeId, type TokenizedBody, US_STATES, type UpdateCustomerParams, type WebhookEvent, apiError, authenticationError, buildCheckoutDisplayData, buildItemPayload, buildProductPayload, buildSubscriptionPayload, configureFlopay, filterStripeMethodsByAmount, filterStripeMethodsByCountry, filterStripeMethodsByCurrency, foldIntoProducts, getConfiguredBillingApiUrl, getCountryByCode, getCurrencyByCountry, getFloPayEnvironment, getPostalCodeLabel, getStateFromPostalCode, getStateLabel, getStateOptions, getStripeMethodDisplayName, hasVendoredStripeMethodLogo, isAVSEnabled, isAVSFieldVisible, isSetupIntentClientSecret, isValidPublishableKey, isValidSecretKey, needsStripeMethodExplicitConfirm, networkError, normalizeGatewayEnvironment, partitionStripeMethods, rateLimitError, resolveAVSConfig, resolveBillingApiUrl, resolveButtonsLayoutTheme, resolveSessionCurrency, resolveStripeMethodBrandVariant, resolveTheme, stripeExpressMethodToOptionKey, validationError };
|
package/dist/index.mjs
CHANGED
|
@@ -79,7 +79,7 @@ var PAYMENT_METHOD_LOGOS = {
|
|
|
79
79
|
};
|
|
80
80
|
|
|
81
81
|
// src/constants.ts
|
|
82
|
-
var SDK_VERSION = "1.2.
|
|
82
|
+
var SDK_VERSION = "1.2.8";
|
|
83
83
|
var BILLING_API_URL_STAGING = "https://api.stage.flopay.com";
|
|
84
84
|
var BILLING_API_URL_PRODUCTION = "https://api.flopay.com";
|
|
85
85
|
var DEFAULT_API_BASE_URL = BILLING_API_URL_STAGING;
|
|
@@ -870,6 +870,10 @@ var STRIPE_METHOD_MATRIX = {
|
|
|
870
870
|
displayName: "Cash App Pay",
|
|
871
871
|
currencies: ["usd"],
|
|
872
872
|
countries: ["US"],
|
|
873
|
+
// Cash App Pay cannot process a $0 (or sub-$0.50) charge — Stripe rejects
|
|
874
|
+
// `amount_too_small`. Range per Stripe: USD 0.50 – 999,999.99. Keeps a
|
|
875
|
+
// free-trial ($0 today) cart from surfacing a Cash App button.
|
|
876
|
+
amounts: { usd: { min: 50, max: 99999999 } },
|
|
873
877
|
needsExplicitConfirm: false,
|
|
874
878
|
theme: {
|
|
875
879
|
light: {
|
|
@@ -1855,7 +1859,7 @@ function buildCheckoutDisplayData(session, options = {}) {
|
|
|
1855
1859
|
const itemsList = [];
|
|
1856
1860
|
const products = session.products ?? [];
|
|
1857
1861
|
const subscriptions = products.filter((p) => p.type === "subscription");
|
|
1858
|
-
const items = products.filter((p) => p.type
|
|
1862
|
+
const items = products.filter((p) => p.type !== "subscription");
|
|
1859
1863
|
const resolvedCurrency = resolveSessionCurrency(session.currency, void 0, void 0, products);
|
|
1860
1864
|
const currency = (resolvedCurrency ?? "USD").toUpperCase();
|
|
1861
1865
|
for (const sub of subscriptions) {
|
|
@@ -1923,6 +1927,9 @@ function isValidPublishableKey(key) {
|
|
|
1923
1927
|
function isValidSecretKey(key) {
|
|
1924
1928
|
return /^sk_(test|live)_[A-Za-z0-9]+$/.test(key);
|
|
1925
1929
|
}
|
|
1930
|
+
function isSetupIntentClientSecret(clientSecret) {
|
|
1931
|
+
return typeof clientSecret === "string" && clientSecret.startsWith("seti_");
|
|
1932
|
+
}
|
|
1926
1933
|
export {
|
|
1927
1934
|
BILLING_API_URL,
|
|
1928
1935
|
BILLING_API_URL_PRODUCTION,
|
|
@@ -1986,6 +1993,7 @@ export {
|
|
|
1986
1993
|
hasVendoredStripeMethodLogo,
|
|
1987
1994
|
isAVSEnabled,
|
|
1988
1995
|
isAVSFieldVisible,
|
|
1996
|
+
isSetupIntentClientSecret,
|
|
1989
1997
|
isValidPublishableKey,
|
|
1990
1998
|
isValidSecretKey,
|
|
1991
1999
|
needsStripeMethodExplicitConfirm,
|