Skip to content

Commit 4473670

Browse files
authored
feat(payment): PAYPAL-5761 Update PaypalCommerceFastlanePaymentStrategy using paypal-utils package (#3050)
1 parent 4153ee3 commit 4473670

15 files changed

+121
-126
lines changed

packages/core/src/shipping/create-shipping-strategy-registry.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,7 +10,7 @@ import {
1010
} from '@bigcommerce/checkout-sdk/braintree-utils';
1111
import {
1212
createPayPalFastlaneUtils,
13-
createPaypalSdkScriptLoader,
13+
createPayPalSdkScriptLoader,
1414
} from '@bigcommerce/checkout-sdk/paypal-utils';
1515
import { StripeScriptLoader } from '@bigcommerce/checkout-sdk/stripe-utils';
1616

@@ -110,7 +110,7 @@ export default function createShippingStrategyRegistry(
110110
consignmentActionCreator,
111111
paymentMethodActionCreator,
112112
new PaymentProviderCustomerActionCreator(),
113-
createPaypalSdkScriptLoader(),
113+
createPayPalSdkScriptLoader(),
114114
createPayPalFastlaneUtils(),
115115
),
116116
);

packages/core/src/shipping/strategies/paypal-commerce/paypal-commerce-fastlane-shipping-strategy.spec.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -10,15 +10,15 @@ import {
1010
} from '@bigcommerce/checkout-sdk/payment-integrations-test-utils';
1111
import {
1212
createPayPalFastlaneUtils,
13-
createPaypalSdkScriptLoader,
13+
createPayPalSdkScriptLoader,
1414
getPayPalAcceleratedCheckoutPaymentMethod,
1515
getPayPalFastlane,
1616
getPayPalFastlaneAuthenticationResultMock,
1717
getPayPalFastlaneSdk,
1818
PayPalFastlaneAuthenticationState,
1919
PayPalFastlaneSdk,
2020
PayPalFastlaneUtils,
21-
PaypalSdkScriptLoader,
21+
PayPalSdkScriptLoader,
2222
} from '@bigcommerce/checkout-sdk/paypal-utils';
2323

2424
import { BillingAddress, BillingAddressActionCreator } from '../../../billing';
@@ -48,7 +48,7 @@ describe('PayPalCommerceFastlaneShippingStrategy', () => {
4848
let paymentMethod: PaymentMethod;
4949
let paymentProviderCustomerActionCreator: PaymentProviderCustomerActionCreator;
5050
let paypalFastlaneSdk: PayPalFastlaneSdk;
51-
let paypalCommerceSdkScriptLoader: PaypalSdkScriptLoader;
51+
let paypalCommerceSdkScriptLoader: PayPalSdkScriptLoader;
5252
let paypalCommerceFastlaneUtils: PayPalFastlaneUtils;
5353
let store: CheckoutStore;
5454
let storeConfig: StoreConfig;
@@ -114,7 +114,7 @@ describe('PayPalCommerceFastlaneShippingStrategy', () => {
114114
new PaymentMethodRequestSender(requestSender),
115115
);
116116
paymentProviderCustomerActionCreator = new PaymentProviderCustomerActionCreator();
117-
paypalCommerceSdkScriptLoader = createPaypalSdkScriptLoader();
117+
paypalCommerceSdkScriptLoader = createPayPalSdkScriptLoader();
118118
paypalCommerceFastlaneUtils = createPayPalFastlaneUtils();
119119

120120
strategy = new PayPalCommerceFastlaneShippingStrategy(

packages/core/src/shipping/strategies/paypal-commerce/paypal-commerce-fastlane-shipping-strategy.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ import {
77
PayPalFastlaneStylesOption,
88
PayPalFastlaneUtils,
99
PayPalInitializationData,
10-
PaypalSdkScriptLoader,
10+
PayPalSdkScriptLoader,
1111
} from '@bigcommerce/checkout-sdk/paypal-utils';
1212

1313
import { AddressRequestBody } from '../../../address';
@@ -27,7 +27,7 @@ export default class PayPalCommerceFastlaneShippingStrategy implements ShippingS
2727
private _consignmentActionCreator: ConsignmentActionCreator,
2828
private _paymentMethodActionCreator: PaymentMethodActionCreator,
2929
private _paymentProviderCustomerActionCreator: PaymentProviderCustomerActionCreator,
30-
private _paypalSdkScriptLoader: PaypalSdkScriptLoader,
30+
private _paypalSdkScriptLoader: PayPalSdkScriptLoader,
3131
private _paypalCommerceFastlaneUtils: PayPalFastlaneUtils,
3232
) {}
3333

packages/paypal-commerce-integration/src/paypal-commerce-credit-card/create-paypal-commerce-credit-cards-payment-strategy.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ import {
44
} from '@bigcommerce/checkout-sdk/payment-integration-api';
55
import {
66
createPayPalFastlaneUtils,
7-
createPaypalSdkScriptLoader,
7+
createPayPalSdkScriptLoader,
88
} from '@bigcommerce/checkout-sdk/paypal-utils';
99

1010
import createPayPalCommerceIntegrationService from '../create-paypal-commerce-integration-service';
@@ -17,7 +17,7 @@ const createPaypalCommerceCreditCardsPaymentStrategy: PaymentStrategyFactory<
1717
new PayPalCommerceCreditCardsPaymentStrategy(
1818
paymentIntegrationService,
1919
createPayPalCommerceIntegrationService(paymentIntegrationService),
20-
createPaypalSdkScriptLoader(),
20+
createPayPalSdkScriptLoader(),
2121
createPayPalFastlaneUtils(),
2222
);
2323

packages/paypal-commerce-integration/src/paypal-commerce-credit-card/paypal-commerce-credit-cards-payment-strategy.spec.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -21,11 +21,11 @@ import {
2121
} from '@bigcommerce/checkout-sdk/payment-integrations-test-utils';
2222
import {
2323
createPayPalFastlaneUtils,
24-
createPaypalSdkScriptLoader,
24+
createPayPalSdkScriptLoader,
2525
getPayPalFastlaneSdk,
2626
PayPalFastlaneSdk,
2727
PayPalFastlaneUtils,
28-
PaypalSdkScriptLoader,
28+
PayPalSdkScriptLoader,
2929
} from '@bigcommerce/checkout-sdk/paypal-utils';
3030

3131
import {
@@ -53,7 +53,7 @@ describe('PayPalCommerceCreditCardsPaymentStrategy', () => {
5353
let paymentIntegrationService: PaymentIntegrationService;
5454
let paymentMethod: PaymentMethod;
5555
let paypalCommerceIntegrationService: PayPalCommerceIntegrationService;
56-
let paypalSdkScriptLoader: PaypalSdkScriptLoader;
56+
let paypalSdkScriptLoader: PayPalSdkScriptLoader;
5757
let paypalFastlaneSdk: PayPalFastlaneSdk;
5858
let payPalFastlaneUtils: PayPalFastlaneUtils;
5959
let paypalSdk: PayPalSDK;
@@ -174,7 +174,7 @@ describe('PayPalCommerceCreditCardsPaymentStrategy', () => {
174174
paypalFastlaneSdk = getPayPalFastlaneSdk();
175175
paypalCommerceIntegrationService = getPayPalCommerceIntegrationServiceMock();
176176
paymentIntegrationService = new PaymentIntegrationServiceMock();
177-
paypalSdkScriptLoader = createPaypalSdkScriptLoader();
177+
paypalSdkScriptLoader = createPayPalSdkScriptLoader();
178178
payPalFastlaneUtils = createPayPalFastlaneUtils();
179179

180180
strategy = new PayPalCommerceCreditCardsPaymentStrategy(

packages/paypal-commerce-integration/src/paypal-commerce-credit-card/paypal-commerce-credit-cards-payment-strategy.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ import { isPayPalCommerceAcceleratedCheckoutCustomer } from '@bigcommerce/checko
3939
import {
4040
PayPalFastlaneUtils,
4141
PayPalInitializationData,
42-
PaypalSdkScriptLoader,
42+
PayPalSdkScriptLoader,
4343
} from '@bigcommerce/checkout-sdk/paypal-utils';
4444

4545
import PayPalCommerceIntegrationService from '../paypal-commerce-integration-service';
@@ -75,7 +75,7 @@ export default class PayPalCommerceCreditCardsPaymentStrategy implements Payment
7575
constructor(
7676
private paymentIntegrationService: PaymentIntegrationService,
7777
private paypalCommerceIntegrationService: PayPalCommerceIntegrationService,
78-
private paypalSdkScriptLoader: PaypalSdkScriptLoader,
78+
private paypalSdkScriptLoader: PayPalSdkScriptLoader,
7979
private paypalFastlaneUtils: PayPalFastlaneUtils,
8080
) {}
8181

packages/paypal-commerce-integration/src/paypal-commerce-fastlane/create-paypal-commerce-fastlane-payment-strategy.ts

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -5,9 +5,9 @@ import {
55
toResolvableModule,
66
} from '@bigcommerce/checkout-sdk/payment-integration-api';
77
import {
8-
createPayPalCommerceFastlaneUtils,
9-
createPayPalCommerceSdk,
10-
} from '@bigcommerce/checkout-sdk/paypal-commerce-utils';
8+
createPayPalFastlaneUtils,
9+
createPayPalSdkScriptLoader,
10+
} from '@bigcommerce/checkout-sdk/paypal-utils';
1111

1212
import PayPalCommerceRequestSender from '../paypal-commerce-request-sender';
1313

@@ -21,8 +21,8 @@ const createPayPalCommerceFastlanePaymentStrategy: PaymentStrategyFactory<
2121
return new PayPalCommerceFastlanePaymentStrategy(
2222
paymentIntegrationService,
2323
new PayPalCommerceRequestSender(createRequestSender({ host: getHost() })),
24-
createPayPalCommerceSdk(),
25-
createPayPalCommerceFastlaneUtils(),
24+
createPayPalSdkScriptLoader(),
25+
createPayPalFastlaneUtils(),
2626
);
2727
};
2828

0 commit comments

Comments
 (0)