Skip to content

Commit

Permalink
show ancv id in order
Browse files Browse the repository at this point in the history
  • Loading branch information
m1aw committed Aug 22, 2024
1 parent 9f5158b commit a201475
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,16 @@ import PaymentMethodIcon from './PaymentMethodIcon';
import { useCoreContext } from '../../../../core/Context/CoreProvider';
import useImage from '../../../../core/Context/useImage';
import './OrderPaymentMethods.scss';
import { Order, OrderStatus } from '../../../../types';

export const OrderPaymentMethods = ({ order, orderStatus, onOrderCancel, brandLogoConfiguration }) => {
type OrderPaymentMethodsProps = {
order: Order;
orderStatus: OrderStatus;
onOrderCancel: (order) => void;
brandLogoConfiguration: any;
};

export const OrderPaymentMethods = ({ order, orderStatus, onOrderCancel, brandLogoConfiguration }: OrderPaymentMethodsProps) => {
const { i18n } = useCoreContext();
const getImage = useImage();

Expand All @@ -20,7 +28,7 @@ export const OrderPaymentMethods = ({ order, orderStatus, onOrderCancel, brandLo
type={orderPaymentMethod.type}
src={brandLogoConfiguration[orderPaymentMethod.type] || getImage()(orderPaymentMethod.type)}
/>
•••• {orderPaymentMethod.lastFour}
{orderPaymentMethod.label ? `${orderPaymentMethod.label}` : `•••• ${orderPaymentMethod.lastFour}`}
</div>

{onOrderCancel && (
Expand Down
4 changes: 3 additions & 1 deletion packages/lib/src/types/global-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -246,8 +246,10 @@ export interface OrderStatus {
expiresAt: string;
paymentMethods: {
amount?: PaymentAmount;
lastFour: string;
lastFour?: string;
type: string;
name?: string;
label?: string;
}[];
pspReference: string;
reference: string;
Expand Down

0 comments on commit a201475

Please sign in to comment.