mirror of
https://github.com/woocommerce/woocommerce-paypal-payments.git
synced 2025-09-06 10:55:00 +08:00
Add better state management utilizing Redux
This commit is contained in:
parent
db449b5d70
commit
bccfe4c436
11 changed files with 432 additions and 172 deletions
|
@ -11,7 +11,12 @@ const cardIcons = {
|
|||
UNIONPAY: 'unionpay-light.svg',
|
||||
};
|
||||
|
||||
export const CreditCard = ( { card, shippingAddress, fastlaneSdk } ) => {
|
||||
export const CreditCard = ( {
|
||||
card,
|
||||
shippingAddress,
|
||||
fastlaneSdk,
|
||||
showWatermark = true,
|
||||
} ) => {
|
||||
const { brand, lastDigits, expiry } = card?.paymentSource?.card ?? {};
|
||||
const { fullName } = shippingAddress?.name ?? {};
|
||||
|
||||
|
@ -48,11 +53,13 @@ export const CreditCard = ( { card, shippingAddress, fastlaneSdk } ) => {
|
|||
</div>
|
||||
</div>
|
||||
<div className="wc-block-checkout-axo-block-card__watermark">
|
||||
<FastlaneWatermark
|
||||
fastlaneSdk={ fastlaneSdk }
|
||||
name="wc-block-checkout-axo-card-watermark"
|
||||
includeAdditionalInfo={ false }
|
||||
/>
|
||||
{ showWatermark && (
|
||||
<FastlaneWatermark
|
||||
fastlaneSdk={ fastlaneSdk }
|
||||
name="wc-block-checkout-axo-card-watermark"
|
||||
includeAdditionalInfo={ false }
|
||||
/>
|
||||
) }
|
||||
</div>
|
||||
</div>
|
||||
</div>
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue