mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 09:08:09 +08:00
Add Billing Details updating when a new card gets selected
This commit is contained in:
parent
861034855e
commit
24a481bdeb
12 changed files with 399 additions and 152 deletions
|
@ -11,14 +11,8 @@ const cardIcons = {
|
|||
UNIONPAY: 'unionpay-light.svg',
|
||||
};
|
||||
|
||||
export const CreditCard = ( {
|
||||
card,
|
||||
shippingAddress,
|
||||
fastlaneSdk,
|
||||
showWatermark = true,
|
||||
} ) => {
|
||||
const { brand, lastDigits, expiry } = card?.paymentSource?.card ?? {};
|
||||
const { fullName } = shippingAddress?.name ?? {};
|
||||
export const CreditCard = ( { card, fastlaneSdk, showWatermark = true } ) => {
|
||||
const { brand, lastDigits, expiry, name } = card?.paymentSource?.card ?? {};
|
||||
|
||||
const cardLogo = useMemo( () => {
|
||||
return cardIcons[ brand ] ? (
|
||||
|
@ -48,7 +42,7 @@ export const CreditCard = ( {
|
|||
{ cardLogo }
|
||||
</div>
|
||||
<div className="wc-block-checkout-axo-block-card__meta">
|
||||
<span>{ fullName }</span>
|
||||
<span>{ name }</span>
|
||||
<span>{ formattedExpiry }</span>{ ' ' }
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue