Skip to content

Commit

Permalink
[V5] Show ANCV id order (#2809)
Browse files Browse the repository at this point in the history
* show ancv id in order

(cherry picked from commit a201475)

* add changeset

(cherry picked from commit 8791d2a)
  • Loading branch information
m1aw authored Aug 26, 2024
1 parent 1650183 commit 0218962
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 3 deletions.
5 changes: 5 additions & 0 deletions .changeset/sour-forks-care.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
---
'@adyen/adyen-web': minor
---

Display ANCV ID while displaying used payment methods on Dropin
Original file line number Diff line number Diff line change
Expand Up @@ -3,8 +3,17 @@ import PaymentMethodIcon from './PaymentMethodIcon';
import useCoreContext from '../../../../core/Context/useCoreContext';
import './OrderPaymentMethods.scss';
import useImage from '../../../../core/Context/useImage';
import './OrderPaymentMethods.scss';
import { Order, OrderStatus } from '../../../../types';

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

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

Expand All @@ -20,7 +29,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/index.ts
Original file line number Diff line number Diff line change
Expand Up @@ -247,8 +247,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 0218962

Please sign in to comment.