Skip to content

Commit 73973f2

Browse files
committed
feat(payment): create Stripe utils package
1 parent 109439d commit 73973f2

File tree

8 files changed

+33
-9
lines changed

8 files changed

+33
-9
lines changed

packages/stripe-integration/src/index.ts

Lines changed: 0 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,8 +4,6 @@ export { default as createStripeUPECustomerStrategy } from './stripe-upe/create-
44
export { default as createStripeOCSPaymentStrategy } from './stripe-ocs/create-stripe-ocs-payment-strategy';
55
export { default as createStripeLinkV2CustomerStrategy } from './stripe-ocs/create-stripe-link-v2-customer-strategy';
66

7-
export { default as StripeScriptLoader } from './stripev3/stripev3-script-loader';
8-
97
export { default as StripeV3PaymentStrategy } from './stripev3/stripev3-payment-strategy';
108
export { default as StripeUPEPaymentStrategy } from './stripe-upe/stripe-upe-payment-strategy';
119
export { default as StripeUPECustomerStrategy } from './stripe-upe/stripe-upe-customer-strategy';

packages/stripe-integration/src/stripe-ocs/create-stripe-link-v2-customer-strategy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,11 @@ import {
44
CustomerStrategyFactory,
55
toResolvableModule,
66
} from '@bigcommerce/checkout-sdk/payment-integration-api';
7-
import { DEFAULT_CONTAINER_STYLES, LoadingIndicator } from '@bigcommerce/checkout-sdk/ui';
87
import {
98
StripeIntegrationService,
109
StripeScriptLoader,
1110
} from '@bigcommerce/checkout-sdk/stripe-utils';
11+
import { DEFAULT_CONTAINER_STYLES, LoadingIndicator } from '@bigcommerce/checkout-sdk/ui';
1212

1313
import StripeLinkV2CustomerStrategy from './stripe-link-v2-customer-strategy';
1414

packages/stripe-integration/src/stripe-ocs/create-stripe-ocs-payment-strategy.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ import {
44
PaymentStrategyFactory,
55
toResolvableModule,
66
} from '@bigcommerce/checkout-sdk/payment-integration-api';
7-
8-
import StripeOCSPaymentStrategy from './stripe-ocs-payment-strategy';
97
import {
108
StripeIntegrationService,
119
StripeScriptLoader,
1210
} from '@bigcommerce/checkout-sdk/stripe-utils';
1311

12+
import StripeOCSPaymentStrategy from './stripe-ocs-payment-strategy';
13+
1414
const createStripeOCSPaymentStrategy: PaymentStrategyFactory<StripeOCSPaymentStrategy> = (
1515
paymentIntegrationService,
1616
) => {

packages/stripe-integration/src/stripe-ocs/stripe-link-v2-customer-strategy.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ import {
1414
getResponse,
1515
PaymentIntegrationServiceMock,
1616
} from '@bigcommerce/checkout-sdk/payment-integrations-test-utils';
17-
import { LoadingIndicator } from '@bigcommerce/checkout-sdk/ui';
1817
import {
1918
getStripeIntegrationServiceMock,
2019
StripeClient,
@@ -25,6 +24,7 @@ import {
2524
StripeScriptLoader,
2625
StripeStringConstants,
2726
} from '@bigcommerce/checkout-sdk/stripe-utils';
27+
import { LoadingIndicator } from '@bigcommerce/checkout-sdk/ui';
2828

2929
import StripeLinkV2CustomerStrategy from './stripe-link-v2-customer-strategy';
3030
import { getStripeOCSMock } from './stripe-ocs.mock';

packages/stripe-integration/src/stripe-ocs/stripe-link-v2-customer-strategy.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,6 @@ import {
1616
PaymentMethodFailedError,
1717
ShippingOption,
1818
} from '@bigcommerce/checkout-sdk/payment-integration-api';
19-
import { LoadingIndicator } from '@bigcommerce/checkout-sdk/ui';
2019
import {
2120
isStripePaymentMethodLike,
2221
StripeAdditionalActionRequired,
@@ -37,6 +36,7 @@ import {
3736
StripeScriptLoader,
3837
StripeStringConstants,
3938
} from '@bigcommerce/checkout-sdk/stripe-utils';
39+
import { LoadingIndicator } from '@bigcommerce/checkout-sdk/ui';
4040

4141
import { expressCheckoutAllowedCountryCodes } from './constants';
4242
import { WithStripeOCSCustomerInitializeOptions } from './stripe-ocs-customer-initialize-options';

packages/stripe-integration/src/stripe-upe/create-stripe-upe-payment-strategy.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
import { getScriptLoader } from '@bigcommerce/script-loader';
2+
23
import {
34
PaymentStrategyFactory,
45
toResolvableModule,

packages/stripe-utils/src/index.ts

Lines changed: 26 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,29 @@
1-
export * from './stripe';
2-
export * from './stripe.mock';
1+
export {
2+
StripeAdditionalActionRequired,
3+
StripeAppearanceOptions,
4+
StripeClient,
5+
StripeCustomFont,
6+
StripeElement,
7+
StripeElementEvent,
8+
StripeElements,
9+
StripeElementsCreateOptions,
10+
StripeElementType,
11+
StripeElementUpdateOptions,
12+
StripeError,
13+
StripeEventType,
14+
StripeFormMode,
15+
StripeInitializationData,
16+
StripeInstrumentSetupFutureUsage,
17+
StripeLinkV2Event,
18+
StripeLinkV2Options,
19+
StripeLinkV2ShippingRate,
20+
StripePaymentMethodType,
21+
StripePIPaymentMethodOptions,
22+
StripePIPaymentMethodSavingOptions,
23+
StripeResult,
24+
StripeStringConstants,
25+
} from './stripe';
26+
export { getStripeJsMock, StripeEventMock } from './stripe.mock';
327
export { default as StripePaymentInitializeOptions } from './stripe-initialize-options';
428
export { default as StripeIntegrationService } from './stripe-integration-service';
529
export { default as StripeScriptLoader } from './stripe-script-loader';

packages/stripe-utils/src/stripe.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,7 @@ export interface PaymentIntent {
6363

6464
export interface StripePIPaymentMethodSavingOptions {
6565
setup_future_usage?: StripeInstrumentSetupFutureUsage;
66+
verification_method?: string;
6667
}
6768

6869
export interface StripePIPaymentMethodOptions {

0 commit comments

Comments
 (0)