Skip to content

Commit

Permalink
refactor(payments): PAYPAL-2109 removed paypalcommerceinline method i…
Browse files Browse the repository at this point in the history
…d from payments mapper
  • Loading branch information
serhii-tkachenko committed Mar 28, 2023
1 parent be5fec1 commit f952be0
Show file tree
Hide file tree
Showing 3 changed files with 0 additions and 8 deletions.
1 change: 0 additions & 1 deletion src/payment/payment-method-ids.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,5 +8,4 @@ export const PAYPAL_COMMERCE = 'paypalcommerce';
export const PAYPAL_COMMERCE_ALTERNATIVE_METHODS = 'paypalcommercealternativemethods';
export const PAYPAL_COMMERCE_CREDIT = 'paypalcommercecredit';
export const PAYPAL_COMMERCE_CREDIT_CARDS = 'paypalcommercecreditcards';
export const PAYPAL_COMMERCE_INLINE = 'paypalcommerceinline';
export const PAYPAL_COMMERCE_VENMO = 'paypalcommercevenmo';
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@ import {
PAYPAL_COMMERCE_CREDIT,
PAYPAL_COMMERCE_CREDIT_CARDS,
PAYPAL_COMMERCE_ALTERNATIVE_METHODS,
PAYPAL_COMMERCE_INLINE,
PAYPAL_COMMERCE_VENMO,
} from '../payment-method-ids';

Expand Down Expand Up @@ -38,7 +37,6 @@ function isPaypalCommercePaymentMethod(id) {
case PAYPAL_COMMERCE_CREDIT:
case PAYPAL_COMMERCE_CREDIT_CARDS:
case PAYPAL_COMMERCE_ALTERNATIVE_METHODS:
case PAYPAL_COMMERCE_INLINE:
case PAYPAL_COMMERCE_VENMO:
return true;
default:
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -66,11 +66,6 @@ describe('PaymentMethodIdMapper', () => {
expect(paymentMethodIdMapper.mapToId(paymentMethod)).toEqual(PAYMENT_METHODS.PAYPAL_COMMERCE);
});

it('returns "paypalcommerce" if the payment method is "paypalcommerceinline"', () => {
paymentMethod = { id: PAYMENT_METHODS.PAYPAL_COMMERCE_INLINE };
expect(paymentMethodIdMapper.mapToId(paymentMethod)).toEqual(PAYMENT_METHODS.PAYPAL_COMMERCE);
});

it('returns "paypalcommerce" if the payment method is "paypalcommercevenmo"', () => {
paymentMethod = { id: PAYMENT_METHODS.PAYPAL_COMMERCE_VENMO };
expect(paymentMethodIdMapper.mapToId(paymentMethod)).toEqual(PAYMENT_METHODS.PAYPAL_COMMERCE);
Expand Down

0 comments on commit f952be0

Please sign in to comment.