diff --git a/frontend/components/settings/organisation/StripeBillingInfo.tsx b/frontend/components/settings/organisation/StripeBillingInfo.tsx index 7357312f2..771946b93 100644 --- a/frontend/components/settings/organisation/StripeBillingInfo.tsx +++ b/frontend/components/settings/organisation/StripeBillingInfo.tsx @@ -44,6 +44,26 @@ const BrandIcon = ({ brand }: { brand?: string }) => { } } +const HiddenCardDigits = ({ brand }: { brand?: string }) => { + switch (brand) { + case 'visa': + case 'mastercard': + case 'discover': + case 'jcb': + case 'diners': + case 'diners_club': + // Format: **** **** **** + return **** **** **** + case 'amex': + case 'american_express': + // Format: **** ****** * + return **** ****** * + default: + // Generic format: **** **** **** + return **** **** **** + } +} + const DeletePaymentMethodDialog = ({ paymentMethodId }: { paymentMethodId: string }) => { const { activeOrganisation } = useContext(organisationContext) @@ -146,7 +166,7 @@ const ManagePaymentMethodsDialog = () => {