Skip to content

Commit ab2ce66

Browse files
Merge pull request #3010 from bigcommerce/PAYPAL-5348
feat(payment): PAYPAL-5348 remove paypal 3ds experiment
2 parents 78c9f83 + b843e02 commit ab2ce66

File tree

4 files changed

+4
-36
lines changed

4 files changed

+4
-36
lines changed

packages/bigcommerce-payments-integration/src/bigcommerce-payments-credit-cards/bigcommerce-payments-credit-cards-payment-strategy.spec.ts

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -25,7 +25,6 @@ import {
2525
import {
2626
getBillingAddress,
2727
getCart,
28-
getConfig,
2928
PaymentIntegrationServiceMock,
3029
} from '@bigcommerce/checkout-sdk/payment-integrations-test-utils';
3130

@@ -479,18 +478,6 @@ describe('BigCommercePaymentsCreditCardsPaymentStrategy', () => {
479478
});
480479

481480
it('does not submit order and payment if 3ds failed', async () => {
482-
jest.spyOn(
483-
paymentIntegrationService.getState(),
484-
'getStoreConfigOrThrow',
485-
).mockReturnValue({
486-
...getConfig().storeConfig,
487-
checkoutSettings: {
488-
...getConfig().storeConfig.checkoutSettings,
489-
features: {
490-
'PAYPAL-4591.paypal_commerce_3ds_verification': true,
491-
},
492-
},
493-
});
494481
jest.spyOn(paypalSdk, 'CardFields').mockImplementation(
495482
(options: BigCommercePaymentsCardFieldsConfig) => {
496483
eventEmitter.on('onApprove', () => {

packages/bigcommerce-payments-integration/src/bigcommerce-payments-credit-cards/bigcommerce-payments-credit-cards-payment-strategy.ts

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -227,8 +227,6 @@ export default class BigCommercePaymentsCreditCardsPaymentStrategy implements Pa
227227

228228
const paypalSdk = this.bigCommercePaymentsIntegrationService.getPayPalSdkOrThrow();
229229
const executeCallback = this.getExecuteCallback(fields);
230-
const state = this.paymentIntegrationService.getState();
231-
const features = state.getStoreConfigOrThrow().checkoutSettings.features;
232230

233231
const cardFieldsConfig: BigCommercePaymentsCardFieldsConfig = {
234232
style: this.getInputStyles(styles),
@@ -238,9 +236,8 @@ export default class BigCommercePaymentsCreditCardsPaymentStrategy implements Pa
238236
liabilityShift,
239237
}: BigCommercePaymentsCardFieldsOnApproveData) => {
240238
if (
241-
features?.['PAYPAL-4591.paypal_commerce_3ds_verification'] &&
242-
(liabilityShift === LiabilityShiftEnum.No ||
243-
liabilityShift === LiabilityShiftEnum.Unknown)
239+
liabilityShift === LiabilityShiftEnum.No ||
240+
liabilityShift === LiabilityShiftEnum.Unknown
244241
) {
245242
throw new Error();
246243
}

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

Lines changed: 0 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,6 @@ import {
1717
import {
1818
getBillingAddress,
1919
getCart,
20-
getConfig,
2120
PaymentIntegrationServiceMock,
2221
} from '@bigcommerce/checkout-sdk/payment-integrations-test-utils';
2322
import {
@@ -470,18 +469,6 @@ describe('PayPalCommerceCreditCardsPaymentStrategy', () => {
470469
});
471470

472471
it('does not submit order and payment if 3ds failed', async () => {
473-
jest.spyOn(
474-
paymentIntegrationService.getState(),
475-
'getStoreConfigOrThrow',
476-
).mockReturnValue({
477-
...getConfig().storeConfig,
478-
checkoutSettings: {
479-
...getConfig().storeConfig.checkoutSettings,
480-
features: {
481-
'PAYPAL-4591.paypal_commerce_3ds_verification': true,
482-
},
483-
},
484-
});
485472
jest.spyOn(paypalSdk, 'CardFields').mockImplementation(
486473
(options: PayPalCommerceCardFieldsConfig) => {
487474
eventEmitter.on('onApprove', () => {

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

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -220,8 +220,6 @@ export default class PayPalCommerceCreditCardsPaymentStrategy implements Payment
220220

221221
const paypalSdk = this.paypalCommerceIntegrationService.getPayPalSdkOrThrow();
222222
const executeCallback = this.getExecuteCallback(fields);
223-
const state = this.paymentIntegrationService.getState();
224-
const features = state.getStoreConfigOrThrow().checkoutSettings.features;
225223

226224
const cardFieldsConfig: PayPalCommerceCardFieldsConfig = {
227225
style: this.getInputStyles(styles),
@@ -231,9 +229,8 @@ export default class PayPalCommerceCreditCardsPaymentStrategy implements Payment
231229
liabilityShift,
232230
}: PayPalCommerceCardFieldsOnApproveData) => {
233231
if (
234-
features?.['PAYPAL-4591.paypal_commerce_3ds_verification'] &&
235-
(liabilityShift === LiabilityShiftEnum.No ||
236-
liabilityShift === LiabilityShiftEnum.Unknown)
232+
liabilityShift === LiabilityShiftEnum.No ||
233+
liabilityShift === LiabilityShiftEnum.Unknown
237234
) {
238235
throw new Error();
239236
}

0 commit comments

Comments
 (0)