2024-11-25 20:47:13 -04:00
|
|
|
|
import BadgeBox from '../BadgeBox';
|
|
|
|
|
import { __, sprintf } from '@wordpress/i18n';
|
2024-11-26 16:10:35 +04:00
|
|
|
|
import generatePriceText from '../../../utils/badgeBoxUtils';
|
2024-11-26 18:18:02 +04:00
|
|
|
|
import { countryPriceInfo } from '../../../utils/countryPriceInfo';
|
2024-11-25 20:47:13 -04:00
|
|
|
|
|
2024-11-26 16:10:35 +04:00
|
|
|
|
const BcdcOptionalPaymentMethods = ( {
|
|
|
|
|
isPayLater,
|
|
|
|
|
storeCountry,
|
|
|
|
|
storeCurrency,
|
|
|
|
|
} ) => {
|
2024-11-25 20:47:13 -04:00
|
|
|
|
if ( isPayLater && storeCountry === 'us' ) {
|
|
|
|
|
return (
|
|
|
|
|
<div className="ppcp-r-optional-payment-methods__wrapper">
|
|
|
|
|
<BadgeBox
|
|
|
|
|
title={ __(
|
|
|
|
|
'Credit and Debit Cards',
|
|
|
|
|
'woocommerce-paypal-payments'
|
|
|
|
|
) }
|
|
|
|
|
imageBadge={ [
|
|
|
|
|
'icon-button-visa.svg',
|
|
|
|
|
'icon-button-mastercard.svg',
|
|
|
|
|
'icon-button-amex.svg',
|
|
|
|
|
'icon-button-discover.svg',
|
|
|
|
|
] }
|
2024-11-26 16:10:35 +04:00
|
|
|
|
textBadge={ generatePriceText(
|
|
|
|
|
'standardCardFields',
|
|
|
|
|
countryPriceInfo[ storeCountry ],
|
|
|
|
|
storeCurrency
|
2024-11-25 20:47:13 -04:00
|
|
|
|
) }
|
|
|
|
|
description={ sprintf(
|
|
|
|
|
// translators: %s: Link to PayPal REST application guide
|
|
|
|
|
__(
|
|
|
|
|
'Process major credit and debit cards through PayPal’s card fields. <a target="_blank" href="%s">Learn more</a>',
|
|
|
|
|
'woocommerce-paypal-payments'
|
|
|
|
|
),
|
|
|
|
|
'https://woocommerce.com/document/woocommerce-paypal-payments/#manual-credential-input '
|
|
|
|
|
) }
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
return (
|
|
|
|
|
<div className="ppcp-r-optional-payment-methods__wrapper">
|
|
|
|
|
<BadgeBox
|
|
|
|
|
title={ __(
|
|
|
|
|
'Credit and Debit Cards',
|
|
|
|
|
'woocommerce-paypal-payments'
|
|
|
|
|
) }
|
|
|
|
|
imageBadge={ [
|
|
|
|
|
'icon-button-visa.svg',
|
|
|
|
|
'icon-button-mastercard.svg',
|
|
|
|
|
'icon-button-amex.svg',
|
|
|
|
|
'icon-button-discover.svg',
|
|
|
|
|
] }
|
2024-11-26 16:10:35 +04:00
|
|
|
|
textBadge={ generatePriceText(
|
|
|
|
|
'standardCardFields',
|
|
|
|
|
countryPriceInfo[ storeCountry ],
|
|
|
|
|
storeCurrency
|
2024-11-25 20:47:13 -04:00
|
|
|
|
) }
|
|
|
|
|
description={ sprintf(
|
|
|
|
|
// translators: %s: Link to PayPal REST application guide
|
|
|
|
|
__(
|
|
|
|
|
'Process major credit and debit cards through PayPal’s card fields. <a target="_blank" href="%s">Learn more</a>',
|
|
|
|
|
'woocommerce-paypal-payments'
|
|
|
|
|
),
|
|
|
|
|
'https://woocommerce.com/document/woocommerce-paypal-payments/#manual-credential-input '
|
|
|
|
|
) }
|
|
|
|
|
/>
|
|
|
|
|
</div>
|
|
|
|
|
);
|
|
|
|
|
};
|
|
|
|
|
|
|
|
|
|
export default BcdcOptionalPaymentMethods;
|