Skip to content

Commit f70f681

Browse files
committed
feat(payment): Stripe Link v2 create strategy
1 parent b3cdb2d commit f70f681

File tree

8 files changed

+768
-3
lines changed

8 files changed

+768
-3
lines changed

packages/stripe-integration/src/index.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
export { default as createStripeV3PaymentStrategy } from './stripev3/create-stripev3-payment-strategy';
22
export { default as createStripeUPEPaymentStrategy } from './stripe-upe/create-stripe-upe-payment-strategy';
33
export { default as createStripeUPECustomerStrategy } from './stripe-upe/create-stripe-upe-customer-strategy';
4+
export { default as createStripeLinkV2CustomerStrategy } from './stripe-link-v2/create-stripe-link-v2-customer-strategy';
45
export { default as createStripeOCSPaymentStrategy } from './stripe-upe/create-stripe-ocs-payment-strategy';
56

67
export { default as StripeScriptLoader } from './stripev3/stripev3-script-loader';
Lines changed: 240 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,240 @@
1+
export const expressCheckoutAllowedCountryCodes = [
2+
'AC',
3+
'AD',
4+
'AE',
5+
'AF',
6+
'AG',
7+
'AI',
8+
'AL',
9+
'AM',
10+
'AO',
11+
'AQ',
12+
'AR',
13+
'AT',
14+
'AU',
15+
'AW',
16+
'AX',
17+
'AZ',
18+
'BA',
19+
'BB',
20+
'BD',
21+
'BE',
22+
'BF',
23+
'BG',
24+
'BH',
25+
'BI',
26+
'BJ',
27+
'BL',
28+
'BM',
29+
'BN',
30+
'BO',
31+
'BQ',
32+
'BR',
33+
'BS',
34+
'BT',
35+
'BV',
36+
'BW',
37+
'BY',
38+
'BZ',
39+
'CA',
40+
'CD',
41+
'CF',
42+
'CG',
43+
'CH',
44+
'CI',
45+
'CK',
46+
'CL',
47+
'CM',
48+
'CN',
49+
'CO',
50+
'CR',
51+
'CV',
52+
'CW',
53+
'CY',
54+
'CZ',
55+
'DE',
56+
'DJ',
57+
'DK',
58+
'DM',
59+
'DO',
60+
'DZ',
61+
'EC',
62+
'EE',
63+
'EG',
64+
'EH',
65+
'ER',
66+
'ES',
67+
'ET',
68+
'FI',
69+
'FJ',
70+
'FK',
71+
'FO',
72+
'FR',
73+
'GA',
74+
'GB',
75+
'GD',
76+
'GE',
77+
'GF',
78+
'GG',
79+
'GH',
80+
'GI',
81+
'GL',
82+
'GM',
83+
'GN',
84+
'GP',
85+
'GQ',
86+
'GR',
87+
'GS',
88+
'GT',
89+
'GU',
90+
'GW',
91+
'GY',
92+
'HK',
93+
'HN',
94+
'HR',
95+
'HT',
96+
'HU',
97+
'ID',
98+
'IE',
99+
'IL',
100+
'IM',
101+
'IN',
102+
'IO',
103+
'IQ',
104+
'IS',
105+
'IT',
106+
'JE',
107+
'JM',
108+
'JO',
109+
'JP',
110+
'KE',
111+
'KG',
112+
'KH',
113+
'KI',
114+
'KM',
115+
'KN',
116+
'KR',
117+
'KW',
118+
'KY',
119+
'KZ',
120+
'LA',
121+
'LB',
122+
'LC',
123+
'LI',
124+
'LK',
125+
'LR',
126+
'LS',
127+
'LT',
128+
'LU',
129+
'LV',
130+
'LY',
131+
'MA',
132+
'MC',
133+
'MD',
134+
'ME',
135+
'MF',
136+
'MG',
137+
'MK',
138+
'ML',
139+
'MM',
140+
'MN',
141+
'MO',
142+
'MQ',
143+
'MR',
144+
'MS',
145+
'MT',
146+
'MU',
147+
'MV',
148+
'MW',
149+
'MX',
150+
'MY',
151+
'MZ',
152+
'NA',
153+
'NC',
154+
'NE',
155+
'NG',
156+
'NI',
157+
'NL',
158+
'NO',
159+
'NP',
160+
'NR',
161+
'NU',
162+
'NZ',
163+
'OM',
164+
'PA',
165+
'PE',
166+
'PF',
167+
'PG',
168+
'PH',
169+
'PK',
170+
'PL',
171+
'PM',
172+
'PN',
173+
'PR',
174+
'PS',
175+
'PT',
176+
'PY',
177+
'QA',
178+
'RE',
179+
'RO',
180+
'RS',
181+
'RU',
182+
'RW',
183+
'SA',
184+
'SB',
185+
'SC',
186+
'SD',
187+
'SE',
188+
'SG',
189+
'SH',
190+
'SI',
191+
'SJ',
192+
'SK',
193+
'SL',
194+
'SM',
195+
'SN',
196+
'SO',
197+
'SR',
198+
'SS',
199+
'ST',
200+
'SV',
201+
'SX',
202+
'SZ',
203+
'TA',
204+
'TC',
205+
'TD',
206+
'TF',
207+
'TG',
208+
'TH',
209+
'TJ',
210+
'TK',
211+
'TL',
212+
'TM',
213+
'TN',
214+
'TO',
215+
'TR',
216+
'TT',
217+
'TV',
218+
'TW',
219+
'TZ',
220+
'UA',
221+
'UG',
222+
'US',
223+
'UY',
224+
'UZ',
225+
'VA',
226+
'VC',
227+
'VE',
228+
'VG',
229+
'VN',
230+
'VU',
231+
'WF',
232+
'WS',
233+
'XK',
234+
'YE',
235+
'YT',
236+
'ZA',
237+
'ZM',
238+
'ZW',
239+
'ZZ',
240+
];
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
import { getScriptLoader } from '@bigcommerce/script-loader';
2+
3+
import {
4+
CustomerStrategyFactory,
5+
toResolvableModule,
6+
} from '@bigcommerce/checkout-sdk/payment-integration-api';
7+
8+
import StripeUPEScriptLoader from '../stripe-upe/stripe-upe-script-loader';
9+
10+
import StripeLinkV2CustomerStrategy from './stripe-link-v2-customer-strategy';
11+
12+
const createStripeLinkV2CustomerStrategy: CustomerStrategyFactory<StripeLinkV2CustomerStrategy> = (
13+
paymentIntegrationService,
14+
) => {
15+
return new StripeLinkV2CustomerStrategy(
16+
paymentIntegrationService,
17+
new StripeUPEScriptLoader(getScriptLoader()),
18+
);
19+
};
20+
21+
export default toResolvableModule(createStripeLinkV2CustomerStrategy, [{ id: 'stripe_link_v2' }]);

0 commit comments

Comments
 (0)